4/10/2024 0 Comments Exit ssh session puttySet /p KEYCACHE=Scan and cache SSH key (y/n) ? Type "nmap_temp2.txt" | repl " " "" > %IPFILE% Rem remove hidden space at end of IP (requires "repl" be in the batch file directory) Rem nmap formatting is not correct, the following removes extra infoįor /f "tokens=2" %%A in (nmap_temp.txt) do echo %%A > nmap_temp2.txt Nmap -open -n -p22 %RANGE% -oG - | findstr /E Up > nmap_temp.txt Nmap -open -n -p22 -iL %IPFILE% -oG - | findstr /E Up > nmap_temp.txt Rem Check whether IP type is "range" as nmap cannot read an IP range from file and must be type directly in nmap command Set /p SCAN=Do Nmap scan first? (recommended): Rem You must modify the CACHEKEY and SCRIPT section to reflect your SSH key locationĮCHO (Working directory is set to C:\Program Files\PuTTY\scripts\)ĮCHO Enter the IP range(s) as in the following example. This is mostly useful for having a single script (such as updating an SSL certificate) across a range of machines. The nmap and PuTTY working directories are in your command path.Batch scripts and IPlist files are installed in C:\Program Files\PuTTY\scripts\. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |