Advertisement
c0d3dsk1lls

.bashrc custom aliases

Jun 27th, 2022 (edited)
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 8.35 KB | None | 0 0
  1. #CUSTOM .bashrc File. #PLEASE REFER TO https://pastebin.com/3X9rHdhx FOR THE CUSTOM .zshrc CODE.
  2. #note, folder destinations must be modified # to match your current username and directory for .bashrc or .zshrc custom commands to work.
  3.  
  4. #NOTE, THIS IS BEING USED ON KALI LINUX
  5.  
  6.  
  7.  
  8. # ~/.bashrc: executed by bash(1) for non-login shells.
  9. # see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
  10. # for examples
  11.  
  12. # If not running interactively, don't do anything
  13. case $- in
  14.     *i*) ;;
  15.       *) return;;
  16. esac
  17.  
  18. # don't put duplicate lines or lines starting with space in the history.
  19. # See bash(1) for more options
  20. HISTCONTROL=ignoreboth
  21.  
  22. # append to the history file, don't overwrite it
  23. shopt -s histappend
  24.  
  25. # for setting history length see HISTSIZE and HISTFILESIZE in bash(1)
  26. HISTSIZE=1000
  27. HISTFILESIZE=2000
  28.  
  29. # check the window size after each command and, if necessary,
  30. # update the values of LINES and COLUMNS.
  31. shopt -s checkwinsize
  32.  
  33. # If set, the pattern "**" used in a pathname expansion context will
  34. # match all files and zero or more directories and subdirectories.
  35. #shopt -s globstar
  36.  
  37. # make less more friendly for non-text input files, see lesspipe(1)
  38. #[ -x /usr/bin/lesspipe ] && eval "$(SHELL=/bin/sh lesspipe)"
  39.  
  40. # set variable identifying the chroot you work in (used in the prompt below)
  41. if [ -z "${debian_chroot:-}" ] && [ -r /etc/debian_chroot ]; then
  42.     debian_chroot=$(cat /etc/debian_chroot)
  43. fi
  44.  
  45. # set a fancy prompt (non-color, unless we know we "want" color)
  46. case "$TERM" in
  47.     xterm-color|*-256color) color_prompt=yes;;
  48. esac
  49.  
  50. # uncomment for a colored prompt, if the terminal has the capability; turned
  51. # off by default to not distract the user: the focus in a terminal window
  52. # should be on the output of commands, not on the prompt
  53. force_color_prompt=yes
  54.  
  55. if [ -n "$force_color_prompt" ]; then
  56.     if [ -x /usr/bin/tput ] && tput setaf 1 >&/dev/null; then
  57.         # We have color support; assume it's compliant with Ecma-48
  58.         # (ISO/IEC-6429). (Lack of such support is extremely rare, and such
  59.         # a case would tend to support setf rather than setaf.)
  60.         color_prompt=yes
  61.     else
  62.         color_prompt=
  63.     fi
  64. fi
  65.  
  66. # The following block is surrounded by two delimiters.
  67. # These delimiters must not be modified. Thanks.
  68. # START KALI CONFIG VARIABLES
  69. PROMPT_ALTERNATIVE=twoline
  70. NEWLINE_BEFORE_PROMPT=yes
  71. # STOP KALI CONFIG VARIABLES
  72.  
  73. if [ "$color_prompt" = yes ]; then
  74.     # override default virtualenv indicator in prompt
  75.     VIRTUAL_ENV_DISABLE_PROMPT=1
  76.  
  77.     prompt_color='\[\033[;32m\]'
  78.     info_color='\[\033[1;34m\]'
  79.     prompt_symbol=
  80.     if [ "$EUID" -eq 0 ]; then # Change prompt colors for root user
  81.         prompt_color='\[\033[;94m\]'
  82.         info_color='\[\033[1;31m\]'
  83.         # Skull emoji for root terminal
  84.         #prompt_symbol=💀
  85.     fi
  86.     case "$PROMPT_ALTERNATIVE" in
  87.         twoline)
  88.             PS1=$prompt_color'┌──${debian_chroot:+($debian_chroot)──}${VIRTUAL_ENV:+(\[\033[0;1m\]$(basename $VIRTUAL_ENV)'$prompt_color')}('$info_color'\u'$prompt_symbol'\h'$prompt_color')-[\[\033[0;1m\]\w'$prompt_color']\n'$prompt_color'└─'$info_color'\$\[\033[0m\] ';;
  89.         oneline)
  90.             PS1='${VIRTUAL_ENV:+($(basename $VIRTUAL_ENV)) }${debian_chroot:+($debian_chroot)}'$info_color'\u@\h\[\033[00m\]:'$prompt_color'\[\033[01m\]\w\[\033[00m\]\$ ';;
  91.         backtrack)
  92.             PS1='${VIRTUAL_ENV:+($(basename $VIRTUAL_ENV)) }${debian_chroot:+($debian_chroot)}\[\033[01;31m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ ';;
  93.     esac
  94.     unset prompt_color
  95.     unset info_color
  96.     unset prompt_symbol
  97. else
  98.     PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$ '
  99. fi
  100. unset color_prompt force_color_prompt
  101.  
  102. # If this is an xterm set the title to user@host:dir
  103. case "$TERM" in
  104. xterm*|rxvt*|Eterm|aterm|kterm|gnome*|alacritty)
  105.     PS1="\[\e]0;${debian_chroot:+($debian_chroot)}\u@\h: \w\a\]$PS1"
  106.     ;;
  107. *)
  108.     ;;
  109. esac
  110.  
  111. [ "$NEWLINE_BEFORE_PROMPT" = yes ] && PROMPT_COMMAND="PROMPT_COMMAND=echo"
  112.  
  113. # enable color support of ls, less and man, and also add handy aliases
  114. if [ -x /usr/bin/dircolors ]; then
  115.     test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)"
  116.     export LS_COLORS="$LS_COLORS:ow=30;44:" # fix ls color for folders with 777 permissions
  117.  
  118.     alias ls='ls --color=auto'
  119.     #alias dir='dir --color=auto'
  120.     #alias vdir='vdir --color=auto'
  121.  
  122.     alias grep='grep --color=auto'
  123.     alias fgrep='fgrep --color=auto'
  124.     alias egrep='egrep --color=auto'
  125.     alias diff='diff --color=auto'
  126.     alias ip='ip --color=auto'
  127.  
  128.     export LESS_TERMCAP_mb=$'\E[1;31m'     # begin blink
  129.     export LESS_TERMCAP_md=$'\E[1;36m'     # begin bold
  130.     export LESS_TERMCAP_me=$'\E[0m'        # reset bold/blink
  131.     export LESS_TERMCAP_so=$'\E[01;33m'    # begin reverse video
  132.     export LESS_TERMCAP_se=$'\E[0m'        # reset reverse video
  133.     export LESS_TERMCAP_us=$'\E[1;32m'     # begin underline
  134.     export LESS_TERMCAP_ue=$'\E[0m'        # reset underline
  135. fi
  136.  
  137. # colored GCC warnings and errors
  138. #export GCC_COLORS='error=01;31:warning=01;35:note=01;36:caret=01;32:locus=01:quote=01'
  139.  
  140. #-------------------------------COPY ALIASES BELOW TO  .zshrc or .bashrc --------------------------------------------------
  141. #BE SURE TO MODIFY YOUR USER AND HOME DIRECTORY TO MATCH /home/YOURUSERNAME/other_folders
  142.  
  143. # some more ls aliases
  144. alias ll='ls -l'
  145. alias la='ls -A'
  146. alias l='ls -CF'
  147. alias rtf='libreoffice'
  148. alias txt='mousepad'
  149. alias img='ristretto'
  150. alias pdf='atril'
  151. alias rootuser='su'
  152. alias base='cd /'
  153. alias root='su'
  154. alias boot='cd /boot/'
  155. alias var='cd /var/'
  156. alias sys='cd /sys/'
  157. alias etc='cd /etc/'
  158. alias run='cd /run/'
  159. alias dev='cd /dev/'
  160. alias srv='cd /srv/'
  161. alias www='cd /var/www/html'
  162. alias phpbb='cd /var/www/html/myserver/phpBB3'
  163. alias bb='cd /var/www/html/myserver/phpBB3'
  164. alias desktop='cd /home/anonymous/Desktop'
  165. alias public='cd /home/anonymous/Public'
  166. alias school='cd /home/anonymous/Schooling'
  167. alias desk='cd /home/anonymous/Desktop'
  168. alias downloads='cd /home/anonymous/Downloads'
  169. alias dloads='cd /home/anonymous/Downloads'
  170. alias rfm='sudo exo-open --launch FileManager'
  171. alias fm='exo-open --launch FileManager'
  172. alias down='cd /home/anonymous/Downloads'
  173. alias documents='cd /home/anonymous/Documents'
  174. alias pictures='cd /home/anonymous/Pictures'
  175. alias pics='cd /home/anonymous/Pictures'
  176. alias gallery='cd /home/anonymous/Pictures'
  177. alias photos='cd /home/anonymous/Pictures'
  178. alias docs='cd /home/anonymous/Documents'
  179. alias docu='cd /home/anonymous/Documents'
  180. alias home='cd /home/anonymous'
  181. alias music='cd /home/anonymous/Music'
  182. alias musi='cd /home/anonymous/Music'
  183. alias bin='cd /bin'
  184. alias usr='cd /usr'
  185. alias mnt='cd /mnt'
  186. alias tmp='cd /tmp'
  187. alias upgrade='sudo apt upgrade'
  188. alias update='sudo apt update'
  189. alias d='pwd'
  190. alias chdir='cd'
  191. alias show='cat'
  192. alias rename='mv'
  193. alias move='mv'
  194. alias delete='rm'
  195. alias del='rm'
  196. alias new='touch'
  197. alias sniff='sudo python3 Packet_Sniffer.py'
  198. alias psamp='cd /home/anonymous/Documents/python_projects/completed_samples/'
  199. alias bfpin='python brute_pin_dnt.py'
  200. alias bfascii='python brute_ascii_dnt.py'
  201. alias calcu='python calculator_dnt.py'
  202. alias calc='python calculator_dnt.py'
  203. alias calc2='python calculator_dnt_V2.py'
  204. alias cal='python calculator_dnt.py'
  205. alias cal2='python calculator_dnt_V2.py'
  206. alias pscan='python port_scanner.py'
  207. alias supscan='sudo python port_scanner.py'
  208. alias pscanner='cd /home/anonymous/Documents/python_projects/port_scanner/'
  209. alias py='python3'
  210. alias back='cd ..'
  211. alias bk='cd ..'
  212. alias b='cd ..'
  213. alias spy='sudo python3'
  214.  
  215.  
  216. #-------------------------------COPY ALIASES ABOVE TO  .zshrc or .bashrc --------------------------------------------------
  217. # Alias definitions.
  218. # You may want to put all your additions into a separate file like
  219. # ~/.bash_aliases, instead of adding them here directly.
  220. # See /usr/share/doc/bash-doc/examples in the bash-doc package.
  221.  
  222. if [ -f ~/.bash_aliases ]; then
  223.     . ~/.bash_aliases
  224. fi
  225.  
  226. # enable programmable completion features (you don't need to enable
  227. # this, if it's already enabled in /etc/bash.bashrc and /etc/profile
  228. # sources /etc/bash.bashrc).
  229. if ! shopt -oq posix; then
  230.   if [ -f /usr/share/bash-completion/bash_completion ]; then
  231.     . /usr/share/bash-completion/bash_completion
  232.   elif [ -f /etc/bash_completion ]; then
  233.     . /etc/bash_completion
  234.   fi
  235. fi
  236.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement