Skip to content

Comments

Add ability to comment input and strip before parsing#472

Merged
Mzack9999 merged 6 commits intoprojectdiscovery:mainfrom
ddfault:main
Sep 6, 2024
Merged

Add ability to comment input and strip before parsing#472
Mzack9999 merged 6 commits intoprojectdiscovery:mainfrom
ddfault:main

Conversation

@ddfault
Copy link
Contributor

@ddfault ddfault commented Aug 7, 2024

Hello! Fixed some typos. I am using source files where I want to comment IP/CIDR so I know what or where something came from. Added a integration test with some comments. Example input such as:

commentexample.txt

127.0.0.2 # This is another loopback address
127.0.0.1   #another comment with more spaces
127.0.0.3#another comment with no space between 

Usage: mapcidr.exe -cl commentexample.txt -a

Or
127.0.0.1 #comment 1,127.0.0.2 # another comment, 127.0.0.3#comment with no space
Usage: mapcidr.exe -cl "127.0.0.1 #comment 1,127.0.0.2 # another comment, 127.0.0.3#comment with no space"

ddfault added 4 commits August 7, 2024 17:00
Strip # comments and whitespace from input file if line has #
example
127.0.0.1  #sample comment
Added test for input with comment.
Fixed typos
When fixing typos forgot integration test for comments.
fixed minor spacing typo
@GeorginaReeder
Copy link

Great, thank you for your contribution @ddfault !

@ddfault
Copy link
Contributor Author

ddfault commented Aug 12, 2024

Not a problem. Is this good to go or do you need more from me on this pull request? I believe the errors in Build tests are unrelated to my code changes.

@Mzack9999 Mzack9999 self-requested a review September 4, 2024 16:22
@Mzack9999 Mzack9999 merged commit 6d9d9ec into projectdiscovery:main Sep 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants