@echo off
rem Variables
set
echo.
echo Randlan #11
echo.
echo Coded by Sebastian
echo.
pause
cls
echo.
echo Randlan #11
echo.
echo Coded by Sebastian
echo.
set /p mapnetworkdrives=Would you like to map a network drive to the path to DC++? (Y/N)
if mapnetworkdrives==Y set /p dcplusplusdrive=What drive letter would you like to map DC++ to? (A-Z) Please remove the collon and bracket:
set /p
if mapnetworkdrives==Y net delete %dcplusplusdrive%
if mapnetworkdrives==Y net use %dcplusplusdrive% \\randlan\PATHTODC++
I did this in a minute or so. I'm bored. Continue? I was going to do it in perl or ruby but I would have to compile it and people wouldn't believe it wasn't infected blah blah blah. And if you don't understand MS-DOS/Batch. It basically asks hey guys want to do some LAN shit? It could also check for network connectivity using the following shit I digged up in by code folder:
@echo off
ECHO Checking connection, please wait...
PING -n 1 www.google.com|find "Reply from " >NUL
IF NOT ERRORLEVEL 1 goto :SUCCESS
IF ERRORLEVEL 1 goto :TRYAGAIN
:TRYAGAIN
ECHO FAILURE!
ECHO Let me try a bit more, please wait...
@echo off
PING -n 3 www.google.com|find "Reply from " >NUL
IF NOT ERRORLEVEL 1 goto :SUCCESS2
IF ERRORLEVEL 1 goto :TRYIP
:TRYIP
ECHO FAILURE!
ECHO Checking DNS...
ECHO Lets try by IP address...
@echo off
ping -n 1 216.239.37.99|find "Reply from " >NUL
IF NOT ERRORLEVEL 1 goto :SUCCESSDNS
IF ERRORLEVEL 1 goto :TRYROUTER
:TRYROUTER
ECHO FAILURE!
ECHO Lets try pinging the router....
ping -n 2 192.168.1.1|find "Reply from " >NUL
IF NOT ERRORLEVEL 1 goto :ROUTERSUCCESS
IF ERRORLEVEL 1 goto :NETDOWN
:ROUTERSUCCESS
ECHO It appears that you can reach the router, but internet is unreachable.
goto :FAILURE
:NETDOWN
ECHO FAILURE!
ECHO It appears that you having network issues, the router cannot be reached.
goto :FAILURE
:SUCCESSDNS
ECHO It appears that you are having DNS issues.
goto :FAILURE
:SUCCESS
ECHO You have an active Internet connection
pause
goto END
:SUCCESS2
ECHO You have an active internet connection but some packet loss was detected.
pause
goto :END
:FAILURE
ECHO You do not have an active Internet connection
pause
goto :END
:END
exit
I could just use the Find and Replace thing to change the IP and hostname/URL to the IP of the \\randlan server to check to see if you connected and then if your not it'll do a ipconfig /flush then /renew and then just disable network adapters and re-enable and shit like that.
Comments? Continue?