[Release] PacketLogger

04/12/2022 21:30 BladeTiger12#481
Quote:
Originally Posted by bledior View Post
@[Only registered and activated users can see links. Click Here To Register...] I just tested it and I have again problems with encodings lol.
Quote:
Originally Posted by bledior View Post
@[Only registered and activated users can see links. Click Here To Register...] actually its displaying correctly on packet logger but not in my app hmmm and I didnt change encoding.
Strange, it should work as intended:

[Only registered and activated users can see links. Click Here To Register...]

You downloaded this one?

[Only registered and activated users can see links. Click Here To Register...]

04/12/2022 21:41 bledior#482
@[Only registered and activated users can see links. Click Here To Register...] yes I even redownloaded it now to make sure, same problems. So annoying.
04/12/2022 21:42 PoteznyFaryna#483
@[Only registered and activated users can see links. Click Here To Register...] ok lets agree you dont fix it next time! Slava Nostale!
04/12/2022 21:50 bledior#484
@[Only registered and activated users can see links. Click Here To Register...] last time it worked properly for me was when you were sending packet after fromLocal8Bit.
@[Only registered and activated users can see links. Click Here To Register...] not like now after using QTextCodec

It was like this.

Code:
	const QString sPacket(QString::fromLocal8Bit(i_szPacket).replace('\n', ""));

	emit g_pUi->addPacket(sPacket, EPacketType::PTReceive);
Now its like this and not working properly for me.

Code:
	const QString sPacket = QString::fromLocal8Bit(i_szPacket).replace('\n', "");

	QTextCodec* codec = QTextCodec::codecForName("windows-1250");
	QTextDecoder decoder{ codec };

	QString str = decoder.toUnicode(i_szPacket);

	emit g_pUi->addPacket(str, EPacketType::PTReceive);
But I have to say that packet logger console is now displaying properly texts. Maybe you have to seperate it. Send packet through tcp only after fromLocal8Bit but display packets in console after QtextCodec. Not sure.
04/12/2022 22:24 Kymej#485
works very well
04/12/2022 22:30 BladeTiger12#486
Quote:
Originally Posted by bledior View Post
@[Only registered and activated users can see links. Click Here To Register...] last time it worked properly for me was when you were sending packet after fromLocal8Bit.
@[Only registered and activated users can see links. Click Here To Register...] not like now after using QTextCodec

It was like this.

Code:
	const QString sPacket(QString::fromLocal8Bit(i_szPacket).replace('\n', ""));

	emit g_pUi->addPacket(sPacket, EPacketType::PTReceive);
Now its like this and not working properly for me.

Code:
	const QString sPacket = QString::fromLocal8Bit(i_szPacket).replace('\n', "");

	QTextCodec* codec = QTextCodec::codecForName("windows-1250");
	QTextDecoder decoder{ codec };

	QString str = decoder.toUnicode(i_szPacket);

	emit g_pUi->addPacket(str, EPacketType::PTReceive);
But I have to say that packet logger console is now displaying properly texts. Maybe you have to seperate it. Send packet through tcp only after fromLocal8Bit but display packets in console after QtextCodec. Not sure.
Can you quickly try out my node code I posted ? Wondering if this is working on your machine.
04/12/2022 23:16 bledior#487
I tried it and it working properly... But the same code inside electron doesnt work properly. Holy shit, sorry about the mess that I caused. It looks like its something with electron. I have to dig into it.
04/13/2022 20:50 BladeTiger12#488
Quote:
Originally Posted by bledior View Post
I tried it and it working properly... But the same code inside electron doesnt work properly. Holy shit, sorry about the mess that I caused. It looks like its something with electron. I have to dig into it.
In the electron quickstart project it worked too:

[Only registered and activated users can see links. Click Here To Register...]

I'm really curious what you changed. Does your "index.html" contains:
<meta charset="UTF-8">

in between the "<head>...</head>".
04/13/2022 20:59 bledior#489
@[Only registered and activated users can see links. Click Here To Register...] The thing is that I didnt change anything. W/e its not my priority to think about it now.
04/16/2022 13:30 krychu132#490
It is just me or RECV packets are making some mess with new lines (in version from 12.04.2022)?

When last recorded packet was SEND - [Only registered and activated users can see links. Click Here To Register...]
When last recorded packet was RECV - [Only registered and activated users can see links. Click Here To Register...]

Saving packets to file also is creating with empty lines
[Only registered and activated users can see links. Click Here To Register...]
04/16/2022 13:44 kazik093#491
hello can copy money on private server nostale?
04/16/2022 13:52 BladeTiger12#492
Quote:
Originally Posted by kazik093 View Post
hello can copy money on private server nostale?
Yeah, it's very easy, just "receive" the packet: "gold 2000000000 0" or whatever it was.
04/16/2022 14:02 kazik093#493
I need a little help because I can not do it would be useful to someone who explains
04/16/2022 14:04 BladeTiger12#494
Nah sorry, I won't help doing that. It's illegal!
04/18/2022 13:56 1luca1#495
Hey, now Im trying to send packets via c# console app, but it wont work. I can receive all packages but cant send them.
Here is my code to receive packages:
Code:
using System.Net.Sockets;
using System.Text;

namespace Client
{
    class Program
    {
        const int PORT_NO = 50659;
        const string SERVER_IP = "127.0.0.1";
        static void Main(string[] args)
        {
            //---create a TCPClient object at the IP and port no.---
            TcpClient client = new TcpClient(SERVER_IP, PORT_NO);
            NetworkStream nwStream = client.GetStream();

            while(true)
            {
                //---read back the text---
                byte[] bytesToRead = new byte[client.ReceiveBufferSize];
                int bytesRead = nwStream.Read(bytesToRead, 0, client.ReceiveBufferSize);
                Console.WriteLine(Encoding.ASCII.GetString(bytesToRead, 0, bytesRead));
            }
        }
    }
}
Thanks to stack overflow xD

How I can send packets to the server?

EDIT:
I got it, I need to write 1 (for sending) or 0 (for receiving) followed by the command.....

I have an other problem in c#
I can send and receive the packets but i guess the performance is the problem im trying to filter the packages "e_info" and sometimes it displays false packages. Im filtering with this method:
Code:
public Boolean Like(string s,string str)
        {
            Boolean check = s.Contains(str);
            return check;
        }
in the main loop Im trying to find the packet like this:
Code:
while (true)
            {
                //RECEIVE PACKETS
                byte[] bytesToRead = new byte[client.ReceiveBufferSize];
                int bytesRead = nwStream.Read(bytesToRead, 0, client.ReceiveBufferSize);
                string[] packet = { Encoding.ASCII.GetString(bytesToRead, 0, bytesRead) };
                DateTime date = DateTime.Now;
                foreach (String s in packet)
                {
                    if (instance.Like(s, "0 e_info"))
                    {
                        Console.WriteLine("[" + date + "]" + s);
                    }
                }
            }
The timestamp also does not appear every time:
[Only registered and activated users can see links. Click Here To Register...]
[Only registered and activated users can see links. Click Here To Register...]