EXPLOiTED
uh..been wonderin this...i remmber when rooting sql, instead of copying\pasting the echo cmds i just used osql.exe in a Batch and i hit enter to echo the next line. Now i wnated to know if theres some way to do this with Netcat like in a batch. uhm, im guessing something like this.

@echo off
echo [ -=- NetCat AutoText -=- ]

echo [+] Listening ...

NC.exe -l -v -p 55555

pause
echo blah >> C:\1.txt

pause
echo test >> C:\1.txt
pause
echo i wonder >> C:\1.txt


Get what im trying to do?
tweakz20
a better way to do it is have the first argument/option (%1) as the port instead of directly defining it in the code.. but whatever.. i don't know what the point of this is though,

QUOTE
pause
echo blah >> C:\1.txt

pause
echo test >> C:\1.txt
pause
echo i wonder >> C:\1.txt

...
if you just opened a shell on the other computer through netcat, the netcat shell will take over and your batch will wait until it's done (usually how it works with batch anyway...) so if that's the case, you would have to do that some other way
EXPLOiTED
the point of this is, so i dont hjave to copy 12 lines from a txt on my pc and paste them in the Netcat shell.
Blackknight
Make a c or perl program that gets input using scanf to input a line or something similar.. I dont think its possible with netcat to pause and continue tongue.gif
Seems like your just making a bound port that puts the next line in after enter is recieved.. just use getc to check for enter and use fgets to grab the lines from a file dry.gif
psykotikpenguin
It works if you have all of your comands in a separate text file (like C:\1.txt for example) and you start netcat like this: NC.exe -l -v -p 55555 < C:\1.txt. When you get a reverse connection shell it will input all of the commands for you. I'm not sure about having a pause in between commands though.
Stephen79
Using XP, I cant paste anything in to a remote shell, yet it worked when using W2K. Anyone know a work around for that one?
daguilar01
QUOTE (Stephen79 @ May 12 2004, 03:01 AM)
Using XP, I cant paste anything in to a remote shell, yet it worked when using W2K. Anyone know a work around for that one?

right click the cmd prompt title area, go down to edit, and there you have all your copy, paste, mark, etc
Qlimax
try to open the NetCat from CMD window...
Stephen79
QUOTE (daguilar01 @ May 12 2004, 05:53 PM)
QUOTE (Stephen79 @ May 12 2004, 03:01 AM)
Using XP, I cant paste anything in to a remote shell, yet it worked when using W2K.  Anyone know a work around for that one?

right click the cmd prompt title area, go down to edit, and there you have all your copy, paste, mark, etc

arh right. cheers... will give that a try next time wink.gif

F34R
Great stuff, I'll check this out. Been looking for an answer to my copy/pasting woes smile.gif
Major Chrome
In those options click quick edit, then you can just right click in the CMD Window and it will paste.
tweakz20
major chrome, a right click in 2k will paste something, but not XP... in the XP shell, I do right-click\paste anywhere in the box but not the title bar or side scroll bar (screw the edit stuff lol)

thanks for that < c:\text.txt trick, it'll probably come in handy smile.gif
nuorder
QUOTE (tweakz20 @ May 16 2004, 12:39 AM)
major chrome, a right click in 2k will paste something, but not XP

yes you can just enable quick edit mode in cmd properties
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.

 
Invision Power Board © 2001-2005 Invision Power Services, Inc.