Skip to content

Network protocol for dofus : create client and servers for dofus 1.30

License

Notifications You must be signed in to change notification settings

AstrubTools/dofus-protocol

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

dofus-protocol

Try it on gitpod NPM version Build Status

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

Installation

npm i

Sniffer

Linux / MacOS only

cd examples/sniffer && npm i

Usage

Sniffer

Yes node-pcap need root

sudo node examples/sniffer/sniffer.js [network interface(ifconfig)]

Bot

node examples/simpleBot.js -u [my_username] -p [my_password] [-d [delay_between_packets] default: 0]

Proxy

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

Protodef custom types

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

About

Network protocol for dofus : create client and servers for dofus 1.30

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published