Jump to content

What does this do in CMD

NoHamNoJam
Quote

echo off
echo Welcome
CLS
title Pranked
a
start cmd.exe @cmd /k "ping localhost -t"
goto a

A friend of mine sent me this he had pranked me before with opening infinite CMDs and this time I out witted him and pressed 'Edit' before opening any way what does this do

Link to comment
Share on other sites

Link to post
Share on other sites

start cmd.exe

goto a

start cmd.exe

and so on

Link to comment
Share on other sites

Link to post
Share on other sites

This script is an infinite loop opening CMD´s and pinging the local host address. Actually pretty boring ;D 

Link to comment
Share on other sites

Link to post
Share on other sites

Basically, it starts another cmd.exe over and over again and does a command.

"We're all in this together, might as well be friends" Tom, Toonami.

 

mini eLiXiVy: my open source 65% mechanical PCB, a build log, PCB anatomy and discussing open source licenses: https://linustechtips.com/topic/1366493-elixivy-a-65-mechanical-keyboard-build-log-pcb-anatomy-and-how-i-open-sourced-this-project/

 

mini_cardboard: a 4% keyboard build log and how keyboards workhttps://linustechtips.com/topic/1328547-mini_cardboard-a-4-keyboard-build-log-and-how-keyboards-work/

Link to comment
Share on other sites

Link to post
Share on other sites

10 minutes ago, NoHamNoJam said:

This time I outwitted him

Not yet.

Tip to those that are new on LTT forum- quote a post so that the person you are quoting gets a notification, otherwise they'll have no idea that you did. You can also use a tag such as @Ryoutarou97 (replace my username with anyone's. You should get a dropdown after you type the "@")to send a notification, but quoting is preferable.

 

Feel free to PM me about absolutely anything be it tech, math, literature, etc. I'll try my best to help. I'm currently looking for a cheap used build for around $25 to set up as a home server if anyone is selling.

 

If you are a native speaker please use proper English if you can. Punctuation, capitalization, and spelling are as important to making your message readable as proper night theme formatting is.

 

My build is fully operational, but won't be posted until after I get a GPU in it and the case arted up.

Link to comment
Share on other sites

Link to post
Share on other sites

Worst case, it will basically attempt to DDOS and/or forkbomb your PC if you run it, with the first window changing its title to "Pranked."

 

Echo off means it won't repeat commands

Echo "some string" will print that string

cls will clear the screen.

a and goto a are a label and a loop command

cmd /k spawns a new command line process that runs the command written in the rest of the string.

ping -t pings until

 

So this process will spawn pings as fast as it is able, assuming the root script loops regardless of what its child processes are doing.

 

But that's an assumption. It might never get to the loop because it waits for the child cmd.exe session to finish. In that case instead it would just ping localhost in a single process and not spawn multiple copies, but once you closed and exited that ping, it WOULD loop and the ping would just start up again. Not hard to get rid of, definitely annoying, but not a computer-crashing event.

Link to comment
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×