Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sub-program argument handling is broken on linux #9

Open
GoogleCodeExporter opened this issue Jun 20, 2015 · 1 comment
Open

sub-program argument handling is broken on linux #9

GoogleCodeExporter opened this issue Jun 20, 2015 · 1 comment

Comments

@GoogleCodeExporter
Copy link

What steps will reproduce the problem?
1. This will probably ONLY reproduce on linux (because it is related to 
sub-command argment handling where an argument is a nul string and/or contains 
spaces (I believe windows will concatonate all args then split at the spaces 
and therefore work).

2. Set the text2pcap arguments to "-l 127"

3. Enter the following radiotap/wlan packet:-
00 00 1a 00 6f 18 00 00 49 77 a0 0e 00 00 00 00  
10 0c 3c 14 40 01 c3 a7 00 1c 80 00 00 00 ff ff 
ff ff ff ff 00 3a 98 dc 87 ac 00 3a 98 dc 87 ac
80 65 45 e0 5a 10 87 00 00 00 64 00 11 00 00 01
00 01 08 8c 12 98 24 b0 48 60 6c 05 04 00 01 00
00 07 0c 47 42 20 24 08 17 64 05 17 84 03 1e 0b
05 03 00 00 8d 5b 30 14 01 00 00 0f ac 04 01 00
00 0f ac 04 01 00 00 0f ac 01 28 00 85 1e 00 00
8f 00 0f 00 ff 03 59 00 43 48 48 53 57 48 41 50
32 30 33 00 00 00 00 00 03 00 00 26 96 06 00 40
96 00 05 00 dd 18 00 50 f2 02 01 01 80 00 03 a4
00 00 27 a4 00 00 42 43 5e 00 62 32 2f 00 dd 06
00 40 96 01 01 04 dd 05 00 40 96 03 05 dd 05 00
40 96 0b 09 dd 05 00 40 96 14 01 73 c5 92 73   

3. It should be decoded with the correct packet encapsulation, but will instead 
decode as Ethernet.

The issue is that the argument handling code for text2pcap does not correctly 
handle spaces or empty arguments. All arguments entered in the program will be 
passed as a single argument which confuses text2pcap. Also if there are no 
arguments, an empty argument may be passed as well.

What version of the product are you using? On what operating system?
0.2
Fedora 17

Please provide any additional information below.

I have attached a patch which fixes this by split the arguments entered in the 
gui at space chars (skipping empty args) and converting them into a (possibly 
empty) list. This is then concatonated with the other arguments.

Original issue reported on code.google.com by [email protected] on 3 Oct 2012 at 2:20

Attachments:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant