All Projects → cx88 → diepssect

cx88 / diepssect

Licence: Apache-2.0 license
A public repo for hacky diep stuff - networking protocol, WebAssembly, memory editing, & physics

Programming Languages

WebAssembly
147 projects
c
50402 projects - #5 most used programming language

Projects that are alternatives of or similar to diepssect

diepindepth
Collection of protocol, memory, and other information for the browser game diepio
Stars: ✭ 39 (+50%)
Mutual labels:  protocol, diepio, diep
Graphql Ws
Coherent, zero-dependency, lazy, simple, GraphQL over WebSocket Protocol compliant server and client.
Stars: ✭ 398 (+1430.77%)
Mutual labels:  protocol, websockets
rmnp
Realtime Multiplayer Networking Protocol
Stars: ✭ 41 (+57.69%)
Mutual labels:  packets, protocol
Starscream
Websockets in swift for iOS and OSX
Stars: ✭ 7,105 (+27226.92%)
Mutual labels:  protocol, websockets
433MHz Tx Rx
Arduino based 433MHz Tx and Rx combo using Manchester protocol
Stars: ✭ 27 (+3.85%)
Mutual labels:  packets, protocol
Polymorph
Polymorph is a real-time network packet manipulation framework with support for almost all existing protocols
Stars: ✭ 364 (+1300%)
Mutual labels:  packets, protocol
Node Minecraft Protocol
Parse and serialize minecraft packets, plus authentication and encryption.
Stars: ✭ 697 (+2580.77%)
Mutual labels:  packets, protocol
Netcode
A protocol for secure client/server connections over UDP
Stars: ✭ 2,121 (+8057.69%)
Mutual labels:  packets, protocol
Pypacker
📦 The fastest and simplest packet manipulation lib for Python
Stars: ✭ 216 (+730.77%)
Mutual labels:  packets, protocol
ProtocolLib
Provides read and write access to the Minecraft protocol with Bukkit.
Stars: ✭ 625 (+2303.85%)
Mutual labels:  packets, protocol
go-libutp
Go wrapper of libutp reference uTP C implementation
Stars: ✭ 75 (+188.46%)
Mutual labels:  packets
bikenwgrowth
Source code for the paper "Growing urban bicycle networks", exploring algorithmically the limitations of urban bicycle network growth
Stars: ✭ 39 (+50%)
Mutual labels:  network-analysis
FTAPIKit
Declarative and generic REST API framework using Codable.
Stars: ✭ 18 (-30.77%)
Mutual labels:  protocol
mqtt rs
MQTT broker in Rust
Stars: ✭ 23 (-11.54%)
Mutual labels:  protocol
net-protocol
golang模拟内核协议栈 实现链路层、网络层、传输层、应用层 用户态协议栈 ,基于虚拟网卡TUN/TAP
Stars: ✭ 129 (+396.15%)
Mutual labels:  protocol
GDCustomRaycastVehicle
A simple custom raycast vehicle implementation
Stars: ✭ 36 (+38.46%)
Mutual labels:  physics
SerialProtocol
A protocol for sending data between two Arduino devices, or between an Arduino and another device through a serial port
Stars: ✭ 36 (+38.46%)
Mutual labels:  protocol
onebot
OneBot:统一的聊天机器人应用接口标准
Stars: ✭ 1,113 (+4180.77%)
Mutual labels:  protocol
System.Net.WebSockets.Client.Managed
Microsoft's managed implementation of System.Net.WebSockets.ClientWebSocket tweaked for use on Windows 7 and .NET 4.5
Stars: ✭ 41 (+57.69%)
Mutual labels:  websockets
Divert.Net
.NET Wrapper for WinDivert
Stars: ✭ 51 (+96.15%)
Mutual labels:  packets

Diepssect

Shapes. Lots of shapes.

This a public repo for hacky diep stuff, including networking protocol, WebAssembly, memory editing, & physics.

Contribution

I started working on this back in the summer of 2017, with the goal of deciphering the diep.io protocol. Unfortunately the developer started updating the game for a while, and each time the memory layout and protocol is shuffled. But since now it's been months since the last update now, I'm starting to work on it again.

