Useful Commands
Generate MD5 Hash
echo -n <keyword>| md5sum
IFS variable: (Internal Field Separator)
Field separator by default is ‘ ‘(space)
To change: [Don’t separate based on ‘space’ but on new line]
Wget: --no-parent: Do not ascend to the parent directory when retrieving recursively | --reject: file name suffixes to reject | --r: recursive
The Git Log tool allows you to view information about previous commits that have occurred in a project.
Connect to an HTTPS sevice
When using shell, enable 'clear'
Creating a user | Changing the password for current user
Man Command : Both commands search for a keyword in man description
man -k searchword
man -k '^passwd$'
[match the entire line and avoid sub-string matches]apropos searchword
Services :
Available services:
systemctl list-unit-files
Start:
systemctl start service_name
Start at boot :
systemctl enable apache2
Disable:
systemctl disable service_name
Grep services:
ss -antlp | grep service_name
Package Management
python : Avoid package dependencies
Using EoL python: https://www.kali.org/docs/general-use/using-eol-python-versions/
It's always recommended you use a virtual environment like
venv
when installing python dependencies.venv (Python 3) and virtual env(Python 2) allow you to manage separate package installations for different projects. They essentially allow you to create a “virtual” isolated Python installation and install packages into that virtual installation. It is always recommended to use a virtual environment while developing Python applications.
apt : Advanced Package Tool
Check if present in Kali repository:
apt-cache search packagename
Remove including config files:
apt remove --purge
Install:dpkg -i package.deb
Environment Variables
export b=10.10.10.97
nmap -Pn $b
Bash History Customization
export HISTCONTROL=ignoredups
export HISTIGNORE="ls:[bf]g:exit:history"
export HISTTIMEFORMAT='%F %T '
env
Piping
Every program run from the command line has three data streams connected to it
PHP shell fu
Generating a certificate
Import certificate to browser
Clear current ssl exception, and reload https://url.com
Backgrounding processes
%
%Number : Refers to a job number such as %1 or %2
%String : Refers to the beginning of the suspended command’s name such as %commandNameHere or %ping
axel
Download accelerator that transfers a file from a FTP or HTTP server through multiple connections.
-n: used to specify the number of multiple connections to use.
-a : for a more concise progress indicator
-o : to specify a different file name for the downloaded file.
Docker
Set up: https://linuxhint.com/install_docker_kali_linux/
Last updated