antmar904 Posted April 2, 2019 Share Posted April 2, 2019 (edited) Hi I have a txt file with a list of CIDR for my networks. I can read that txt file and get the networks into a array ($Networks[$i]). I would like to save each network scan to it's own txt file (exp: ScanResults\192.168.0.0_24.txt) I'm having issues with the nmap.exe syntax with AutoIT. The syntax should be: nmap.exe -oN <pathtologfile> <network or cidr> #include <Array.au3> #include <AutoItConstants.au3> #include <FileConstants.au3> Global $Networks = FileReadToArray(@ScriptDir & "\Networks.txt") ;_ArrayDisplay($Networks) ;Debug For $i = 0 to UBound($Networks) -1 Local $logfile = @ScriptDir & "ScanResults\" & $Networks[$i] & ".txt" RunWait('nmap.exe -oN "' & $logfile "' & $Networks[$i] '", "", @SW_HIDE, "") Next Edited April 2, 2019 by antmar904 Link to comment Share on other sites More sharing options...
Nine Posted April 2, 2019 Share Posted April 2, 2019 RunWait('nmap.exe -oN "' & $logfile & '" "' & $Networks[$i] & '"', "", @SW_HIDE, "") “They did not know it was impossible, so they did it” ― Mark Twain Spoiler Block all input without UAC Save/Retrieve Images to/from Text Monitor Management (VCP commands) Tool to search in text (au3) files Date Range Picker Virtual Desktop Manager Sudoku Game 2020 Overlapped Named Pipe IPC HotString 2.0 - Hot keys with string x64 Bitwise Operations Multi-keyboards HotKeySet Recursive Array Display Fast and simple WCD IPC Multiple Folders Selector Printer Manager GIF Animation (cached) Screen Scraping Multi-Threading Made Easy Link to comment Share on other sites More sharing options...
antmar904 Posted April 2, 2019 Author Share Posted April 2, 2019 @Nine That worked, thanks! Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now