Skip to main content

Useful DOS Commands related to Internet and Network

nslookup

This command has many functionalities. One is for resolving DNS into IP. Lets say you know the website URL but you don’t know its IP but you want to find it out.
Eg. nslookup www.google.com (www.google.com is the website for which you want to find out the IP)
Now, another really nice function of nslookup is to find out IP of specific Mail Severs
nslookup (enter)set type=mx (enter)yahoo.com

This command will give you the mail server IP of yahoo.com. You can use whatever server you want and if it is listed on DNS, then you get the IP. Simple, isn’t it? You can send a spoofed email to your friends using the IP address of the mail server.

net view
net use

net use \ipaddressipc$ “” /user:administrator
(this command will allow you to connect to the target as administrator)
Now if you want to connect to the target and browse the entire C drive, then use this command:
Code:
net use K: \computernameC$
(this will create a virtual drive on your “my computer” folder)
Please not that this command will only work if the target PC/laptop has not set a Adminastrator Password.

net user
ping

This command will allow you to know if the host you pinging is alive, which means if it is up at the time of executing the “ping” command.


tracert

This command will give you the hops that a packet will travel to reach its final destination. This command is really helpful if you know the route a packet takes before it goes to the target box.


arp

 This command will show you the arp table. You can find out if anyone has done arp poisoning in your LAN using this command.

arp -a

route

This command will show you the routing table, gateway, interface and metric.


nbtstat
netstat

This command will show you connection stats

       netstat -a (this will show you all the listening ports & connection with DNS names)
netstat -n (this will show you all the open connection with IP addresses)netstat -an (this will combined both of the above)


ipconfig

This command will show you a lot of useful things like your IP, Gateway, DNS in use, etc. This command will give all that info but for all networks you might have it.

ipconfig /allipconfig /release (this will release your IP)ipconfig /renew (this will renew your iP)

Comments

Popular posts from this blog

How to Install Hadoop (2.7.3) on Ubuntu (16.04 LTS)

As I am planning to learn Hadoop, I wanted to install Hadoop (2.7.3) on my Ubuntu (16.04 LTS) and I followed the steps mentioned in the documentation on the Apache Hadoop website. I encountered few problems which are mentioned below, spent some time finding solution to them.

Below are the steps I followed and the description of the error is at the end of this post and also I have mentioned what I missed and what caused these errors.


Step 1. Download Hadoop installation file. For Hadoop 2.7.3 version I used the following link 

http://www.apache.org/dyn/closer.cgi/hadoop/common/hadoop-2.7.3/hadoop-2.7.3-src.tar.gzStep 2. (Assuming you have downloaded the file into /home/<username>/Downloads folder

$ tar zxf hadoop-2.7.3-src.tar.gz
This will extract the files into a folder  "hadoop-2.7.3" .

Step 3. I moved the file to /home/<username> folder (many suggest to move it into /usr/local but I prefer to keep it here, may be once I learn more about linux I might get into tha…

Installing Adobe Reader on Ubuntu 16.04 LTS

Adobe stopped Adobe Reader support for Linux so it is bit of a challenge to find and install the Adobe Reader for Linux. Here I describe how to install it on Ubuntu 16.04 LTS.

Step 1. First install gdebi

sudo apt-get install gdebi
Step 2. Install required libraries

sudo apt-get install libgtk2.0-0:i386
sudo apt-get install libnss3-1d:i386
sudo apt-get install libnspr4-0d:i386
sudo apt-get install libxml2:i386
sudo apt-get install libxslt1.1:i386

Step 3. Download the Adobe Reader DEB package

Adobe Reader 9.5.5 enu

Javascript KeyCode Reference table for Event Handling

The post explains Keyboard event handling using javascript.Javascript events are used to capture user keystrokes. Below is a table of key codes for the keys on a multimedia keyboard. If this table is inconsistent with your own findings, please let me know.

Java Script Code to Find Key code

<script language="JavaScript">
document.onkeydown = checkKeycode
function checkKeycode(e) {
var keycode;
if (window.event) keycode = window.event.keyCode;
else if (e) keycode = e.which;
alert("keycode: " + keycode);
}
</script>


Key Code Reference Table
Key PressedJavascript Key Codebackspace8tab9enter13shift16ctrl17alt18pause/break19caps lock20escape27page up33page down34end35home36left arrow37up arrow38right arrow39down arrow40insert45delete46048149250351452553654755856957a65b66c67d68