How could I send a packet to various NosTale clients at the same time through sockets? I think this code is correct and I only need to include cryptography.h and cryptography.cpp of NosTale, but then, what should I do? I mean, It connects successfully to the game but now I don't know what to do.
Code:
#include <iostream>
#include <string>
#include <WS2tcpip.h>
#pragma comment(lib, "ws2_32.lib")
using namespace std;
void main()
{
string ipAddress = "79.110.84.75"; // IP Address of the server
int port = 4000; // Listening port # on the server
// Initialize WinSock
WSAData data;
WORD ver = MAKEWORD(2, 2);
int wsResult = WSAStartup(ver, &data);
if (wsResult != 0)
{
cerr << "Can't start Winsock, Err #" << wsResult << endl;
return;
}
// Create socket
SOCKET sock = socket(AF_INET, SOCK_STREAM, 0);
if (sock == INVALID_SOCKET)
{
cerr << "Can't create socket, Err #" << WSAGetLastError() << endl;
WSACleanup();
return;
}
// Fill in a hint structure
sockaddr_in hint;
hint.sin_family = AF_INET;
hint.sin_port = htons(port);
inet_pton(AF_INET, ipAddress.c_str(), &hint.sin_addr);
// Connect to server
int connResult = connect(sock, (sockaddr*)&hint, sizeof(hint));
if (connResult == SOCKET_ERROR)
{
cerr << "Can't connect to server, Err #" << WSAGetLastError() << endl;
closesocket(sock);
WSACleanup();
return;
}
// Gracefully close down everything
closesocket(sock);
WSACleanup();
}
How could I send a packet to various NosTale clients at the same time through sockets? I think this code is correct and I only need to include cryptography.h and cryptography.cpp of NosTale, but then, what should I do? I mean, It connects successfully to the game but now I don't know what to do.
Code:
#include <iostream>
#include <string>
#include <WS2tcpip.h>
#pragma comment(lib, "ws2_32.lib")
using namespace std;
void main()
{
string ipAddress = "79.110.84.75"; // IP Address of the server
int port = 4000; // Listening port # on the server
// Initialize WinSock
WSAData data;
WORD ver = MAKEWORD(2, 2);
int wsResult = WSAStartup(ver, &data);
if (wsResult != 0)
{
cerr << "Can't start Winsock, Err #" << wsResult << endl;
return;
}
// Create socket
SOCKET sock = socket(AF_INET, SOCK_STREAM, 0);
if (sock == INVALID_SOCKET)
{
cerr << "Can't create socket, Err #" << WSAGetLastError() << endl;
WSACleanup();
return;
}
// Fill in a hint structure
sockaddr_in hint;
hint.sin_family = AF_INET;
hint.sin_port = htons(port);
inet_pton(AF_INET, ipAddress.c_str(), &hint.sin_addr);
// Connect to server
int connResult = connect(sock, (sockaddr*)&hint, sizeof(hint));
if (connResult == SOCKET_ERROR)
{
cerr << "Can't connect to server, Err #" << WSAGetLastError() << endl;
closesocket(sock);
WSACleanup();
return;
}
// Gracefully close down everything
closesocket(sock);
WSACleanup();
}
How about Sending the Login Packet? but for what you need all this?
How should I send the login packet? I tried this and I didn't get any error, so it's something like that, but I don't know how to use the cryptography to send packets, which parameters of the cryptography should I give to the function send?
How should I send the login packet? I tried this and I didn't get any error, so it's something like that, but I don't know how to use the cryptography to send packets, which parameters of the cryptography should I give to the function send?
The current cryptography is on epvp, you should search „sockets“ on google.
Ok, I think now my code is working but when I try to implement the cryptography in my visual studio project it appears an error.
The #include <md5.h> and <hex.h>. I tried to download CryptoPP, but I still get errors. Also I got a lot of errors when I try to compile CryptoPP project xd
PS: I'm using Cryless~ cryptography
Mmmm, what did Walross talked about Pumba? I'm bit confused
Where can I learn all this stuff? I don't find anything...
I think we're mixing some things up here.
You started to talk about Reverse Engineering, so i guess you want to have multiple Game Clients?
Or do you want one Game Client and multiple "clientless" chars that follow?
If you want to use the Gameclient you don't need the Crypto and all these things.
Walross just talked about the Communication between the processes/clients to deliver the information where the char needs to walk to.
I think we're mixing some things up here.
You started to talk about Reverse Engineering, so i guess you want to have multiple Game Clients?
Or do you want one Game Client and multiple "clientless" chars that follow?
If you want to use the Gameclient you don't need the Crypto and all these things.
Walross just talked about the Communication between the processes/clients to deliver the information where the char needs to walk to.
Hi Pumba, yes I think I had mixed some things xd
I want to do one game client and multiple "clientless" chars to follow me and do exactly the same as me. How could I do that?
Hi Pumba, yes I think I had mixed some things xd
I want to do one game client and multiple "clientless" chars to follow me and do exactly the same as me. How could I do that?
Ok, then you we're on the right way.
Quote:
Originally Posted by Koffy1
Ok, I think now my code is working but when I try to implement the cryptography in my visual studio project it appears an error.
The #include <md5.h> and <hex.h>. I tried to download CryptoPP, but I still get errors. Also I got a lot of errors when I try to compile CryptoPP project xd
PS: I'm using Cryless~ cryptography
The headers are part of CryptoPP, did you include it in your project correctly?
When you're logged in successfully we talk again about the possibilities you have to imitate you're main character
When I try to build the CryptoPP it appears one error: cannot open include file: 'stddefh.h': No such file or directory.
What directory I need to add, and where? Project -> Properties -> VC++ Directories -> Include Directories???
And now using the cryptography of Cryless~, what I am suposed to introduce as a parameter to this method? I want to put my username and password but it takes a string.
Crypto client;
std::string username = "test";
std::string password = "1234";
client.randomNumber(0, 1000);
client.createLoginVersion();
client.createLoginHash(username);
client.encryptPasswordString(password);
client.encryptLoginPacket("I don't know what to put here") // It takes a string as parameter
int ret = send(ConnectSocket, "const char buf* of login packet?", "int len", "int flags");
wprintf(L"Connected to server.\n");
Also is it correct this way of doing it?
Code:
Crypto client;
std::string username = "test";
std::string password = "1234";
std::string packet =
client.createLoginHash(username)+client.encryptPasswordString(password);
int packetLength = packet.length();
client.randomNumber(0, 1000);
client.createLoginVersion();
client.encryptLoginPacket(packet);
int ret = send(ConnectSocket, packet.c_str(), packetLength, 0);
wprintf(L"Connected to server.\n");
Nostale emulator state and reverse engineering ? 02/21/2015 - Nostale - 4 Replies Hi,
I'm new in Nostale emulation and I would like to know what is the current developpement state ? Like what is done. Do we know the basic packet structure and stuff ?
Is there anyone who already worked on reverse engineering the client ?
Thanks a lot,
Sgt
Möchte reverse engineering lernen 10/02/2009 - General Coding - 2 Replies Hey Leute
Ich möchte Reverse engineering lernen, und wollte fragen ob ihr kompletten internet bücher kennt.
oder auch ein kleines internet seminar .
Hoffe ihr könnt mir da helfen
[c++]reverse engineering (Teil 1) 03/16/2009 - Coding Tutorials - 7 Replies so, ich schreib hier jetzt mal mein erstes tut...
WENN es euch weiterhilft, oder mehr haben wollt, schreib ich noch nen 2ten teil.
in dem teil gehts darum, eigenen code in das spiel reinzubringen.
was man braucht:
- am besten grunderfahrung in c++, um den code besser zu verstehen.
- eine c++ ide (meine is visual c++ 2008 express edition)
- einen disassembler (IDA free)
los gehts
Tools for reverse engineering? 09/27/2008 - Dekaron - 1 Replies Would someone be kind enough to post what tools ppl use to reverse engineer the files?? (decompilers, debuggers, etc)
Reverse-Engineering talk 12/02/2005 - General Coding - 3 Replies kennt sich jmd. mit der rechtlichen lage bezgl. reverse-engineering aus?
die einen sagen das es illegal ist, die anderen wiederum meinen das re legal ist, was stimmt nun?
ganz interessant ist auch http://de.wikipedia.org/wiki/Reverse_Engin...htlic he_Aspekte
ich finde wir sollten das mal diskutieren um ein wenig klarheit zu schaffen.
Die diskussion sollte speziell auf gamehacking gerichtet sein (nicht auf das cracken von programmen)