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
af80bbfa
Commit
af80bbfa
authored
15 years ago
by
Dirk Loss
Browse files
Options
Downloads
Plain Diff
Merge with main repo
parents
f2647ee6
adb84366
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/config.py
+2
-0
2 additions, 0 deletions
scapy/config.py
scapy/main.py
+17
-2
17 additions, 2 deletions
scapy/main.py
with
19 additions
and
2 deletions
scapy/config.py
+
2
−
0
View file @
af80bbfa
...
...
@@ -287,6 +287,7 @@ def _prompt_changer(attr,val):
class
Conf
(
ConfClass
):
"""
This object contains the configuration of scapy.
session : filename where the session will be saved
interactive_shell : If set to
"
ipython
"
, use IPython as shell. Default: Python
stealth : if 1, prevents any unwanted packet to go out (ARP, DNS, ...)
checkIPID: if 0, doesn
'
t check that IPID matches between IP sent and ICMP IP citation received
if 1, checks that they either are equal or byte swapped equals (bug in some IP stacks)
...
...
@@ -314,6 +315,7 @@ extensions_paths: path or list of paths where extensions are to be looked for
version
=
"
2.1.0-dev
"
session
=
""
interactive
=
False
interactive_shell
=
""
stealth
=
"
not implemented
"
iface
=
None
readfunc
=
None
...
...
This diff is collapsed.
Click to expand it.
scapy/main.py
+
17
−
2
View file @
af80bbfa
...
...
@@ -296,8 +296,23 @@ def interact(mydict=None,argv=None,mybanner=None,loglevel=20):
atexit
.
register
(
scapy_delete_temp_files
)
conf
.
color_theme
=
DefaultTheme
()
code
.
interact
(
banner
=
the_banner
%
(
conf
.
version
),
local
=
session
,
readfunc
=
conf
.
readfunc
)
IPYTHON
=
False
if
conf
.
interactive_shell
.
lower
()
==
"
ipython
"
:
try
:
import
IPython
IPYTHON
=
True
except
ImportError
,
e
:
log_loading
.
warning
(
"
IPython not available. Using standard Python shell instead.
"
)
IPYTHON
=
False
if
IPYTHON
:
banner
=
the_banner
%
(
conf
.
version
)
+
"
using IPython %s
"
%
IPython
.
__version__
ipshell
=
IPython
.
Shell
.
IPShellEmbed
(
banner
=
banner
)
ipshell
(
local_ns
=
session
)
else
:
code
.
interact
(
banner
=
the_banner
%
(
conf
.
version
),
local
=
session
,
readfunc
=
conf
.
readfunc
)
if
conf
.
session
:
save_session
(
conf
.
session
,
session
)
...
...
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