Posted: Thu Jun 05, 2008 11:24 am Post subject: Re: [Tutorial] Using Shell commands in turing
well that just made me bite my tongue lol... thanks for the info tho
Posted: Thu Jun 05, 2008 3:42 pm Post subject: RE:[Tutorial] Using Shell commands in turing
Well, almost the exact code can be typed into any text program and saved as batch file. The only difference is that it works over networks and thus requires the computer's 'name'. In my compsci class, 9-10 kids found out how to open the remote shutdown dialog box, and were wreaking havoc in class. So I wiki'd remote shutdown and found the direct shutdown code, wrote one for every computer in the room, and shut down every person who had ever shut me down. I really had the upper hand, because they had to go to the dialog box and manually change settings, while I just had to click an icon! It didn't help that the computer names are all printed on the computer cases...
I did eventually delete all my codes and swap out my computer's hard drive to change the name. Now, when someone tries to shut me down, the computer of the very guy who started the whole shutdown thing will go off. They all think I implemented some genious code to cause codes to rebound of my computer!
Oh, and my friend wrote a code in turing that would delete all system files on the computer, so EXTREMELY malicious software can be created in turing.
Posted: Thu Jan 08, 2009 1:27 pm Post subject: Re: [Tutorial] Using Shell commands in turing
I have a question...I see it opens a new command window every time. I want to go to a directory to copy one file into another. I thought by default it would run the file from the directory the .t or .exe doing this is located in. Apperantly it doesn't so I would like it to run something like this:
I will obiously be reciving input for the name of the drive they're using to take into consideration some people may have it on another hardrive or partition, and a directory. Other than that the file already asks for the files being worked with. The code looks like this
put"This program is designed to embed one file into another.",skip,"Please make sure that the files are in the same directory as this program!",skip
put"Press any key to continue!"
put"Please enter the name of the file which will be embedded in the target file!",skip,skip,"File Name: "..
put"Please enter the name of the target file which will contain the file:",skip,skip,"File Name: "..
put"Please enter the name of the file that will be a product of the target file:",skip,skip,"File Name: "..
fin:="copy /b "+fileout+" + "+filein+" "+name
put"Embedding complete!",skip,skip,"Enter '1' to delete the original files or '0' to close this program: "..
Thanks for any help .
EDIT: I'm also unsure how to type something such as '\Administrator' in a put statment as I get the error "Illigal extended character in string literal". Anybody have a fix for this?
Posted: Thu Jan 08, 2009 3:17 pm Post subject: RE:[Tutorial] Using Shell commands in turing
is that what you want?
I'm also unsure how to type something such as '\Administrator' in a put statment as I get the error "Illigal extended character in string literal". Anybody have a fix for this?
Posted: Fri Jan 09, 2009 3:33 pm Post subject: Re: [Tutorial] Using Shell commands in turing
Not quite but that's a useful command to know. I want to know how to navigate to a directory, then excecute a comman which embeds one file with another. Basically if somebody could show me a quick example program on how to move one file to another location it would help...I just really need to be able to excecute 2 statments in the same command prompt.
Posted: Wed Jan 14, 2009 1:12 pm Post subject: Re: [Tutorial] Using Shell commands in turing
ReN3g@de @ Tue Mar 09, 2004 10:59 pm wrote:
You can use Shell commands in Turing and do such things as Restart, Shutdown, etc. LOL!! but be wise these commands could be used for evil things so use this information usefully!
First off here's the syntax:
system ( command : string, var ret : int )
Your Shell command goes in the command : string area
and the return variable goes in the var ret: int area.
For every command run there is an interger that is returned to determine if the command worked properly or if not then what went wrong...
var ret: int
This program will make the command prompt open
Here are the possible errors (the lines before the numbers are needed, they're negatives):
0 Works properly
-1 Not enough memory to load command.com
-2 Not enough memory to run command
-3 Argument list greater than 128 bytes or environment info
is greater than 32k
-4 Couldn't find command.com
-5 command.com is corrupt
-6 -noshell option is selected, the system procedure is
To interpret these errors you could set up an if statement to see whether the execution has worked...
var ret: int
if ret=-7 then
put "Command cannot be found"
some thing along these lines will do just fine!
var ret: int
system("shutdown -s -c message-here",ret)
This program will shutdown the computer...
the -s means shutdown you can change it to -r to reboot... but the -c must stau the same!
the message here part is a message that appers... because this form of shutting down makes a message prompt appear counting down 30 seconds till shut down and a message is written below. There cannot be any spaces or the command will not work!
Thats all for today boys and girls hope you liked it!!
My friend can do all this stuff in notepad.
Posted: Wed Jan 14, 2009 4:29 pm Post subject: RE:[Tutorial] Using Shell commands in turing
I doubt it. Notepad is a text editor, much like the one the Turing environment provides. You probably mean he can do this stuff by making batch (*.bat) files or similar.
Posted: Tue Oct 22, 2019 4:10 am Post subject: Re: [Tutorial] Using Shell commands in turing
Turing will probably tell you the internal ip address of your system, which is usually 192.168.1.1, When on the internet, you external IP address is given.
Posted: Fri Nov 29, 2019 8:55 am Post subject: RE:[Tutorial] Using Shell commands in turing
hey, just wondering, how would you get the output from the terminal and put it on the turing window?