Skip to content

Console & Config improvement #1996

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

Merged
merged 3 commits into from
May 30, 2019
Merged

Console & Config improvement #1996

merged 3 commits into from
May 30, 2019

Conversation

gpotter2
Copy link
Member

@gpotter2 gpotter2 commented Apr 21, 2019

This PR:

  • Fixes the conf imports that were too early (before the logger is setup) in main.py
  • Makes some conf values read-only.
  • Replaces some conf default values that are used as booleans by booleans rather than 0/1. Much clearer
  • Implements a colored formatter for the logging (interactive mode only): it makes the startup much more readable
    image
  • fixes some log levels (warning -> info for unimportant issues, and error -> critical for some major ones)
  • load some values on runtime in config (values from Scapy.data) to avoid duplication of the values + import loops

@gpotter2 gpotter2 added cleanup Performs some code clean-up enhancement labels Apr 21, 2019
@codecov
Copy link

codecov bot commented Apr 21, 2019

Codecov Report

Merging #1996 into master will decrease coverage by 0.04%.
The diff coverage is 68.23%.

@@            Coverage Diff            @@
##           master   #1996      +/-   ##
=========================================
- Coverage   86.34%   86.3%   -0.05%     
=========================================
  Files         197     197              
  Lines       44369   44404      +35     
=========================================
+ Hits        38311   38321      +10     
- Misses       6058    6083      +25
Impacted Files Coverage Δ
scapy/extlib.py 52.94% <0%> (ø) ⬆️
scapy/arch/pcapdnet.py 57.03% <0%> (ø) ⬆️
scapy/themes.py 79.15% <0%> (ø) ⬆️
scapy/layers/dhcp.py 87.34% <0%> (ø) ⬆️
scapy/data.py 91.77% <100%> (+0.74%) ⬆️
scapy/utils6.py 87.21% <100%> (ø) ⬆️
scapy/dadict.py 98.71% <100%> (+0.05%) ⬆️
scapy/error.py 92% <63.63%> (-8%) ⬇️
scapy/main.py 73.09% <70%> (-2.96%) ⬇️
scapy/config.py 84.56% <71.05%> (-2.05%) ⬇️
... and 11 more

@gpotter2 gpotter2 force-pushed the improvestartup branch 2 times, most recently from a4c877f to 74037b2 Compare April 29, 2019 17:22
@gpotter2 gpotter2 changed the title Console cleanup & Improvements Console & Config improvement Apr 29, 2019
@gpotter2 gpotter2 force-pushed the improvestartup branch 2 times, most recently from 17e38a4 to faf7ed2 Compare April 29, 2019 18:41
@gpotter2 gpotter2 force-pushed the improvestartup branch 2 times, most recently from ac7e5e6 to 7051d7d Compare May 9, 2019 22:21
@gpotter2 gpotter2 mentioned this pull request May 11, 2019
27 tasks
Copy link
Member

@guedou guedou left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cool PR. Thanks!

@guedou guedou merged commit 22f32cc into secdev:master May 30, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cleanup Performs some code clean-up enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants