Jump to content
Sign in to follow this  

Help with RunWait Syntax (nmap.exe)

Recommended Posts


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\

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, "")


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
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Create New...