Yes
No
For security measures I suggest you use Netcat (a.k.a. nc) or take a look at its source.
Here is a batch file example named passnc comprised of five parts:
I. connectnc.bat <- Local computer
@cls
@color 8
@echo.
@echo -----------------------------------------
@echo USAGE: connectnc.bat [password]
@echo -----------------------------------------
@echo.
@echo %1 | nc -vv 127.0.0.1 42 -w 1
@echo Authorizing ...
@echo.
@nc -vv 127.0.0.1 43
@color
@cls
@echo.
@echo -----------------------------------------
@echo Disconnected
@echo -----------------------------------------
II. downps.txt <- Server
~leave blank~
III .pass.txt <- Server
*PASSWORD*
IV. passnc.bat <- Server
@cls
@type NUL > downps.txt
@echo.
@echo -------------------------------------------
@echo PASSNC is listening on port 42.
@echo -------------------------------------------
@echo.
:START
@nc -l -p 42 > downps.txt
@fc downps.txt pass.txt | find /i "FC: no differences encountered" > nul
@if errorlevel==1 goto WRONG
@color 8
@echo Access Granted on %date%-%time%
@type NUL > downps.txt
@echo.
@nc -l -p 43 -e cmd.exe
@goto START
:WRONG
@color fc
@echo Access Denied on %date%-%time%
@echo.
@type NUL > downps.txt
@goto START
V. Netcat itself (~60kb) <- Server
Don't forget to adjust the password file, ip address and the port number![]()
Last edited by Resinball; August 29th, 2007 at 08:04 PM.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks