Network protocol for dofus : create client and servers for dofus 1.30
Not recommended to use on official servers right now, prefer debugging on amakna private server or other 1.29 / 1.30 private server
npm i
Linux / MacOS only
cd examples/sniffer && npm i
Yes node-pcap need root
sudo node examples/sniffer/sniffer.js [network interface(ifconfig)]
node examples/simpleBot.js -u [my_username] -p [my_password] [-d [delay_between_packets] default: 0]
Add IP table rule
sysctl -w net.ipv4.conf.[YOUR_NETWORK_INTERFACE].route_localnet=1
sudo iptables -t nat -A OUTPUT -p tcp --dport 887 -d 190.115.26.127 -j DNAT --to-destination 127.0.0.1:34555
Remove all non default IP table rule
sudo iptables -P INPUT ACCEPT
sudo iptables -P FORWARD ACCEPT
sudo iptables -P OUTPUT ACCEPT
sudo iptables -t nat -F
sudo iptables -t mangle -F
sudo iptables -F
sudo iptables -X
Many custom types have been implemented due to the fact dofus protocol is textual ...
- restBuffer: (based on node-minecraft-protocol implementation)
- restString: everything until the end of the packet
- su8: string -> u8
- su16: string -> u16
- su32: string -> u32
- su64: string -> u64
- scontainer: container with separator (for example "|" or ",")
- cryptedIp: dofus encryption implementation
- cryptedPort: same for port
- restToSeparator: everything until separator specified
- sArray: like in every language split function ("haha;hoho;hihi".split(";") = ["haha", "hoho", "hihi"])
see usage in data.json it's better to understand