This repository was archived by the owner on Nov 29, 2021. It is now read-only.
Fix progress and improvements. - #101
Merged
Merged
Conversation
Add new status init for the new scan still not launched. Update the test accordingly.
Codecov Report
@@ Coverage Diff @@
## master #101 +/- ##
==========================================
- Coverage 67.38% 67.37% -0.01%
==========================================
Files 8 8
Lines 1533 1548 +15
==========================================
+ Hits 1033 1043 +10
- Misses 500 505 +5
Continue to review full report at Codecov.
|
This improve target handling and make easier to work with legacy targets. Update tests accordingly.
Also fix an issue which finished target forced others scans to stop.
bjoernricks
suggested changes
Apr 15, 2019
bjoernricks
left a comment
Contributor
There was a problem hiding this comment.
Only one small mistake Dict instead of dict
| if self.data_manager is None: | ||
| self.data_manager = multiprocessing.Manager() | ||
| if not options: | ||
| options = Dict() |
Contributor
There was a problem hiding this comment.
Suggested change
| options = Dict() | |
| options = dict() |
| return self.scans_table[scan_id]['target_progress'] | ||
| total_hosts = len(target_str_to_list(target)) | ||
| host_progresses = self.scans_table[scan_id]['target_progress'].get(target) | ||
| t_prog = sum(host_progresses.values()) / total_hosts |
Contributor
There was a problem hiding this comment.
Could you check and ensure that total_hosts will never be zero?
| @@ -202,14 +215,11 @@ def get_end_time(self, scan_id): | |||
|
|
|||
| def get_target(self, scan_id): | |||
Contributor
There was a problem hiding this comment.
Personally I would rename the method to get_targets or get_target_list.
bjoernricks
approved these changes
Apr 15, 2019
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.