You are not logged in.
hello brothers i want two bat codes one for ip with port like
127.0.0.1:80
and one for just ip
127.0.0.1
out of this scan result
#masscan
open tcp 80 127.0.0.1 1494962279
# end
i have tested this code
@echo off
cls
color b
title aa
for /f "eol=- tokens=1,2 delims= " %%A in ('type result.txt ^|find ^".^"') do (
IF [%%A] NEQ [Scan] (
echo %%A:%%B>>list.txt
)
)
but it gives me this result
open:tcp
open:tcp
Last edited by msalman (16 May 2017 20:51)
Offline
What output are you expecting?
If you're trying to get the output as 127.0.0.1:80 based on that scan result text, change your code to
for /f "eol=- tokens=3,4 delims= " %%A in ('type result.txt ^|find ^".^"') do (
IF [%%A] NEQ [Scan] (
echo %%B:%%A>>list.txt
)
)
Offline
and i also need just ip code
127.0.0.1
Offline
and i also need just ip code
127.0.0.1
Hi
You can try something like that :
@echo off
set "Result=result.txt"
set "IP_Port_Log=IP_Port.txt"
set "IP_Log=IP.txt"
If Exist "%IP_Port_Log%" Del "%IP_Port_Log%"
If Exist "%IP_Log%" Del "%IP_Log%"
For /f "eol=- tokens=3,4 delims= " %%A in ('type "%Result%" ^|find ^".^"') do (
IF [%%A] NEQ [Scan] (
echo %%B:%%A>>"%IP_Port_Log%"
echo %%B>>"%IP_Log%"
)
)
start "" "%IP_Port_Log%"
start "" "%IP_Log%"
Last edited by Hackoo (17 May 2017 15:40)
Offline
thanks brother great work done
Offline