|
You last visited: Today at 03:21
Advertisement
NosTale Q&A
Discussion on NosTale Q&A within the Nostale forum part of the MMORPGs category.
06/12/2019, 14:40
|
#16
|
elite*gold: 0
Join Date: Jun 2019
Posts: 15
Received Thanks: 0
|
Quote:
Originally Posted by IceTrailer
Where do you have the packet from?
Make sure to use your GUID and to generate the hash automatically (so you don‘t have to change it everytime the client gets an update)
|
The packet is from the packetlooger, I just copy paste it.
|
|
|
06/12/2019, 14:40
|
#17
|
elite*gold: 150
Join Date: Sep 2010
Posts: 2,070
Received Thanks: 821
|
Quote:
Originally Posted by Kolzy16
The packet is from the packetlooger, I just copy paste it.
|
Then generate it?
|
|
|
06/12/2019, 14:42
|
#18
|
elite*gold: 0
Join Date: Jun 2019
Posts: 15
Received Thanks: 0
|
Quote:
Originally Posted by IceTrailer
Then generate it?
|
But why it doesn't work, it is supossed to work no? It's the same packet.
|
|
|
06/12/2019, 14:43
|
#19
|
elite*gold: 150
Join Date: Sep 2010
Posts: 2,070
Received Thanks: 821
|
Quote:
Originally Posted by Kolzy16
But why it doesn't work, it is supossed to work no? It's the same packet.
|
Note that the right packet depends on: client version, client exe files, account data and your hardware (or pc)
|
|
|
06/12/2019, 15:02
|
#20
|
elite*gold: 50
Join Date: Jul 2014
Posts: 1,700
Received Thanks: 1,165
|
Quote:
Originally Posted by IceTrailer
Where do you have the packet from?
Make sure to use your GUID and to generate the hash automatically (so you don‘t have to change it everytime the client gets an update)
|
the GUID dont care so much for me i generate it for each login new and it works. But i think the 0x0B can be maybe the problem.
|
|
|
06/12/2019, 22:11
|
#21
|
elite*gold: 0
Join Date: Jun 2019
Posts: 15
Received Thanks: 0
|
I found the error. Yey
|
|
|
06/14/2019, 09:52
|
#22
|
elite*gold: 0
Join Date: Sep 2015
Posts: 482
Received Thanks: 532
|
There is a lot of confusion here.
You should use a std::string to store the packet and encrypt/decrypt it. Finally you should cast it to const char* using .c_str() method and pass it to send() function with .length(). It does not care \0 since send() function is using the length you pass it as parameter.
NostaleString is an alternative to AnsiString for packet injection. It is not related to clientless.
Quote:
Originally Posted by IceTrailer
No and no.
When you have decrypted bytes you should never use a string due to the null byte.
Use a std::vector.
And no, C/C++ terminates strings on the first found \0 byte. You cannot change that.
|
What you said is a bullshit.
In fact, std::string is not caring \0 at all.
|
|
|
06/14/2019, 14:05
|
#23
|
elite*gold: 150
Join Date: Sep 2010
Posts: 2,070
Received Thanks: 821
|
Quote:
Originally Posted by Cryless~
What you said is a bullshit.
In fact, std::string is not caring \0 at all. 
|
It is not bullshit since it's about printing a encrypted text packet which contains \0. He might use a vector from the beginning which makes it easier than with a std::string.
|
|
|
06/14/2019, 19:16
|
#24
|
elite*gold: 0
Join Date: Sep 2015
Posts: 482
Received Thanks: 532
|
Quote:
Originally Posted by IceTrailer
It is not bullshit since it's about printing a encrypted text packet which contains \0. He might use a vector from the beginning which makes it easier than with a std::string.
|
Illuminate me. How is std::vector easier than std::string? The std::vector<char> .data() method returns a const char* which is exactly the same as std::string .c_str(). A std::string is not using \0 or any delimiter at all. You can operate on std::string the same way you operate on std::vector with the benefit of not having to convert from const char* to std::vector to convert it back again to const char* or std::string. You also have access to very useful methods which you may need. What you are saying is senseless and you should stop spreading disinformation out there.
Quote:
Originally Posted by Kolzy16
Couldn't I work with strings instead of vectors? And, is there a possible way to try avoiding the "\0" while you convert string to const char*?
|
Yes, you should. No. Print the string directly.
Code:
int main()
{
std::string packet = "NoS0575 7031428 Test 3213852420455EE02E4F9FB7E1263751BA49DC01278E8D8AC6B094C2AD555ABE3512267B6A2D9528A2234E6A90E295E95E12"
"4AE0AB2E54C406C49B533293B3CF c594947f-d4a9-4462-b545-ad7ddbfd71a2 006EC080\x0B0.9.3.3104 0 2F65F4A00E723E4281EFE51CACE4039D";
// print plaintext packet
std::cout << packet << std::endl;
// encrypt
for (std::size_t i = 0; i < packet.length(); i++)
{
packet[i] ^= 0xC3;
packet[i] += 0x0F;
}
// print encrypted packet
std::cout << packet << std::endl;
// ws2_32.send()
send(socket, packet.c_str(), packet.length(), NULL);
return 0;
}
|
|
|
06/19/2019, 10:10
|
#25
|
elite*gold: 0
Join Date: Jun 2019
Posts: 15
Received Thanks: 0
|
Someone could help me to compile curl library for windows? I want to use it but I don't know how to compile this **** library.
|
|
|
06/19/2019, 10:58
|
#26
|
elite*gold: 55
Join Date: Jan 2011
Posts: 1,240
Received Thanks: 1,187
|
Quote:
Originally Posted by Kolzy16
Someone could help me to compile curl library for windows? I want to use it but I don't know how to compile this **** library.
|
You can find compiled binaries too
|
|
|
06/19/2019, 17:04
|
#27
|
elite*gold: 0
Join Date: Jun 2019
Posts: 15
Received Thanks: 0
|
Quote:
Originally Posted by Pumba98
You can find compiled binaries too
|
Do you know why I get this error? Did I linked bad the libraries?
Code:
#include <iostream>
#include <string>
#include "curl.h"
static size_t WriteCallback(void* contents, size_t size, size_t nmemb, void* userp)
{
((std::string*)userp)->append((char*)contents, size * nmemb);
return size * nmemb;
}
int main(void)
{
CURL* curl;
CURLcode res;
std::string readBuffer;
curl = curl_easy_init();
if (curl) {
curl_easy_setopt(curl, CURLOPT_URL, "http://www.google.com");
curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, WriteCallback);
curl_easy_setopt(curl, CURLOPT_WRITEDATA, &readBuffer);
res = curl_easy_perform(curl);
curl_easy_cleanup(curl);
std::cout << readBuffer << std::endl;
}
return 0;
}
|
|
|
06/19/2019, 17:21
|
#28
|
elite*gold: 0
Join Date: Sep 2015
Posts: 482
Received Thanks: 532
|
Quote:
Originally Posted by Kolzy16
Do you know why I get this error? Did I linked bad the libraries?
Code:
#include <iostream>
#include <string>
#include "curl.h"
static size_t WriteCallback(void* contents, size_t size, size_t nmemb, void* userp)
{
((std::string*)userp)->append((char*)contents, size * nmemb);
return size * nmemb;
}
int main(void)
{
CURL* curl;
CURLcode res;
std::string readBuffer;
curl = curl_easy_init();
if (curl) {
curl_easy_setopt(curl, CURLOPT_URL, "http://www.google.com");
curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, WriteCallback);
curl_easy_setopt(curl, CURLOPT_WRITEDATA, &readBuffer);
res = curl_easy_perform(curl);
curl_easy_cleanup(curl);
std::cout << readBuffer << std::endl;
}
return 0;
}
|
I thought you wanted help for C++ code.
Why I see you only posting C code in 2 pages?
It is horrible to read.
You probably want to use Boost.Beast instead of curl:
To solve your error you have to link curl .lib(s)
|
|
|
06/19/2019, 17:46
|
#29
|
elite*gold: 0
Join Date: Jun 2019
Posts: 15
Received Thanks: 0
|
Quote:
Originally Posted by Cryless~
I thought you wanted help for C++ code.
Why I see you only posting C code in 2 pages?
It is horrible to read.
You probably want to use Boost.Beast instead of curl:
To solve your error you have to link curl .lib(s)
|
My idea is to do it in C++ but I took this example code for a random page.
|
|
|
06/19/2019, 19:50
|
#30
|
elite*gold: 0
Join Date: Sep 2015
Posts: 482
Received Thanks: 532
|
Quote:
Originally Posted by Kolzy16
My idea is to do it in C++ but I took this example code for a random page.
|
I see. The hardest part of learning programming is that most of code you can find online is done wrong. Feel free contacting me in private for any question. I will be glad to help you.
|
|
|
Similar Threads
|
[Buying] &&&&&&&&&KAUFE STEAM ACCOUNT! &&&&&&&&&
06/07/2013 - Trading - 1 Replies
Hallo, bin nicht hier um groß zu traden,sondern möchte einen Steam Account kaufen.
Fakten:
Biete maximal 60€ PaySafeCard
Es sollten viele kleine Spiele sowie COD enthalten sein
COD 7-9 sind Pflicht!
Kein VAC/TAC/Valve o.Ä Bann!
|
&&&&&&&&&KAUFE STEAM ACCOUNT! &&&&&&&&&
06/07/2013 - elite*gold Trading - 0 Replies
Hallo, bin nicht hier um groß zu traden,sondern möchte einen Steam Account kaufen.
Fakten:
Biete maximal 60€ PaySafeCard oder kann es auch zu egold machen
Es sollten viele kleine Spiele sowie COD enthalten sein
COD 7-9 sind Pflicht!
Kein VAC/TAC/Valve o.Ä Bann!
|
[Buying] &&&&&&&&&KAUFE STEAM ACCOUNT! &&&&&&&&&
06/07/2013 - Steam Trading - 0 Replies
Hallo, bin nicht hier um groß zu traden,sondern möchte einen Steam Account kaufen.
Fakten:
Biete maximal 60€ PaySafeCard
Es sollten viele kleine Spiele sowie COD enthalten sein
COD 7-9 sind Pflicht!
Kein VAC/TAC/Valve o.Ä Bann!
|
All times are GMT +1. The time now is 03:25.
|
|