Template
1
0
mirror of https://github.com/bol-van/zapret2.git synced 2026-03-13 22:03:09 +00:00

update docs

This commit is contained in:
bol-van
2026-01-31 13:17:33 +03:00
parent 04d940e619
commit b1fbf5c81a
2 changed files with 39 additions and 0 deletions

View File

@@ -82,6 +82,7 @@
- [reconstruct\_dissect](#reconstruct_dissect)
- [reconstruct\_hdr](#reconstruct_hdr)
- [csum\_fix](#csum_fix)
- [conntrack](#conntrack)
- [Obtaining IP addresses](#obtaining-ip-addresses)
- [Receiving and sending Packets](#receiving-and-sending-packets)
- [rawsend](#rawsend)
@@ -2084,6 +2085,25 @@ Functions for fixing checksums. Since strings in Lua are immutable, these functi
Direct reconstruction of individual headers is rarely necessary. Typically, all tasks are handled by functions working with dissects.
### conntrack
```
function conntrack_feed(dissect, reconstruct_opts)
```
"Feed" dissect to conntrack the way as if it was received from the network.
aaa
2 values are returned : [track](#the-track-table-structure) and bool value "outgoing".
outgoing is true if a new conntrack record was created and it was a SYN packet in case of tcp or any packet in case of udp.
If conntrack record already exists outgoing is true if the record was found by direct tuple - src_ip, src_port, dst_ip, dst_port.
If the record was found by reverse tuple - dst_ip, dst_port, src_ip, src_port - outgoing is false.
The function can come in handy if you are obfuscating and transmitting data in a distorted form. For example, tcp is converted to icmp or the SYN flag is corrupted.
The receiving end will issue the first corrupted packet without track, because it is either not tcp and not udp, or there was no valid tcp handshake.
After deobfuscation, you can correct the situation by executing conntrack_feed and assigning desync.track its result.
If conntrack is disabled or the packet is not valid tcp or udp, nil is returned.
### Obtaining IP addresses
```