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

Make the output of the NASL dump_* packet forgery functions consistent. #555

Merged
merged 2 commits into from
Jul 14, 2020
Merged

Make the output of the NASL dump_* packet forgery functions consistent. #555

merged 2 commits into from
Jul 14, 2020

Conversation

cfi-gb
Copy link
Member

@cfi-gb cfi-gb commented Jul 14, 2020

IPv4

Output before this PR:

------
	ip_hl : 5
	ip_v  : 4
	ip_tos: 0
	ip_len: 40
	ip_id : 64776
	ip_off: 0
	ip_ttl: 63
	ip_p  : IPPROTO_TCP (6)
	ip_sum: 0xf064
	ip_src: xxx
	ip_dst: xxx

------
	th_sport : 40508
	th_dport : 40509
	th_seq   : 0
	th_ack   : 1182458317
	th_x2    : 0
	th_off   : 5
	th_flags : TH_RST|TH_ACK (20)
	th_win   : 0
	th_sum   : 0xc89f
	th_urp   : 0
	Data     : 

Output after this PR:

------
	ip_hl  : 5
	ip_v   : 4
	ip_tos : 0
	ip_len : 40
	ip_id  : 40224
	ip_off : 0
	ip_ttl : 63
	ip_p   : IPPROTO_TCP (6)
	ip_sum : 0xd8c4
	ip_src : xxx
	ip_dst : xxx

------
	th_sport : 40508
	th_dport : 40509
	th_seq   : 0
	th_ack   : 208730020
	th_x2    : 0
	th_off   : 5
	th_flags : TH_RST|TH_ACK (20)
	th_win   : 0
	th_sum   : 0xecd2
	th_urp   : 0
	Data     : 

IPv6

Output before this PR:

------
	ip6_v  : 6
	ip6_tc: 0
	ip6_fl: 0
	ip6_plen: 20
	ip6_hlim : 255
	ip6_nxt  : IPPROTO_TCP (6)
	ip6_src: xxx
	ip6_dst: xxx

------
	th_sport : 40508
	th_dport : 40509
	th_seq   : 0
	th_ack   : 871074376
	th_x2    : 0
	th_off   : 5
	th_flags : TH_RST|TH_ACK (20)
	th_win   : 0
	th_sum   : 0x65cb
	th_urp   : 0
	Data     : 

Output after this PR:

------
	ip6_v    : 6
	ip6_tc   : 0
	ip6_fl   : 0
	ip6_plen : 20
	ip6_hlim : 255
	ip6_nxt  : IPPROTO_TCP (6)
	ip6_src  : xxx
	ip6_dst  : xxx

------
	th_sport : 40508
	th_dport : 40509
	th_seq   : 0
	th_ack   : 1210927891
	th_x2    : 0
	th_off   : 5
	th_flags : TH_RST|TH_ACK (20)
	th_win   : 0
	th_sum   : 0x6e1e
	th_urp   : 0
	Data     :

@cfi-gb cfi-gb requested a review from a team July 14, 2020 07:52
@cfi-gb
Copy link
Member Author

cfi-gb commented Jul 14, 2020

Note that i have also checked dump_udp_packet / dump_udp_v6_packet and both are already consistent in their output.

@ArnoStiefvater ArnoStiefvater merged commit 772c956 into greenbone:openvas-20.08 Jul 14, 2020
@cfi-gb cfi-gb deleted the nasl_dump_consistency branch July 14, 2020 09:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants