![]() |
|
|
|
Thread Tools | Display Modes |
|
|
|
|
#1 |
|
Newbie
Join Date: May 2006
Posts: 0
Rep Power: 0
![]() |
We all use (or have used) Command Prompt in one point of our lives.
I have been racking my brains and draining the internet for diffrent commands, because cmd is a pretty efficient tool for doing things in Windows. Here they are. Do whatever you want with them, i dont care just keep in mind i copied and pasted some of these. CommandPrompt trick and Commands Getting Ip's:-- To see the ip all computers you are connected to (web servers, people attempting to hack into your computer). Go to dos (start>run>type command) and run the netstat command. Type netstat /? for details. Type netstat -r at the command prompt to see the ip of all computers you are connected to In MSN (and other programs) when you are chatting to someone everything you type goes through the MSN servers first (they act as a proxy) so you see their ip rather than who you are chatting to. You can get round this by sending them a file as MSN doesn't send file through its proxy. When you type the netstat -r (or -a for a different view) the ip's are under the foreign address table. The ports are seperated by a : . Different programs use different ports, so you can work out which ip's are from which program. Connecting to other computers and what ports are:-- Servers send information. Clients retrieve. Simple. Windows comes with a built in program to connect to other computers called telnet. To start Windows telnet Start menu> Run> type Telnet. Click connect> remote system Ports are doors into computers. Hosts are computer names (ip number or a name that is translated into the ip automatically) Different programs open different ports, but they always open the same ports so other computers know which port to connect to. You can get a port list listing all the different ports, but a basic one is: 11 :- Sends info on the computer 21 :- FTP (File transfer program) 23 :- Telnet (Login to the computers command line) 25 :- Smtp (Sends mail) 80 :- Http (Web pages) There are thousands of different programs using different ports. You can get programs called portscanners which check a computer for all ports up to a certain number, looking for ways in. You can portscan a computer looking for ways-in. Anyway, back to telnet. Type www.yahoo.com as the host and port as 80 the click connect. If nothing happens, you're in. Wow. You are connected to Yahoo's server. You can now type http commands (you are connected to an http server, so it supports http commands). Ie. on an ftp server you can type open and it will do something. On an http server it will just wonder what the hell you are on about. Type get / http/1.0 then press enter twice to get the file on the server at / (try /index.html) etc.) Allowing dos and regedit in a restricted Windows See http://blacksun.box.sk/tutorials/for...e=windows.html for some very cool tactics. A very simple tactic I found after accidentally locking myself out of dos and regedit is to open notepad and type the following: REGEDIT4 [HKEY_CURRENT_USERSoftwareMicrosoftWindowsCurrentVersionPoliciesWinOldApp] "Disabled"=dword:0 [HKEY_CURRENT_USERSoftwareMicrosoftWindowsCurrentVersionPoliciesSystem] "DisableRegistryTools"=dword:0 Save it as something.reg then run it. Simple. Making undeletable, unreadable folders Tested on Windows 95/98 By holding down alt, then typing numbers on the number pad (right of the keyboard) you can create special characters. If you hold down alt, then press 1, then let go, you got the ascii character 1. You try some randomn numbers. This goes all the way up to 255. Open a dos prompt, and type md (alt+1+9+4)someword. md is the dos command to make a directoy, now try and open the directory in Windows, you can't. To open it, type ren (alt+1+9+4)someword someword (ren is the dos command to rename) Proxies Proxies are computers that you connect through, hiding your computer. Most aren't anonymous, they give away your ip. Some are. Good anonymous proxies: mail.uraltelecom.ru:8080 and 194.247.87.4:8080. Different programs require different ways of using proxies. To do it in internet explorer 5 go to tools, internet options, connections, settings. In the above proxies they are in the format host:port Password files If you lock yourself out of Windows stuff, all passwords are stored in files called *.pwl in C:windows. Download showpass.zip from hereto view all passwords stored. Or rename the files to .bak to delete passwords. In Unix, passwords are normally stored at etc/passwd. This can be viewed using the cat command (prints a file to screen): cat etc/passwd. Make sure you're passwords are shadowed (not actually in etc/passwd). Also make sure they aren't in a file called shadow, especically not in a file called etc/shadow. Unix passwords are encrypted far better than Windows one's (to be fair, Windows 95 isn't designed for users), but can still be cracked through a program called jon. See here. Securing your website Ftp Ftp is how you upload your web site, if somone finds out the password they can add/ delete anything. Brute forcing is the most common ftp attack, where a program guesses every possible combination (or from a list of words). An eight letter alpha-numeric word is almost impossible to crack, as the process is slow. The real problem is with server side scripting. Pages other than plain html (ie. pages that perform commands on the host) are a security risk. The main problems are scripts that write to pages (guestbooks etc.). If when the guestbok is viewed it has a .shtml extension, then it can execute commands. Eg. a malicious visitor could place the following shtml command in a messege: #exec cmd="cat /etc/group" <br><br> <center> <a href="go2.htm"> <img src="http://www.afcyhf.com/image-1161560-9260046" width="720" height="300" alt="GoToMyPC - Access Your PC from Anywhere" border="0"> </a><br> [<a href='javascript:window.external.AddFavorite("http://www.how-to.tk","How-to Tutorials")'> <img src=pic/favourite.gif border=0> Add to favourites</a>] [<a href=?page_name=links>Links</a>] [<a href="?page_name=privacy policy">Privacy</a>] [<a href=?page_name=disclaimer>Disclaimer</a>] [<a href=?page_name=contact>Contact</a>] [<a href=?page_name=help>Help</a>]<br> How-to.tk is interactive: Any one can add or edit a page: [<a href=edit.php>Create a page</a>] [ <script>document.write("<A class=menu tabIndex=121 href='edit.php?page_name=",document.all.page_name.value,"&category=",document.all.category.value,"'>");</script> Edit this page</A>]<br> Groovyweb tutorials-<a href=http://www.how-to.tk><i>www.how-to.tk</i></a></td> </table></td></table></html> <script language='javascript'>postamble();</script> Windows 2000 Command Prompt Auto Complete This trick helps to avoid headaches when using the command prompt console. It turns on the auto-complete feature so that when you type 'cd d' and hit the tab key, the console displays a list of folders that begin with the 'd' letter, and you can then choose the one you're looking for, right from the console instead of typing its path. 1.Log on as Administrator, 2.Click Start, and then click Run, 3.Type Regedit and OK, 4.Double click HKEY_LOCAL_MACHINE, 5.Double click SOFTWARE, 6.Double click Microsoft, 7.Double click Command Processor, 8.In the right pane of Regedit, double click the 'CompletionChar' DWORD value, 9.Type 9 click OK, 10.Close Regedit, 11.Click start/programs/accessories/command prompt, 12.Type 'cd d' and hit the Tab key: the first folder that matches the 'd' letter is displayed (you can choose folders by using the Tab key). Command Line Tricks I am a self confessed Command Line Junkie. Here are a few tricks I use commonly that I can think off the top of my head. 1. Find a file on your hard disk - (This beats the Search doggie in Windows) dir filename /s 2. Find a file on your hard disk without all the directory info goo - dir filename /s/b 3. Find a directory - dir dirname /s /ad 4. Move between directories easily C:\Documents and Settings\Sahil Malik>pushd . C:\Documents and Settings\Sahil Malik>cd \ C:\>popd C:\Documents and Settings\Sahil Malik> 5. A better prompt for PushD and PopD via Craig Andrea. 6. Hit Tab for directory/filename compleition 7. Press F7 for a previous command list. User Cursor keys to select the command you need. 8. View all environment variables SET 9. View only system variables that start with W Set W 10. View a particular env. variable ECHO %WINDIR% 11. Find what process has opened what port netstat -noa 12. Widen your command prompt. mode 120,100 13. View your TCP/IP settings. netsh interface ip show config 14. Weird looking colors color 8f .. Enough for a day? :-) ... 5:43 AM .. I need to get started on some work I need to get done .. LOL. Courtesy Frans Bouma -- 15. Find a string in a list of files, for example "Foo" in all .cs files in your project tree: dir /b /s *.cs|findstr /f:/ "Foo" .. a better version brought forth by Craig Andrea findstr /i /s "foo" *.cs (You might know that the windows search doggie does an awful job at search thru files). Clearing Windows DNS Resolver Cache Posted in Tips and Tricks by Brady on the June 10th, 2005 Occasionally, my cable modem from Time Warner decides it doesn’t wanna work. Actually, it happens a few times a day and I have to recycle the modem (unplug power, wait 30 seconds, plug back in) for it to find the connection again. It drives me insane because it likes to drop the connection exactly when I’m gonna do something mildly important. I’ve called TWC about getting another modem, but I gotta answer all these stupid questions from the support guys who pretend it’s my router or my fault somehow, and I’m just too lazy to drive across town to pick up another one. It wouldn’t be super bad, but once I’m back online, I can’t connect to any sites that I attempted to go to while the connection was down because Windows XP keeps bad responses from websites in the DNS Resolver Cache for 5 minutes. So here’s a fix for anyone else experiencing the same problems. Open a command prompt by clicking the “Start” button, then click “Run…“. In the command prompt, type this: ipconfig /flushdns and press Enter. That’s all there is to it. If you don’t like the command prompt, you can go to Start->Settings->Control Panel->Administrative Tools->Services then click DNS Client and restart it. I googled DNS Cache after writing this post and found this page that has more information, along with a Registry Tweak to keep WinXP from caching negative responses: DNS Resolver Cache By Vic Laurie Typing DOS commands on the Windows Command Line prompt is a most efficient and faster way of doing things in Windows XP. Here's a run-down of the most useful DOS commands available in Windows XP. Some of these DOS commands even do not have an visual alternative. DOS Command-line tools must be run at the prompt of the Cmd.exe command interpreter. To open Command Prompt, click Start, click Run, type cmd, and then click OK. ipconfig - Windows IP configuration Useful for troubleshooting your internet connection. Displays the current IP address of your computer and the DNS server address. If you call your ISP for reporting a bad internet connection, he will probably ask you to run ipconfig. fc - Free BeyondCompare in XP FC is an advanced DOS Command that compares two files and displays the differences between them. Though the file comparison results are not as interactive as BeyondCompare or Altova DiffDog, fc is still very useful. You can even set fc to resynchronize the files after finding a mismatch. type - open text files sans Notepad Similar to Unix cat command, Type is my favorite DOS command for displaying the contents of a text files without modifying them. When used in combination with more switch, type splits the contents of lengthy text files into multiple pages. Avoid using the type command with binary files or you'll hear alien PC beeps and see some greek characters on your PC. ping - Say hello to another computer Ping network command followed by the web-address or IP address tells you about the health of the connection and whether the other party is responding to your handshake request. Ping tool can also be used to convert the web address to a physical IP address. tree - visual directory structure You often need to take prints of your physical directory structure but XP has no simple "visual" commands for printing directory contents. Here, try the Tree DOS command and redirect the output to a text file. tree > mydirectory.txt print mydirectory.txt attrib - make hidden files visible Attrib lets you change attributes of System files and even hidden files. This is great for troubleshooting Windows XP. Say your XP doesn't boot ever since you edited that startup boot.ini file (Hidden), use attrib to remove the Hidden attibute and edit the file using EDIT dos command. assoc - which program will open that .xyz file The assoc DOS command can be used to either isplay or even modify the file name extension associations. The command assoc .htm will quickly tell you the name of your default web browser (see picture) move - more flexible than copy-paste Say you got a lot of XLS and DOC files in you MyDocuments folder and want to move only those XLS files that have their name ending with 2006. In XP Explorer, you have to manually select each file and then cut-paste to another folder. However, the DOS move command make things much simpler. Just type the following at the command prompt: move *2006.xls c:\2006Reports\ find - advanced file search with filter Find is the most powerful DOS command and even more useful than the Windows Desktop Search tool or the Windows Find Wizard. The find command searches for a specific string of text in a file or files. After searching the specified file or files, find displays any lines of text that contain the specified string. To search your hard disk to find and display the file names on drive C: that contain the string "Google" use the pipe (|) to direct the results of a dir command to find as follows: dir c:\ /s /b | find "Google" Quick tip - Drag to avoid typing: When your command acts on a file or folder, you must type the path to that folder after the command. You can save typing time by dragging the file or folder from Windows Explorer into the command window. To view help at the command-line, at the command prompt, type the following: CommandName /? OMFG A SITE FULL OF COMMAND PROMPT STUFF http://www.mdgx.com/ I recently have learned some neat things todo with the command prompt these are some of the things I have learned. Open the command prompt and type these things in. net view Typing this shows all of the computers in your network/domain net send (computer name) (message) Typing this will send a message to any computer you type in. ex. net send User hello net send * (message) Typing this will send a message to any computer in your domain or network. ex. net send * hello net send /domain (message) This does the exact same thing as the above, it sends a message to all computers in your domain or network. ex. net send /domain hello net send (ip address) (message) This supposobly sends a message to the computers ip you type in, (if this works please tell me) ex. net send 16.21.36.2 hello shutdown -i This allows you to shutdown any computer in your domain/ network remotly. shutdown -m \\(computer name) This is the same thing as the above it just is quicker. ex. shutdown -m \\user st of F1-F9 Key Commands for the Command Prompt Published: September 15, 1999 By Rodolfo De La Torre Vazquez, Lithium Systems, Guadalajara, Mexico F1: Repeats the letters of the last command line, one by one F2: Displays a dialog asking user to "enter the char to copy up to" of the last command line F3: Repeats the last command line F4: Displays a dialog asking user to "enter the char to delete up to" of the last command line F5: Goes back one command line F6: Enters the traditional CTRL+Z (^z) F7: Displays a menu with the command line history F8: Cycles back through previous command lines (beginning with most recent) F9: Displays a dialog asking user to enter a command number, where 0 is for first command line entered Note: The buffer allows a maximum of 50 command lines. After this number is reached, the first line will be replaced in sequence. Works on Windows 2000 Professional and Server. If anyone knows any other tricks to do with the command prmpt I would appreciate it if you would post. I use these to play pranks at my school. ![]() |
|
|
|
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|