Jump to content
antmar904

Help with RunWait Syntax (nmap.exe)

Recommended Posts

Posted (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 by antmar904

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...