Stratus-Security / Subdominator

The Internets #1 Subdomain Takeover Tool
https://www.stratussecurity.com
MIT License
193 stars 15 forks source link

System.IO.IOException: Too many open files: '/home/UserName/Documents/takeoers.txt' #8

Open mailler0xa opened 1 month ago

mailler0xa commented 1 month ago

Hello, I would like to, first of all, thank you for this making this incredibly fast tool.

I would also like to report a 'weird' observation:

There is this error that I have observed occurring on Google cloud-shell (https://shell.cloud.google.com/?show=ide%2Cterminal).

System.IO.IOException: Too many open files : '/home/stewardmailler/Documents/takeovers3.txt'
   at Interop.ThrowExceptionForIoErrno(Interop.ErrorInfo, String, Boolean) + 0x19
   at Microsoft.Win32.SafeHandles.SafeFileHandle.Open(String, Interop.Sys.OpenFlags, Int32, Boolean, Boolean&, Func`4) + 0x13f
   at Microsoft.Win32.SafeHandles.SafeFileHandle.Open(String, FileMode, FileAccess, FileShare, FileOptions, Int64, UnixFileMode, Int64&, UnixFileMode&, Boolean, Boolean&, Func`4) + 0x11c
   at System.IO.File.OpenHandle(String, FileMode, FileAccess, FileShare, FileOptions, Int64) + 0x96
   at System.IO.File.WriteToFile(String, FileMode, String, Encoding) + 0x81
   at Subdominator.Program.<CheckAndLogDomain>d__5.MoveNext() + 0x674

I can't reproduce it locally on Windows (might it be related to ulimit issues?). Also, it just force closes on azure 1GB RAM vms (will try to split the subdomains in half and then observe). The subdomains file had 6M subdomains. However, the error doesn't stop the program from functioning. Is it possible to fixed on the program itself?

Regards.

coj337 commented 3 weeks ago

@mailler0xa This should be fixed now in v1.68, turns out it smashed file handles on UNIX if you have lots of results quickly but Windows handled it well. Let me know if it's not fixed and I'll investigate deeper 😄