If you make any discoveries, pull requests are welcome! You can also message me on my Discord server at discord.gg/8gvUd3v.

Scripts

All of the userscripts are found in the userscripts folder, but you can also install them by just clicking. They all should be able to run in harmony, with the exception of dpma.js, which should not be combined with hexedit.js or diep-pl.js.

https://cx88.github.io/diepssect/dpma/dpma.user.js

  • dpma.js - A WIP script that allows both editing memory and packets.
  • diep-pl.js - A diep packer logger, used for deciphering the protocol.
  • hexedit.js - A script that allows memory editing.
  • injector.js - A script that inject itself into diep's build_*.js for exporting and replacing variables.
  • nsfsk.js - Test script. Currently does nothing.

There are other browser or node.js scripts, which can be found in the scripts folder.

Protocol

You can get diep-pl.js and use it in TemperMonkey. Press F12 to view all short cuts, but it include features like Alt+Z to dump log to console.

The progress in packets are split into 4 categories. Unknown means that the structure of the packet is not yet completely understood. Structured means that the structure of the packet is known, but the specific details are not know yet. Mapped means that the packet is currently completely decoded, but it will change every update and must be mapped again. Done means that the packet has a know and static or extremely predictable mapping, enough to be automated.

Encodings

Although data is represented in many ways, there are only six primary encodings. You can find information on all of them in the scripts/coder.js file.

Name Description Size
Float A floating point number 4
Int A little-endian integer 4
Varint A signed 32 bit integer 1+
Varuint An unsigned 32 bit integer 1+
Varfloat A float casted to a varint 1+
String A null terminated string 1+

Many packets are already completely deciphered. Some packet types have a known structure, but contain tables or mappings that are unknown and possible to figure out through manual trial-and-error. A few are completely unknown and deemed impossible without reverse engineering.

Serverbound Packets

ID Description Status
00 init Done
01 input Done
02 spawn Done
03 upgrade build Mapped
04 upgrade tank Mapped
05 echo Done
06 Unknown
07 extension found Structured
08 clear death Done
09 take tank Done

Serverbound packets are generally easy to dissect, most having few if any arguments. The only exception to this is the 01 packet, which is in the following format: 01 vu(flags) vf(mouseX) vf(mouseY) (vx(movementX) vy(movementY))?

The flags are as below, starting with the least significant bit:

  • left mouse
  • up key
  • left key
  • down key
  • right key
  • god mode
  • suicide
  • right mouse
  • instant upgrade
  • use gamepad
  • switch class
  • constant of true

Note that the movement arguments are only added when using gamepads.

Clientbound Packets

ID Description Status
00 update Structured
01 outdated client Done
02 compressed update Structured
03 message Done
04 server status Done
05 echo Done
06 party link Done
07 ready Done
08 achievements Structured
09 invalid link Done
0a player count Done

Although most clientbound packets are as easy as the serverside packets. There are two main extremely complicated ones, 00 and 02, which I'll explain in CLIENTBOUND.md.

Other Repos

Here are some repos about the protocol. Unfortunately, most of the information there especially about the details of the 00 packet is either outdated or incorrect.

WebAssembly

Diep.io uses Emscripten with WebAssembly. This means that unlike most .io games, diep is written not in JavaScript but rather C++. This means that the code cannot be easily read, and will be difficult to comprehend even when disassembled.

Aside from the generated bundle_*.js (formerly d.js), diep also have c.js (originally compressed) which controls input data.

Memory editing

You can get hexedit.js and use it in TemperMonkey. Six vectors with static memory addresses have been included, and you can find their information in the comments.

Physics

You can get diep-pl.js and use it in TemperMonkey. Press F12 to view all short cuts, but it include features like Alt+X to pause updated, Alt+Q to view motion frame by frame, and Alt+M to enable debug mode which show raw health up to 6 digits.

Although dpma.js will replace diep-pl.js eventually, currently you can combine both scripts and the entity box should work and display all visible entities. The entity with the highest ID, which is usually the last created entity, will be blue. You'll need to ignore the hidden entities near the center, which are your barrels.

Here's a very useful page with lots of stuff about diep's physics.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].