Nov 30, 2016 01:59 AM
(This post was last modified: Nov 30, 2016 06:56 AM by Exsanity.)
So i have asked on discords for help as well and figured i'd take it to the forums i read that it might be due to mismatch if and fi or done without a for and all that but i tried putting fis and din't work might of put them in the wrong place
but the exact error i am getting is:
line 38: syntax error: unexpected end of file
I am new to batch (like legit 2 days) so excuse my beginner mistake(s)
My Code:
#!/bin/bash
echo "This program is meant only for simple and educational/personal uses"
echo "choose what you want!"
:menu
echo "[1] Check for Certain Port"
echo "[2] Scan all Open Ports"
echo "[3] Scan Tool"
echo "[4] Close the Program"
echo
set /p mc="What would you like to do: "
if %mc%==1 goto 1
if %mc%==2 goto 2
if %mc%==3 goto 3
if %mc%==4 goto 4
if %mc% > 4 || %mc% < 1
echo Invalid Number Entered you entered %mc% not 1 - 4 try agin
goto menu
:1
echo Not Set Up Yet
goto menu
:2
echo Not Set Up Yet
goto menu
:3
echo work or some shit
if exist %userprofile%\Desktop\%NSL%_info.txt del %userprofile%\Desktop\%NSL%_info.txt
set /p NSL="Enter IP: "
echo Scanning %NSL% > %userprofile%\Desktop\%NSL%_info.txt
nslookup %NSL%
echo All of this info will be placed on your desktop
wait 9
goto menu
:4
echo Closing...
exit
but the exact error i am getting is:
line 38: syntax error: unexpected end of file
I am new to batch (like legit 2 days) so excuse my beginner mistake(s)
My Code:
#!/bin/bash
echo "This program is meant only for simple and educational/personal uses"
echo "choose what you want!"
:menu
echo "[1] Check for Certain Port"
echo "[2] Scan all Open Ports"
echo "[3] Scan Tool"
echo "[4] Close the Program"
echo
set /p mc="What would you like to do: "
if %mc%==1 goto 1
if %mc%==2 goto 2
if %mc%==3 goto 3
if %mc%==4 goto 4
if %mc% > 4 || %mc% < 1
echo Invalid Number Entered you entered %mc% not 1 - 4 try agin
goto menu
:1
echo Not Set Up Yet
goto menu
:2
echo Not Set Up Yet
goto menu
:3
echo work or some shit
if exist %userprofile%\Desktop\%NSL%_info.txt del %userprofile%\Desktop\%NSL%_info.txt
set /p NSL="Enter IP: "
echo Scanning %NSL% > %userprofile%\Desktop\%NSL%_info.txt
nslookup %NSL%
echo All of this info will be placed on your desktop
wait 9
goto menu
:4
echo Closing...
exit

