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

Add fifo option to FileCapture #621

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open

Conversation

tranzmatt
Copy link

This allows FileCapture to read from a FIFO, which can be useful for parsing the kismet pcapng stream.

mkfifo /tmp/sharkfin || true
wireshark -k -i /tmp/sharkfin &
curl -N -u user:password http://localhost:2501/pcap/all_packets.pcapng > /tmp/sharkfin &

Copy link

@XChikuX XChikuX left a comment

Choose a reason for hiding this comment

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

Please implement said fix

@@ -120,7 +120,7 @@ def __getattr__(self, item):
Allows layers to be retrieved via get attr. For instance: pkt.ip
"""
for layer in self.layers:
if layer.layer_name == item:
if layer.layer_name.lower() == item:
Copy link

Choose a reason for hiding this comment

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

Change to:
if layer.layer_name.lower() == item.lower():

@KimiNewt
Copy link
Owner

There appear to be a bunch of unrelated things in this PR, please only contain the feature in the PR title.

params = super(LiveCapture, self).get_parameters(
packet_count=packet_count)
# Read directly from interfaces
for interface in self.interfaces:
Copy link
Owner

Choose a reason for hiding this comment

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

This isn't related to this PR, and there's a reason we use dumpcap and don't read directly from the interface

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.

3 participants