blechschmidt / massdns

A high-performance DNS stub resolver for bulk lookups and reconnaissance (subdomain enumeration)
GNU General Public License v3.0
3.05k stars 456 forks source link

Error while running scripts/recon.py #144

Closed omaramin17 closed 11 months ago

omaramin17 commented 11 months ago

I tried to run the script on different systems, but I always encounter the same issue.

root@ubuntu-s-1vcpu-1gb-amd-sfo3-01:~/massdns/scripts# python3 recon.py -d google.com -l /root/massdns/lists/names.txt -w output.txt 
SOA for google.com: google.com.
google.com nameservers: ns3.google.com, ns1.google.com, ns2.google.com, ns4.google.com
google.com nameserver IP addresses: 216.239.32.10, 216.239.36.10, 216.239.34.10, 216.239.38.10
All nameservers are up.
The nameserver does not return NOERROR for non-existing domains.
Writing enumeration input file ...
MassDNS enumeration ...
100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 100998/100998 [00:04<00:00, 23577.24it/s]Output processing ...
Traceback (most recent call last):
  File "/root/massdns/scripts/recon.py", line 563, in <module>
    asyncio.run(main())
  File "/usr/lib/python3.10/asyncio/runners.py", line 44, in run
    return loop.run_until_complete(main)
  File "/usr/lib/python3.10/asyncio/base_events.py", line 649, in run_until_complete
    return future.result()
  File "/root/massdns/scripts/recon.py", line 416, in main
    with MultiFileLineReader([output_path + str(i) for i in range(0, cpu_count)]) as f:
  File "/root/massdns/scripts/recon.py", line 184, in __enter__
    self.handles = [open(file) for file in self.files]
  File "/root/massdns/scripts/recon.py", line 184, in <listcomp>
    self.handles = [open(file) for file in self.files]
FileNotFoundError: [Errno 2] No such file or directory: '/tmp/massdns_google.com_5hz_wgyv/output0'
blechschmidt commented 11 months ago

One CPU is a special case that is not handled properly by the script at the moment. For a quick fix, try a droplet with more than one CPU. I will push a proper fix this afternoon.

blechschmidt commented 11 months ago

658695073007886ca68728c055e49e3f6810f0e1 should fix this.

omaramin17 commented 11 months ago

Yup, it works on a higher-spec machine. Thanks!