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

Scapy terminal improvements #4073

Merged
merged 6 commits into from
Jul 31, 2023
Merged

Scapy terminal improvements #4073

merged 6 commits into from
Jul 31, 2023

Conversation

gpotter2
Copy link
Member

@gpotter2 gpotter2 commented Jul 18, 2023

This commit changes the following:

  • .scapy_startup.py and .scapy_prestart.py are moved to .config/scapy/startup.py and .config/scapy/prestart.py. This is what apparently most big libraries/softwares are moving towards (matplotlib, wireshark, etc.). Question: do we want to move the history there? (for now it's the only file remaining in ~) (done)
  • automatically create .config/scapy/prestart.py. This is IMHO much easier for a novice user to understand what's going on, since it will show what it is supposed to look like.
  • the Scapy terminal now supports ptpython and bpython, in addition to the existing IPython. ptpython comes with the ptipython variant that's a mix between ptpython and IPython.
  • improve doc a bit, remove useless info usage.rst.
  • fix IPython completion lists files instead of methods #4056

Bugs:

I encourage you to try them all a bit, some are pretty fun. Until one of them is as stable as IPython though, it will remain the default. There are some conf.color_theme features that comes with IPython that are not implemented here yet.

Gallery

bpython
image

ptpython
image

@codecov
Copy link

codecov bot commented Jul 18, 2023

Codecov Report

Merging #4073 (d29cd0c) into master (eb3658d) will increase coverage by 0.36%.
Report is 5 commits behind head on master.
The diff coverage is 58.49%.

@@            Coverage Diff             @@
##           master    #4073      +/-   ##
==========================================
+ Coverage   81.58%   81.95%   +0.36%     
==========================================
  Files         327      328       +1     
  Lines       75546    75836     +290     
==========================================
+ Hits        61633    62148     +515     
+ Misses      13913    13688     -225     
Files Changed Coverage Δ
scapy/main.py 71.81% <55.55%> (-3.39%) ⬇️
scapy/config.py 84.44% <100.00%> (+1.84%) ⬆️

... and 22 files with indirect coverage changes

This commit changes the following:
- .scapy_startup.py and .scapy_prestart.py are moved to
  .config/scapy/startup.py and .config/scapy/prestart.py
- the Scapy terminal now supports ptpython and bpython, in addition to
  the existing IPython
@guedou
Copy link
Member

guedou commented Jul 21, 2023

@gpotter2 I am fine with moving everything into .config/scapy that makes more sense.

scapy/main.py Show resolved Hide resolved
guedou
guedou previously requested changes Jul 21, 2023
scapy/main.py Outdated Show resolved Hide resolved
scapy/main.py Show resolved Hide resolved
@gpotter2
Copy link
Member Author

@guedou @polybassa @p-l- Ready for review & merge !

@guedou
Copy link
Member

guedou commented Jul 30, 2023

LGTM.Thanks for the changes. I don't why but I cannot approve the PR.

@polybassa polybassa requested a review from guedou July 31, 2023 06:11
@gpotter2 gpotter2 merged commit 7fced60 into secdev:master Jul 31, 2023
19 checks passed
@gpotter2 gpotter2 deleted the terminal branch July 31, 2023 18:02
@gpotter2 gpotter2 added this to the 2.6.0 milestone Nov 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

IPython completion lists files instead of methods
4 participants