codingo / Interlace

Easily turn single threaded command line applications into a fast, multi-threaded application with CIDR and glob support.
GNU General Public License v3.0
1.21k stars 179 forks source link

Forward slashes in targets.txt breaks output file functionality #63

Closed naterobbified closed 5 years ago

naterobbified commented 5 years ago

Hi,

I'm working with a targets.txt file which includes targets like the following: http://example2.com http://example3.com http://example4.com

When I run the following command:

interlace -tL targets.txt -threads 5 -c "python3 dirsearch.py -e php,aspx -u _target_ > /home/_target_-dirsearch.txt" -v --no-cidr

It doesn't work, as it attempts to write files with file names like: "http://example2.com/-dirsearch.txt"

As forward slashes aren't allowed in filenames, the command fails. Perhaps i'm overlooking a possible workaround, but any help would be appreciated.

Thanks

codingo commented 5 years ago

Nice pickup, I think given we have _proto_ the solution will be to just strip http:// and https:// from targets when they're added to a target file, thoughts?

prodigysml commented 5 years ago

This definitely is a bug. Frankly, without context we can't really sanitize a target for the filename. I'll have a chat with @codingo and come up with a solution.

prodigysml commented 5 years ago

@naterobbified , I had a quick chat with @codingo , and we decided to add in a new variable named _cleantarget_ which will clean the target variable for all /s. I'll likely tackle this issue very soon. This definitely was an oversight! Good catch mate!

naterobbified commented 5 years ago

Sounds good guys, thanks for the quick response! Excited to try out the tool with my workflow.

codingo commented 5 years ago

Close with #73