just released the new version and I have also made some tests for clarifying the doubts.
take a look to the following packets received by the client at the beginning of the connection:
Code:
==================================================================
packet 02E603A4 size 0000001a
_________________________________________________________________4
0000000f
_________________________________________________________________8
00000000
_________________________________________________________________6
00000001
_________________________________________________________________6
00000000
________________________________________________________________32
00000000
==================================================================
packet 082E0055 size 00000011
_________________________________________________________________1
00000000
_________________________________________________________________1
00000001
_________________________________________________________________8
00000001
_________________________________________________________________5
00000000
_________________________________________________________________1
00000000
_________________________________________________________________7
00000001
_______________________________dump_____________________________80
70 68 65 65 61 70 7a 67 61 00 pheeapzga.
_________________________________________________________________8
00000003
________________________________________________________________24
00326662
_________________________________________________________________1
00000000
in this case we have the "strange" reading of one bit at the beginning of the packet and the conclusion is that bf2_sniff is not in error but it's just the bf2 client which reads the original packet in 2 parts resetting the bits counter.
I can also demostrate this by using the new version of findbits:
Code:
findbits -s "4 8 6 6 32 16 1 1 8 5 1 7 80" packet.txt
where as you can see I have used all the bits sizes of the first packet, the number 16 and then those of the second one.
that 16 I have added between them is a zone of the packet which seems not handled by the game.
and the following is another packet sent by the client and which has been started to be parsed from the bit offset (bit not byte!) 87:
Code:
==================================================================
packet 07D349FC size 00000400
_________________________________________________________________1
00000000
_________________________________________________________________7
00000003
_________________________________________________________________3
00000000
_________________________________________________________________7
00000002
_______________________________dump____________________________584
?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ????????????????
?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ????????????????
?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ????????????????
?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ????????????????
?? ?? ?? ?? ?? ?? ?? ?? 00 ????????.
so, in conclusion, all the bf packets start with the 4 bits identifier and those other that start with 1 or other sizes are simply read in other zones of the packet.
while in the first example the bit offset of the second block is "padded" (starts at an offset divisible by 8) in the second case 87 doesn't follow the same rule (use -O 87 in findbits if you want to make the test).
anyway I have not performed additional tests, I gave only a quick look to them for a bit of curiosity, nothing more.
the new bf2_sniff is available at
http://aluigi.org/papers.htm#bf2_sniffwhile findbits is available at
http://aluigi.org/testz.htm#findbitshope it helps