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

Fix run with progress and add new Run function #69

Merged
merged 8 commits into from
Feb 2, 2021
Merged

Fix run with progress and add new Run function #69

merged 8 commits into from
Feb 2, 2021

Conversation

elivlo
Copy link
Collaborator

@elivlo elivlo commented Jan 28, 2021

Hi,

I fixed the function RunWithProgress because there was a memory leak (line 212) when cancelling the context before the scan was finished.
I also added a new "Run" type of funtion (RunWithStreamer) that writes the xml-output directly to a file.

  • This will prevent huge memory usage when running long scans.
  • It also enables the standard nmap output to monitor the current nmap status.
  • When the scan is finished the file can be parsed.

There is also an example showing how to run this type of scan.

Best regards!

P.S.
I would also appreciate a new tag :-)

Copy link
Owner

@Ullaakut Ullaakut left a comment

Choose a reason for hiding this comment

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

Hi @elivlo ! Thanks for your continued interest in the project :) I haven't had much time to work on it these days so I really appreciate your help. Would you like to become maintainer of the project?

I have some minor suggestions for this specific PR but the idea seems good to me. I did not test it yet though.

examples/basic_scan_streamer_interface/main.go Outdated Show resolved Hide resolved
examples/basic_scan_streamer_interface/main.go Outdated Show resolved Hide resolved
examples/basic_scan_streamer_interface/main.go Outdated Show resolved Hide resolved
nmap.go Outdated Show resolved Hide resolved
nmap.go Outdated Show resolved Hide resolved
nmap.go Outdated Show resolved Hide resolved
nmap.go Show resolved Hide resolved
nmap_test.go Show resolved Hide resolved
@elivlo
Copy link
Collaborator Author

elivlo commented Jan 29, 2021

Hi @elivlo ! Thanks for your continued interest in the project :) I haven't had much time to work on it these days so I really appreciate your help. Would you like to become maintainer of the project?

I have some minor suggestions for this specific PR but the idea seems good to me. I did not test it yet though.

Hi, let me say it is an honour for me to have the opportunity to become a maintainer! I would really appreciate it! But I also cannot say how much time I'm able to spend for maintaining. I will try my best.

@Ullaakut
Copy link
Owner

@elivlo I've sent you an invite, and no worries, no strings attached :) This way though, you can even create the tag directly once this gets merged 👍

@elivlo elivlo added the enhancement New feature or request label Jan 29, 2021
@elivlo
Copy link
Collaborator Author

elivlo commented Feb 1, 2021

@Ullaakut Hi, I have resolved your suggestions.

  • I also added a few lines in the .travis.yml script. Hopefully this resolves the CI errors.

@elivlo elivlo self-assigned this Feb 1, 2021
Copy link
Owner

@Ullaakut Ullaakut left a comment

Choose a reason for hiding this comment

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

A few more minor suggestions, but for me the test is fine as is even if we're not at 100% coverage :) Good job!

nmap.go Outdated Show resolved Hide resolved
nmap.go Outdated Show resolved Hide resolved
nmap_test.go Outdated Show resolved Hide resolved
nmap_test.go Outdated Show resolved Hide resolved
nmap_test.go Outdated Show resolved Hide resolved
@elivlo elivlo requested a review from Ullaakut February 1, 2021 13:31
Copy link
Owner

@Ullaakut Ullaakut left a comment

Choose a reason for hiding this comment

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

LGTM, thanks for your contribution :)

@Ullaakut Ullaakut merged commit 31c0084 into Ullaakut:master Feb 2, 2021
@elivlo elivlo deleted the enhance-and-fix-run-with-progress branch February 2, 2021 09:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants