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
bb59680a
Commit
bb59680a
authored
16 years ago
by
Phil
Browse files
Options
Downloads
Patches
Plain Diff
Fixed some imports
parent
af92015a
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
scapy/arch/__init__.py
+0
-7
0 additions, 7 deletions
scapy/arch/__init__.py
scapy/arch/linux.py
+3
-2
3 additions, 2 deletions
scapy/arch/linux.py
scapy/layers/dot11.py
+7
-0
7 additions, 0 deletions
scapy/layers/dot11.py
with
10 additions
and
9 deletions
scapy/arch/__init__.py
+
0
−
7
View file @
bb59680a
...
@@ -22,13 +22,6 @@ except ImportError:
...
@@ -22,13 +22,6 @@ except ImportError:
log_loading
.
info
(
"
Can
'
t import PyX. Won
'
t be able to use psdump() or pdfdump().
"
)
log_loading
.
info
(
"
Can
'
t import PyX. Won
'
t be able to use psdump() or pdfdump().
"
)
PYX
=
0
PYX
=
0
try
:
from
Crypto.Cipher
import
ARC4
except
ImportError
:
log_loading
.
info
(
"
Can
'
t import python Crypto lib. Won
'
t be able to decrypt WEP.
"
)
def
str2mac
(
s
):
def
str2mac
(
s
):
return
(
"
%02x:
"
*
6
)[:
-
1
]
%
tuple
(
map
(
ord
,
s
))
return
(
"
%02x:
"
*
6
)[:
-
1
]
%
tuple
(
map
(
ord
,
s
))
...
...
This diff is collapsed.
Click to expand it.
scapy/arch/linux.py
+
3
−
2
View file @
bb59680a
...
@@ -12,6 +12,7 @@ import scapy.utils
...
@@ -12,6 +12,7 @@ import scapy.utils
from
scapy.config
import
conf
from
scapy.config
import
conf
from
scapy.data
import
*
from
scapy.data
import
*
from
scapy.supersocket
import
SuperSocket
from
scapy.supersocket
import
SuperSocket
import
scapy.arch
...
@@ -108,7 +109,7 @@ def attach_filter(s, filter):
...
@@ -108,7 +109,7 @@ def attach_filter(s, filter):
if
not
TCPDUMP
:
if
not
TCPDUMP
:
return
return
try
:
try
:
f
=
os
.
popen
(
"
%s -i %s -ddd -s 1600
'
%s
'"
%
(
config
.
conf
.
prog
.
tcpdump
,
config
.
conf
.
iface
,
filter
))
f
=
os
.
popen
(
"
%s -i %s -ddd -s 1600
'
%s
'"
%
(
conf
.
prog
.
tcpdump
,
conf
.
iface
,
filter
))
except
OSError
,
msg
:
except
OSError
,
msg
:
log_interactive
.
warning
(
"
Failed to execute tcpdump: (%s)
"
)
log_interactive
.
warning
(
"
Failed to execute tcpdump: (%s)
"
)
return
return
...
@@ -122,7 +123,7 @@ def attach_filter(s, filter):
...
@@ -122,7 +123,7 @@ def attach_filter(s, filter):
# XXX. Argl! We need to give the kernel a pointer on the BPF,
# XXX. Argl! We need to give the kernel a pointer on the BPF,
# python object header seems to be 20 bytes. 36 bytes for x86 64bits arch.
# python object header seems to be 20 bytes. 36 bytes for x86 64bits arch.
if
X86_64
:
if
scapy
.
arch
.
X86_64
:
bpfh
=
struct
.
pack
(
"
HL
"
,
nb
,
id
(
bpf
)
+
36
)
bpfh
=
struct
.
pack
(
"
HL
"
,
nb
,
id
(
bpf
)
+
36
)
else
:
else
:
bpfh
=
struct
.
pack
(
"
HI
"
,
nb
,
id
(
bpf
)
+
20
)
bpfh
=
struct
.
pack
(
"
HI
"
,
nb
,
id
(
bpf
)
+
20
)
...
...
This diff is collapsed.
Click to expand it.
scapy/layers/dot11.py
+
7
−
0
View file @
bb59680a
...
@@ -10,6 +10,13 @@ from scapy.fields import *
...
@@ -10,6 +10,13 @@ from scapy.fields import *
from
scapy.plist
import
PacketList
from
scapy.plist
import
PacketList
from
scapy.layers.l2
import
*
from
scapy.layers.l2
import
*
try
:
from
Crypto.Cipher
import
ARC4
except
ImportError
:
log_loading
.
info
(
"
Can
'
t import python Crypto lib. Won
'
t be able to decrypt WEP.
"
)
### Fields
### Fields
class
Dot11AddrMACField
(
MACField
):
class
Dot11AddrMACField
(
MACField
):
...
...
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