Useful Linux weblinks. Very interesting information.

https://www.cs.cmu.edu/~gilpin/tutorial/. Debugging Under Unix: gdb Tutorial. http://docs.kali.org/general-use/starting-metasploit-framework-in-kali. Setting up the Metasploit framework in Kali Linux. http://www.backtrack-linux.org/forums/showthread.php?t=8154. Using the netdiscover command on Linux to scan for hosts on a network. https://insights.ubuntu.com/2014/10/10/watch-netflix-in-ubuntu-today/. Watch Netflix on Ubuntu with the Google Chrome browser and ditch Windows on your media center machine. http://www.linuxquestions.org/questions/programming-9/how-can-i-list-directories-only-in-linux-375219/. How to list only directories when using … Read more

How to search for files on a Windows machine with the command line. And some other useful tricks.

This command will search a directory recursively to find files matching a pattern. C:\Users\Homer>where /R C:\Users\homer\Documents *.txt C:\Users\Homer\Documents\age-of-ultron-script-outline.txt C:\Users\Homer\Documents\windows10key.txt C:\Users\Homer\Documents\Downloads\Linux The Complete Manual 2nd Edition (TRUE PDF)\Torrent downloaded from AhaShare.com.txt C:\Users\Homer\Documents\Downloads\Linux The Complete Manual 2nd Edition (TRUE PDF)\Torrent Downloaded From ExtraTorrent.cc.txt C:\Users\Homer\Documents\Downloads\Linux The Complete Manual 2nd Edition (TRUE PDF)\tracked_by_h33t_com.txt C:\Users\Homer\Documents\Downloads\Linux The Complete Manual 2nd Edition … Read more

How to get information out of the system logfiles on Linux. Showing failed logins.

There are a few ways to get information out of the /var/log files using the Linux command line. Here are a few examples. Show the history of apt commands on your Linux box with this command. jason@eyjafjallajkull:~$ grep ‘Commandline: ‘ /var/log/apt/history.log Commandline: apt-get upgrade Commandline: apt-get install gnome-alsamixer Commandline: apt-get install indicator-sound-switcher Commandline: apt-get upgrade … Read more

Use the netdiscover command to find hosts on your local LAN.

The netdiscover utility will list all connected hosts on your local LAN. This is useful for scanning a network and determining which hosts are online. I used this command to scan an IP range starting with 192.168.0.1. jason@darkstar:~$ sudo netdiscover -r 192.168.0.1/24jason@darkstar:~$ sudo netdiscover -r 192.168.0.1/24 Currently scanning: Finished! | Screen View: Unique Hosts   … Read more

How to convert a Wikipedia article to a text file using the Linux command line.

The wikipedia2text command allows a command line user on Debian to output the contents of a Wikipedia article to a text file on your hard drive. Install this command this way: jason@darkstar:~/Documents$ sudo apt-get install wikipedia2textjason@darkstar:~/Documents$ sudo apt-get install wikipedia2text Then convert an article this way. jason@darkstar:~/Documents$ wikipedia2text Debian > Debian.txtjason@darkstar:~/Documents$ wikipedia2text Debian > Debian.txt … Read more

List files by modification date with the ls command on Linux.

This one-liner will list all files in a directory by modification time, newest first. jason@eyjafjallajkull:~/Pictures$ ls -thuljason@eyjafjallajkull:~/Pictures$ ls -thul Use it this way to list the top 20 files listed. jason@eyjafjallajkull:/var/log$ ls -thul | head -n 20 total 6.9M -rw-rw-r– 1 root utmp 9.0K Jul 9 11:30 wtmp -rw-r–r– 1 root root 85K Jul 9 … Read more

Get the internet facing IP address of a Linux machine easily.

This simple command will print out the Internet facing IP address of a Linux machine in no time. curl ifconfig.me/ipcurl ifconfig.me/ip This will return the useragent that is used to access this URL. ubuntu ~ $ curl ifconfig.me/ua curl/7.35.0ubuntu ~ $ curl ifconfig.me/ua curl/7.35.0 Use this string to get all information about the host that … Read more

Add BASH styled line editing and persistent history to the CMD window.

This useful utility: http://mridgers.github.io/clink/. Will allow persistent history and line editing in the Windows 10 CMD window. This makes the CMD session much more enjoyable to use. Press Alt-H in the CMD window to get help that shows the keyboard shortcuts for this addon. Microsoft Windows [Version 10.0.10130] (c) 2015 Microsoft Corporation. All rights reserved. … Read more

Get information about your network connection with Linux.

This command will return only the IP address of the host. ubuntu ~ $ hostname -i 172.31.20.16ubuntu ~ $ hostname -i 172.31.20.16 Querying for all local IP addresses on the host. ubuntu ~ $ hostname -I 172.31.20.16 10.8.0.1ubuntu ~ $ hostname -I 172.31.20.16 10.8.0.1 This simple script will ping Google and will check the return … Read more

Searching for packages on an Ubuntu system with the aptitude command.

The aptitude command for Ubuntu may be used to search for packages. This makes it easy to find the appropriate package you are searching for. In this example, I am searching for the openvpn packages. ubuntu ~ $ sudo aptitude search openvpn p gadmin-openvpn-client – GTK+ configuration tool for openvpn (client) p gadmin-openvpn-client-dbg – GTK+ … Read more

Check the status of your laptop battery with Powershell on Windows.

This simple one liner will print the battery status of your laptop battery in percent. This shows that I have 48% battery charge remaining. PS C:\> (Get-WmiObject -Class Win32_Battery).estimatedchargeremaining 48PS C:\> (Get-WmiObject -Class Win32_Battery).estimatedchargeremaining 48 Run it like this to get all of the information about your laptop battery. PS C:\WINDOWS\system32> (Get-WmiObject -Class Win32_Battery)   … Read more

Show interface status with the command line on a Cisco switch.

The show interface brief command, issued at the elevated command prompt will show the status of all ports on the switch/router and also show your vlan interfaces you have created. tyrion#show ip interface brief Interface IP-Address OK? Method Status Protocol Vlan1 unassigned YES NVRAM up down Vlan2 172.18.31.128 YES NVRAM up up GigabitEthernet0/1 unassigned YES … Read more

Set or change a passphrase for an OpenVPN server key.

This command will set a passphrase for the server pem file for OpenVPN on Linux. I setup a VPN configuration on Ubuntu and forgot to set the passphrase. This is how I managed to set one. ubuntu@ip-172-31-13-140:~$ sudo openssl rsa -des3 -in server-key.pem -out server2.pem Enter pass phrase for server-key.pem: writing RSA key Enter PEM … Read more

How to set a MAC address on a Cisco 3700 router.

This command in interface configuration mode will change the MAC address for a specific interface on the router. R1(config-if)#mac-address DE.AD.BER1(config-if)#mac-address DE.AD.BE And this is what I get when I use the show run command and view the properties of the interface. interface FastEthernet0/0 mac-address 00de.00ad.00be ip address 192.168.0.1 255.255.255.0 ip nat inside ip nat enable … Read more

How to get comprehensive SSL information out of a website with Ubuntu.

The sslscan utility will print out a comprehensive report listing all of the SSL ciphers used by a website secured by SSL. This can be very useful information when you are planning to attack this website. Or just for research purposes. In this example, I am scanning facebook.com and getting information about the ssl ciphers … Read more