m8sec / subscraper

Subdomain and target enumeration tool built for offensive security testing
GNU General Public License v3.0
792 stars 96 forks source link

Subscraper not writing output to file #5

Closed njmulsqb closed 3 years ago

njmulsqb commented 3 years ago

I am using subscraper on Parrot OS, it runs well and also says that subdomains written to output.txt, the file gets created but its always empty. any solution? I ve tried using sudo too

m8sec commented 3 years ago

Hi @najum98,

Does this happen every time?

How is the program exiting? running to completion or ctrl+c

Once valid subdomains are identified the SubReporter class is responsible for further output & reporting. This is performed in a separate thread, based of queues. More importantly, the report file should be opened during initialization of the class and closed before exiting. If the program exits before the file is properly close, this may result in a blank file.

I am overdue to take another look at the code and add some updates, so I can investigate further. Thank you for your help!

-m8r0wn

artgonline commented 3 years ago

Hi @m8r0wn, I had similar issue, but the reason was masked by the error in subscraper/subscraper/modules/dns_brute.py file, where isAlive is used instead of is_alive. Then subdomain bruteforcing would crash, but everything else continues to run. The results at the end wouldn't write though. Lemme create a PR for it.

m8sec commented 3 years ago

@artgonline,

Awesome, thank you for your help on this. PR made and can close this issue