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
87073693
Commit
87073693
authored
7 years ago
by
Pierre LALET
Browse files
Options
Downloads
Patches
Plain Diff
Fix missing/incorrect imports
parent
2fc18534
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
scapy/arch/windows/__init__.py
+6
-4
6 additions, 4 deletions
scapy/arch/windows/__init__.py
scapy/utils6.py
+1
-0
1 addition, 0 deletions
scapy/utils6.py
with
7 additions
and
4 deletions
scapy/arch/windows/__init__.py
+
6
−
4
View file @
87073693
...
@@ -43,7 +43,7 @@ if not hasattr(socket, 'IPPROTO_GRE'):
...
@@ -43,7 +43,7 @@ if not hasattr(socket, 'IPPROTO_GRE'):
from
scapy.arch
import
pcapdnet
from
scapy.arch
import
pcapdnet
from
scapy.arch.pcapdnet
import
*
from
scapy.arch.pcapdnet
import
*
from
scapy.consts
import
LOOPBACK_NAME
import
scapy.consts
def
is_new_release
(
ignoreVBS
=
False
):
def
is_new_release
(
ignoreVBS
=
False
):
if
NEW_RELEASE
and
conf
.
prog
.
powershell
is
not
None
:
if
NEW_RELEASE
and
conf
.
prog
.
powershell
is
not
None
:
...
@@ -348,7 +348,7 @@ class NetworkInterface(object):
...
@@ -348,7 +348,7 @@ class NetworkInterface(object):
try
:
try
:
if
not
self
.
ip
:
if
not
self
.
ip
:
self
.
ip
=
get_ip_from_name
(
data
[
'
name
'
])
self
.
ip
=
get_ip_from_name
(
data
[
'
name
'
])
if
not
self
.
ip
and
self
.
name
==
LOOPBACK_NAME
:
if
not
self
.
ip
and
self
.
name
==
scapy
.
consts
.
LOOPBACK_NAME
:
self
.
ip
=
"
127.0.0.1
"
self
.
ip
=
"
127.0.0.1
"
if
not
self
.
ip
:
if
not
self
.
ip
:
# No IP detected
# No IP detected
...
@@ -456,7 +456,9 @@ class NetworkInterfaceDict(UserDict):
...
@@ -456,7 +456,9 @@ class NetworkInterfaceDict(UserDict):
self
.
remove_invalid_ifaces
()
self
.
remove_invalid_ifaces
()
# Replace LOOPBACK_INTERFACE
# Replace LOOPBACK_INTERFACE
try
:
try
:
scapy
.
consts
.
LOOPBACK_INTERFACE
=
self
.
dev_from_name
(
LOOPBACK_NAME
)
scapy
.
consts
.
LOOPBACK_INTERFACE
=
self
.
dev_from_name
(
scapy
.
consts
.
LOOPBACK_NAME
,
)
except
:
except
:
pass
pass
...
@@ -683,7 +685,7 @@ def in6_getifaddr():
...
@@ -683,7 +685,7 @@ def in6_getifaddr():
def
_append_route6
(
routes
,
dpref
,
dp
,
nh
,
iface
,
lifaddr
):
def
_append_route6
(
routes
,
dpref
,
dp
,
nh
,
iface
,
lifaddr
):
cset
=
[]
# candidate set (possible source addresses)
cset
=
[]
# candidate set (possible source addresses)
if
iface
.
name
==
LOOPBACK_NAME
:
if
iface
.
name
==
scapy
.
consts
.
LOOPBACK_NAME
:
if
dpref
==
'
::
'
:
if
dpref
==
'
::
'
:
return
return
cset
=
[
'
::1
'
]
cset
=
[
'
::1
'
]
...
...
This diff is collapsed.
Click to expand it.
scapy/utils6.py
+
1
−
0
View file @
87073693
...
@@ -15,6 +15,7 @@ import socket
...
@@ -15,6 +15,7 @@ import socket
import
struct
import
struct
from
scapy.config
import
conf
from
scapy.config
import
conf
import
scapy.consts
from
scapy.data
import
*
from
scapy.data
import
*
from
scapy.utils
import
*
from
scapy.utils
import
*
from
scapy.pton_ntop
import
*
from
scapy.pton_ntop
import
*
...
...
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