Skip to content

Cleanup DNS decompression + fix warning messages being shown #1849

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

Merged
merged 3 commits into from
Apr 3, 2019

Conversation

gpotter2
Copy link
Member

@gpotter2 gpotter2 commented Feb 14, 2019

  • fixes DNS RR - prematured end #1846
  • cleanup dns
  • fixes some warnings
  • make UTscapy display raw data of the packets that have made the dissector crash, to be able to debug it externally

@codecov
Copy link

codecov bot commented Feb 14, 2019

Codecov Report

Merging #1849 into master will decrease coverage by 0.35%.
The diff coverage is 90%.

@@            Coverage Diff             @@
##           master    #1849      +/-   ##
==========================================
- Coverage   85.88%   85.52%   -0.36%     
==========================================
  Files         187      184       -3     
  Lines       42784    41853     -931     
==========================================
- Hits        36744    35796     -948     
- Misses       6040     6057      +17
Impacted Files Coverage Δ
scapy/supersocket.py 72.09% <0%> (-0.57%) ⬇️
scapy/sendrecv.py 85.27% <50%> (+0.19%) ⬆️
scapy/layers/dns.py 91.71% <97.22%> (+0.18%) ⬆️
scapy/layers/usb.py 51.64% <0%> (-29.68%) ⬇️
scapy/consts.py 70.83% <0%> (-20.84%) ⬇️
scapy/arch/pcapdnet.py 37.37% <0%> (-19.67%) ⬇️
scapy/arch/__init__.py 84.44% <0%> (-11.12%) ⬇️
scapy/pton_ntop.py 89.04% <0%> (-8.22%) ⬇️
scapy/automaton.py 75.75% <0%> (-6.07%) ⬇️
scapy/route.py 86.13% <0%> (-5.11%) ⬇️
... and 20 more

@codecov

This comment has been minimized.

@gpotter2 gpotter2 added bug cleanup Performs some code clean-up labels Feb 14, 2019
@gpotter2 gpotter2 mentioned this pull request Feb 22, 2019
27 tasks
@gpotter2
Copy link
Member Author

gpotter2 commented Mar 23, 2019

@guedou @p-l- Hi ! Please review when you find the time :)

@@ -29,7 +29,7 @@
from scapy.pton_ntop import inet_ntop, inet_pton


def dns_get_str(s, p, pkt=None, _internal=False):
def dns_get_str(s, p, pkt=None, _fullpacket=False):
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think that it is a good opportunity to rename this one letter variables.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

s stands for string (pretty well used in Scapy)
p stands for pointer

Should I keep s and get p -> pointer (a bit long, it’s used a lot afterwards)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If this change is not too much trouble, it will improve the readability of the algorithm,

@guedou
Copy link
Member

guedou commented Mar 29, 2019

flake8 is not happy.

@gpotter2 gpotter2 force-pushed the dnscleanup branch 2 times, most recently from bb0aa48 to 9fc155f Compare March 29, 2019 23:31
@gpotter2
Copy link
Member Author

Dont worry, make flake8 happy 😄

Should be mergeable

@gpotter2
Copy link
Member Author

The side effect of this PR is that it will now print out packets that make the dissector crash.

Currently, some TLS packets make the tests crash from time to time, we’ll be able to debug that out.

@p-l- p-l- merged commit fde64e9 into secdev:master Apr 3, 2019
@gpotter2 gpotter2 deleted the dnscleanup branch April 3, 2019 22:24
@FelixZY FelixZY mentioned this pull request Apr 26, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug cleanup Performs some code clean-up
Projects
None yet
Development

Successfully merging this pull request may close these issues.

DNS RR - prematured end
3 participants