|
You last visited: Today at 18:39
Advertisement
[Release] PacketLogger
Discussion on [Release] PacketLogger within the Nostale Hacks, Bots, Cheats & Exploits forum part of the Nostale category.
07/06/2020, 19:33
|
#271
|
elite*gold: 0
Join Date: Oct 2013
Posts: 101
Received Thanks: 156
|
Might be useful for someone  . (get player name, inject packetlogger, hide packetlogger) Again in python.
Edit, example use:
Code:
from utils import setup_all_clients, PacketLoggerWrapper
from asyncio import run
async def main():
port = 13245
packet_logger = PacketLoggerWrapper(port)
packet_logger.serve()
while True:
print("Waiting for map change.")
c_map_packet = await packet_logger.wait_for_packet(lambda _packet: _packet[1] == "c_map")
print("Map have been changed, c_map packet:", c_map_packet)
run(main())
|
|
|
07/07/2020, 12:13
|
#272
|
elite*gold: 0
Join Date: Mar 2011
Posts: 96
Received Thanks: 16
|
I've wrote a little Helper-Function in C# to get the IP:Port by ProcessName.
Leaving it here in case anybody needs it.
Function (First Adress Only)
Code:
public static string AddressByName(string processName)
{
using (Process p = new Process())
{
ProcessStartInfo ps = new ProcessStartInfo();
ps.Arguments = "-a -b";
ps.FileName = "netstat.exe";
ps.UseShellExecute = false;
ps.WindowStyle = ProcessWindowStyle.Hidden;
ps.RedirectStandardError = true;
ps.RedirectStandardInput = true;
ps.RedirectStandardOutput = true;
p.StartInfo = ps;
p.Start();
using (StreamReader stdContent = p.StandardOutput)
using (StreamReader stdExitStatus = p.StandardError)
{
string content = stdContent.ReadToEnd() + stdExitStatus.ReadToEnd();
if (p.ExitCode != 0)
{
return null; //Error occured in netstat
}
bool isProcess = false;
string[] lineContent;
foreach (string row in content.Split(new[] { "\r\n" }, StringSplitOptions.RemoveEmptyEntries))
{
lineContent = row.Split(new[] { ' ' }, StringSplitOptions.RemoveEmptyEntries);
if (isProcess)
{
return lineContent[1];
}
else if (lineContent[0].Contains(processName))
{
isProcess = true;
}
}
}
}
return null;
}
Function (IEnumerable All Addresses)
Code:
public static IEnumerable<string> AddressByName(string processName)
{
using (Process p = new Process())
{
ProcessStartInfo ps = new ProcessStartInfo();
ps.Arguments = "-a -b";
ps.FileName = "netstat.exe";
ps.UseShellExecute = false;
ps.WindowStyle = ProcessWindowStyle.Hidden;
ps.RedirectStandardError = true;
ps.RedirectStandardInput = true;
ps.RedirectStandardOutput = true;
p.StartInfo = ps;
p.Start();
using (StreamReader stdContent = p.StandardOutput)
using (StreamReader stdExitStatus = p.StandardError)
{
string content = stdContent.ReadToEnd() + stdExitStatus.ReadToEnd();
if (p.ExitCode != 0)
{
yield break; //Error occured in netstat
}
bool isProcess = false;
string[] lineContent;
foreach (string row in content.Split(new[] { "\r\n" }, StringSplitOptions.RemoveEmptyEntries))
{
lineContent = row.Split(new[] { ' ' }, StringSplitOptions.RemoveEmptyEntries);
if (isProcess)
{
isProcess = false;
yield return lineContent[1];
}
else if (lineContent[0].Contains(processName))
{
isProcess = true;
}
}
}
}
yield break;
}
|
|
|
07/07/2020, 18:12
|
#273
|
elite*gold: 0
Join Date: May 2020
Posts: 369
Received Thanks: 448
|
Hello, im a beginner programmer and i would like to learn how to send packets to this packetlogger with a c++ programm but i dont really know how, i read some ppl saying you have to make a TCP connection or something like that? but i dont really know how to do this on c++ so my questions are: Should i just search for a youtube video or something of someone making a TCP client in c++ and copy it to my program? Should i learn AutoIT to use the TCP feature provided by BladeTiger12? If someone can help me i'd be so grateful
|
|
|
07/07/2020, 21:11
|
#274
|
elite*gold: 0
Join Date: Oct 2013
Posts: 101
Received Thanks: 156
|
Quote:
Originally Posted by Hatz~
Hello, im a beginner programmer and i would like to learn how to send packets to this packetlogger with a c++ programm but i dont really know how, i read some ppl saying you have to make a TCP connection or something like that? but i dont really know how to do this on c++ so my questions are: Should i just search for a youtube video or something of someone making a TCP client in c++ and copy it to my program? Should i learn AutoIT to use the TCP feature provided by BladeTiger12? If someone can help me i'd be so grateful 
|
You can use almost every language that supports sockets. If you don't care much about speed, then I recommend python (pretty easy to write something that somehow works). Today I wrote small snippet, where I keep track of player position, id, name.  . Maybe it helps
|
|
|
07/07/2020, 22:00
|
#275
|
elite*gold: 0
Join Date: May 2020
Posts: 369
Received Thanks: 448
|
Quote:
Originally Posted by romdrak
You can use almost every language that supports sockets. If you don't care much about speed, then I recommend python (pretty easy to write something that somehow works). Today I wrote small snippet, where I keep track of player position, id, name.  . Maybe it helps
|
The problem is i dont really know anything about TCP connections and that kind of stuff so i have no idea what code to write x). I've been playing a bit on autoit with the API provided by BladeTiger12 and i have one question, how can i send x packet to 1 client and y packet to second client?
|
|
|
07/07/2020, 22:17
|
#276
|
elite*gold: 0
Join Date: Jan 2017
Posts: 475
Received Thanks: 192
|
Quote:
Originally Posted by Hatz~
The problem is i dont really know anything about TCP connections and that kind of stuff so i have no idea what code to write x). I've been playing a bit on autoit with the API provided by BladeTiger12 and i have one question, how can i send x packet to 1 client and y packet to second client?
|
I'm using VB.NET
This is my code (not mine but i use it XD)
Code:
Imports System.Net
Module TCP
Dim TCPClientz As Sockets.TcpClient
Dim TCPClientStream As Sockets.NetworkStream
Function ConnectTCP(IP As String, Port As String) As Boolean
On Error GoTo ConnectionError
TCPClientz = New Sockets.TcpClient(IP, Port)
TCPClientStream = TCPClientz.GetStream()
ConnectTCP = True
Exit Function
ConnectionError:
ConnectTCP = False
End Function
Sub SendToPacketLogger(Packet As String)
Dim sendbytes() As Byte = System.Text.Encoding.ASCII.GetBytes(Packet)
TCPClientz.Client.Send(sendbytes)
End Sub
Function ReceiveFromPacketLogger() As String
ReceiveFromPacketLogger = ""
If TCPClientStream.DataAvailable = True Then
Dim rcvbytes(TCPClientz.ReceiveBufferSize) As Byte
TCPClientStream.Read(rcvbytes, 0, CInt(TCPClientz.ReceiveBufferSize))
ReceiveFromPacketLogger = System.Text.Encoding.ASCII.GetString(rcvbytes)
End If
End Function
End Module
The first function is used to connect to the packetlogger.
To connect you have to write: ConnectTCP("127.0.0.1", "65656") (65656 is the port)
If you want to know if it's connected correctly you can use an if: If ConnectTCP("127.0.0.1", "65656") = True Then ...
Now that you are connected, you can receive the packets and send them.
To receive them you must write: STRING() = Split(ReceiveFromPacketLogger(), vbCr) (vbCr = return to line beginning)
Now you have a string with multiple lines, so you can use a loop to read them all.
Code:
For K As Integer = 0 To STRING.Length - 1
STRING(K) is the string of your packet
Next K
To send the packets you have to write:
SendToPacketLogger("1 u_s 3 1 1010") (1 u_s 3 1 1010 is the string of the packet that I want to send. It has 1 ahead because it's a SEND)
I'm not a programmer and I understood these things with Google. I hope I have explained myself well 
You can contact me on discord if you don't understand something
|
|
|
07/07/2020, 22:24
|
#277
|
elite*gold: 0
Join Date: May 2020
Posts: 369
Received Thanks: 448
|
Quote:
Originally Posted by Limoo
I'm using VB.NET
This is my code (not mine but i use it XD)
Code:
Imports System.Net
Module TCP
Dim TCPClientz As Sockets.TcpClient
Dim TCPClientStream As Sockets.NetworkStream
Function ConnectTCP(IP As String, Port As String) As Boolean
On Error GoTo ConnectionError
TCPClientz = New Sockets.TcpClient(IP, Port)
TCPClientStream = TCPClientz.GetStream()
ConnectTCP = True
Exit Function
ConnectionError:
ConnectTCP = False
End Function
Sub SendToPacketLogger(Packet As String)
Dim sendbytes() As Byte = System.Text.Encoding.ASCII.GetBytes(Packet)
TCPClientz.Client.Send(sendbytes)
End Sub
Function ReceiveFromPacketLogger() As String
ReceiveFromPacketLogger = ""
If TCPClientStream.DataAvailable = True Then
Dim rcvbytes(TCPClientz.ReceiveBufferSize) As Byte
TCPClientStream.Read(rcvbytes, 0, CInt(TCPClientz.ReceiveBufferSize))
ReceiveFromPacketLogger = System.Text.Encoding.ASCII.GetString(rcvbytes)
End If
End Function
End Module
The first function is used to connect to the packetlogger.
To connect you have to write: ConnectTCP("127.0.0.1", "65656") (65656 is the port)
If you want to know if it's connected correctly you can use an if: If ConnectTCP("127.0.0.1", "65656") = True Then ...
Now that you are connected, you can receive the packets and send them.
To receive them you must write: STRING() = Split(ReceiveFromPacketLogger(), vbCr) (vbCr = return to line beginning)
Now you have a string with multiple lines, so you can use a loop to read them all.
Code:
For K As Integer = 0 To STRING.Length - 1
STRING(K) is the string of your packet
Next K
To send the packets you have to write:
SendToPacketLogger("1 u_s 3 1 1010") (1 u_s 3 1 1010 is the string of the packet that I want to send. It has 1 ahead because it's a SEND)
I'm not a programmer and I understood these things with Google. I hope I have explained myself well 
You can contact me on discord if you don't understand something
|
Thx for your answer  . And how can you send packets to different clients each one with a different packetlogger(port)?
|
|
|
07/07/2020, 22:30
|
#278
|
elite*gold: 0
Join Date: Jan 2017
Posts: 475
Received Thanks: 192
|
Quote:
Originally Posted by Hatz~
Thx for your answer  . And how can you send packets to different clients each one with a different packetlogger(port)?
|
It's a little tricky haha, try creating multiple Sockets.TcpClient and Sockets.NetworkStream
|
|
|
07/07/2020, 22:33
|
#279
|
elite*gold: 0
Join Date: Apr 2015
Posts: 4
Received Thanks: 1
|
As many ppl are posting their port-detection code, here is mine on python:
Code:
import pygetwindow as gw
def getPorts():
windows = gw.getWindowsWithTitle('BladeTiger')
titles = []
for i in range(0, len(windows)):
titles.append(windows[i].title)
ports = []
for i in range(0, len(titles)):
ports.append(titles[i].split('127.0.0.1:')[1])
return ports
|
|
|
07/08/2020, 01:39
|
#280
|
elite*gold: 0
Join Date: May 2020
Posts: 369
Received Thanks: 448
|
Uh i have another question, i almost created a program for invite myself to the miniland and use buff on the alters using the packetlogger but i want my sader to click on my main character and i think the right packet to send is the "ncif" packet but when i send it nothing happens, anyone know why does this happens?
|
|
|
07/08/2020, 06:55
|
#281
|
elite*gold: 0
Join Date: Oct 2013
Posts: 101
Received Thanks: 156
|
Ncif is just requesting data about currently targeted entity. If you want to target spell on someone, you have to pass target id (or how is it called) to u_s packet.
"u_s {skill.cast_id} {target.type} {target.id}"
|
|
|
07/08/2020, 14:31
|
#282
|
elite*gold: 0
Join Date: May 2020
Posts: 369
Received Thanks: 448
|
i got another question, what's the packet "eff" used for? i searched on google but i couldnt find anything
|
|
|
07/08/2020, 14:48
|
#283
|
elite*gold: 50
Join Date: Jul 2014
Posts: 1,699
Received Thanks: 1,165
|
Quote:
Originally Posted by Hatz~
i got another question, what's the packet "eff" used for? i searched on google but i couldnt find anything
|
eff stands for effect. it applies a effect to the character like the blue dog when u use the amulet from act1.
|
|
|
07/09/2020, 14:55
|
#284
|
elite*gold: 0
Join Date: May 2020
Posts: 369
Received Thanks: 448
|
Im here with a new question  . When i send the "walk" packet i noticed that the character move on other nostale windows but on the character that it's moving the character stays on the same position so i was looking for some packet needed to see the walk animation and some ppl said only way of changing the position of the character was with "tp" packet but that packet teleports de character to the specified location, so i would like to know if there's a packet for the "walk animation" because some bots like NosBota worked pretty good (i dont know if that bot used packets for walking, i guess it did)
|
|
|
07/09/2020, 19:02
|
#285
|
elite*gold: 64
Join Date: May 2011
Posts: 1,229
Received Thanks: 854
|
Quote:
Originally Posted by Hatz~
Im here with a new question  . When i send the "walk" packet i noticed that the character move on other nostale windows but on the character that it's moving the character stays on the same position so i was looking for some packet needed to see the walk animation and some ppl said only way of changing the position of the character was with "tp" packet but that packet teleports de character to the specified location, so i would like to know if there's a packet for the "walk animation" because some bots like NosBota worked pretty good (i dont know if that bot used packets for walking, i guess it did)
|
Nope, the most bots use a "walk to position X/Y" function. (Function calling)
It sends the packet automatically and calculates the whole way/pathing if I'm not wrong.
If you want to see yourself there, you could only "fake" it by sending the "tp" package. (You will teleport but at least you will be at the X/Y position)
|
|
|
 |
|
Similar Threads
|
[Release] Packetlogger - By Doktor.
02/09/2019 - Nostale Hacks, Bots, Cheats & Exploits - 137 Replies
Hab mich mal rangesetzt einen Packetlogger zu schreiben, aus Übungszwecken.
Bei Problemen o.Ä. könnt ihr euch einfach im Thread melden.
Funktionen:
- Ausgabe der gesendeten Packets
- Ausgabe der erhaltenen Packets
- Filtern der Packets
- Senden von Packets
- Braucht so schnell kein Update
|
[Release] AutoIt-Recieve-Packetlogger mit Sourcecode
08/07/2013 - Nostale Hacks, Bots, Cheats & Exploits - 20 Replies
Ich habe mich der Herausforderung gestellt in AutoIt einen Packetlogger zu schreiben, bisher werden nur die Packets geloggt, die der Client vom Server erhält, andersrum geht es noch nicht.
Diese kleine Spielerei fing ich eigentlich an um meine neue CCInject.au3 zu testen, dann dachte ich aber, dass es sicherlich für viele interessant sein könnte einmal zu sehen wie einfach es doch ist an die Packets ranzukommen.
Deshalb poste ich hier einmal einen relativ einfachen Packetlogger.
Das...
|
[Release] PacketLogger Starter
08/10/2012 - Nostale Hacks, Bots, Cheats & Exploits - 41 Replies
Hier mein erster Release :)
Es ist zwar nur ein kleines tool, wird jedoch vielen helfen denke ich :)
Infos
Es startet den Multiclient und ändert anschließend die VersionsNr.
Zudem Injizieret er die dll automatisch.
Somit muss man dies nicht mehr mit CE machen.
http://www.abload.de/img/unbenanntogxfy.png
|
All times are GMT +1. The time now is 18:39.
|
|