Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
scapy
Manage
Activity
Members
Plan
Wiki
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package Registry
Model registry
Operate
Terraform modules
Analyze
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
CodeLinaro
public-release-test-restored
platform
external
scapy
Commits
f01f0e13
Commit
f01f0e13
authored
10 years ago
by
Browse files
Options
Downloads
Patches
Plain Diff
Made more robust _PcapWrapper_pypcap.next() by handling if self.pcap.next() returns None.
parent
7575e4f3
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
scapy/arch/pcapdnet.py
+4
-1
4 additions, 1 deletion
scapy/arch/pcapdnet.py
with
4 additions
and
1 deletion
scapy/arch/pcapdnet.py
+
4
−
1
View file @
f01f0e13
...
@@ -53,7 +53,10 @@ if conf.use_pcap:
...
@@ -53,7 +53,10 @@ if conf.use_pcap:
def
__del__
(
self
):
def
__del__
(
self
):
warning
(
"
__del__: don
'
t know how to close the file descriptor. Bugs ahead ! Please report this bug.
"
)
warning
(
"
__del__: don
'
t know how to close the file descriptor. Bugs ahead ! Please report this bug.
"
)
def
next
(
self
):
def
next
(
self
):
ts
,
pkt
=
self
.
pcap
.
next
()
c
=
self
.
pcap
.
next
()
if
c
is
None
return
ts
,
pkt
=
c
return
ts
,
str
(
pkt
)
return
ts
,
str
(
pkt
)
open_pcap
=
lambda
*
args
,
**
kargs
:
_PcapWrapper_pypcap
(
*
args
,
**
kargs
)
open_pcap
=
lambda
*
args
,
**
kargs
:
_PcapWrapper_pypcap
(
*
args
,
**
kargs
)
elif
hasattr
(
pcap
,
"
pcapObject
"
):
# python-libpcap
elif
hasattr
(
pcap
,
"
pcapObject
"
):
# python-libpcap
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment