Skip to content

Dissect with pcap file format#6

Open
skraken wants to merge 3 commits into
vivisect:masterfrom
skraken:dissect_pcap
Open

Dissect with pcap file format#6
skraken wants to merge 3 commits into
vivisect:masterfrom
skraken:dissect_pcap

Conversation

@skraken

@skraken skraken commented Jul 14, 2017

Copy link
Copy Markdown

Works with the new VStruct2 and dissect implementations that AKOU0 pulled

skraken added 2 commits July 14, 2017 07:39
test includes two test packets for PCAPNG and PCAP
@skraken

skraken commented Jul 14, 2017

Copy link
Copy Markdown
Author

Remodeling of pcap from VStruct so that it may be used in VStruct2.

@invisig0th

Copy link
Copy Markdown
Contributor

Are we still waiting for another update here? the unit tests seem to be broken...

@skraken

skraken commented Jul 25, 2017 via email

Copy link
Copy Markdown
Author

@invisig0th

Copy link
Copy Markdown
Contributor

Re-fired the tests after the vstruct2 merge ( which looked great ) but i suspect this one is borked because of local file paths that exist in your checkout directory that dont exist in a clean checkout....

Comment thread dissect/formats/pcap.py Outdated
PCAPNG_BLOCKTYPE_SECTION_HEADER = 0x0a0d0d0a

def pad4bytes(size):
if (size % 4) == 0:

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

calc size % 4 once and save as var to prevent needing to recalculate it later

Comment thread dissect/formats/pcap.py Outdated
def _iterPcapFile(fd, reuse=False):
h = PCAP_FILE_HEADER()
b = fd.read(len(h))
h.vsParse(b, writeback=True)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

why are we specifying writeback=True here ( and below ) when the object isn't backed by an FD or a memorymap?

@skraken

skraken commented Aug 1, 2017

Copy link
Copy Markdown
Author

I wouldn't be surprised if my tests are failing for the same reason that AKOU0's tests are failing.

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