Advertisement
iyan_squid

.bashrc~kali

May 27th, 2013
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.95 KB | None | 0 0
  1. # ~/.bashrc: executed by bash(1) for non-login shells.
  2. # see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
  3. # for examples
  4. #by yur4kh4.net | contact me yur4kh4atgmaildotcom
  5. # Indonesian coder | malang cyber crew | kill -9
  6. # If not running interactively, don't do anything
  7. [ -z "$PS1" ] && return
  8.  
  9. # don't put duplicate lines in the history. See bash(1) for more options
  10. export HISTCONTROL=ignoredups
  11. # ... and ignore same sucessive entries.
  12. export HISTCONTROL=ignoreboth
  13.  
  14. # check the window size after each command and, if necessary,
  15. # update the values of LINES and COLUMNS.
  16. shopt -s checkwinsize
  17.  
  18. # make less more friendly for non-text input files, see lesspipe(1)
  19. [ -x /usr/bin/lesspipe ] && eval "$(lesspipe)"
  20.  
  21. # set variable identifying the chroot you work in (used in the prompt below)
  22. if [ -z "$debian_chroot" ] && [ -r /etc/debian_chroot ]; then
  23. debian_chroot=$(cat /etc/debian_chroot)
  24. fi
  25.  
  26. # set a fancy prompt (non-color, unless we know we "want" color)
  27. case "$TERM" in
  28. xterm-color)
  29. PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ '
  30. ;;
  31. *)
  32. PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$ '
  33. ;;
  34. esac
  35.  
  36. # Comment in the above and uncomment this below for a color prompt
  37. #PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ '
  38.  
  39. # If this is an xterm set the title to user@host:dir
  40. case "$TERM" in
  41. xterm*|rxvt*)
  42. PROMPT_COMMAND='echo -ne "\033]0;${USER}@${HOSTNAME}: ${PWD/$HOME/~}\007"'
  43. ;;
  44. *)
  45. ;;
  46. esac
  47.  
  48. # Alias definitions.
  49. # You may want to put all your additions into a separate file like
  50. # ~/.bash_aliases, instead of adding them here directly.
  51. # See /usr/share/doc/bash-doc/examples in the bash-doc package.
  52.  
  53. #if [ -f ~/.bash_aliases ]; then
  54. # . ~/.bash_aliases
  55. #fi
  56.  
  57. # enable color support of ls and also add handy aliases
  58. if [ "$TERM" != "dumb" ]; then
  59. eval "`dircolors -b`"
  60. alias ls='ls --color=auto'
  61. #alias dir='ls --color=auto --format=vertical'
  62. #alias vdir='ls --color=auto --format=long'
  63. fi
  64.  
  65. # list website
  66. #alias yur4kh4=' firefox http://yur4kh4.net/ '
  67. #alias reza=' firefox http://tanyarezaervani.wordpress.com/ '
  68. #alias hok00age=' firefox http://tahutek.net/ '
  69. #alias exploit=' firefox http://exploit-id.com/ '
  70. #alias forum=' firefox http://ubuntu-indonesia.com/ '
  71. #alias mc-crew=' firefox http://mc-crew.info/ '
  72. function encode() { echo -n $@ | perl -pe's/([^-_.~A-Za-z0-9])/sprintf("%%%02X", ord($1))/seg'; }
  73. function google() { firefox http://www.google.com/search?hl=id#q="`encode $@`" ;}
  74.  
  75. # Fungsi extract file
  76. extract () {
  77. if [ -f $1 ] ; then
  78. case $1 in
  79. *.tar.bz2) tar xjf $1 ;;
  80. *.tar.gz) tar xzf $1 ;;
  81. *.bz2) bunzip2 $1 ;;
  82. *.rar) rar x $1 ;;
  83. *.gz) gunzip $1 ;;
  84. *.tar) tar xf $1 ;;
  85. *.tbz2) tar xjf $1 ;;
  86. *.tgz) tar xzf $1 ;;
  87. *.zip) unzip $1 ;;
  88. *.Z) uncompress $1 ;;
  89. *) echo "'$1' tidak bisa di extract dengan command extract()" ;;
  90. esac
  91. else
  92. echo "'$1' file tidak terdaftar"
  93. fi
  94. }
  95.  
  96. # Basic command
  97. alias home='cd ~/'
  98. alias web='cd /var/www'
  99. alias install='sudo apt-get install'
  100. alias debinstall='sudo dpkg -i'
  101. alias update='sudo apt-get update'
  102. alias smartfren='wvdial smart'
  103. alias semua='ls -la'
  104. alias lsl='ls -l'
  105. # tambahkan sesuai kebutuhan
  106.  
  107. # enable programmable completion features (you don't need to enable
  108. # this, if it's already enabled in /etc/bash.bashrc and /etc/profile
  109. # sources /etc/bash.bashrc).
  110. if [ -f /etc/bash_completion ]; then
  111. . /etc/bash_completion
  112. fi
  113.  
  114. # Warna tput command
  115.  
  116. Black="$(tput setaf 0)"
  117. BlackBG="$(tput setab 0)"
  118. DarkGrey="$(tput bold ; tput setaf 0)"
  119. LightGrey="$(tput setaf 7)"
  120. LightGreyBG="$(tput setab 7)"
  121. White="$(tput bold ; tput setaf 7)"
  122. Red="$(tput setaf 1)"
  123. RedBG="$(tput setab 1)"
  124. LightRed="$(tput bold ; tput setaf 1)"
  125. Green="$(tput setaf 2)"
  126. GreenBG="$(tput setab 2)"
  127. LightGreen="$(tput bold ; tput setaf 2)"
  128. Brown="$(tput setaf 3)"
  129. BrownBG="$(tput setab 3)"
  130. Yellow="$(tput bold ; tput setaf 3)"
  131. Blue="$(tput setaf 4)"
  132. BlueBG="$(tput setab 4)"
  133. LightBlue="$(tput bold ; tput setaf 4)"
  134. Purple="$(tput setaf 5)"
  135. PurpleBG="$(tput setab 5)"
  136. Pink="$(tput bold ; tput setaf 5)"
  137. Cyan="$(tput setaf 6)"
  138. CyanBG="$(tput setab 6)"
  139. LightCyan="$(tput bold ; tput setaf 6)"
  140. NC="$(tput sgr0)" # No Color
  141.  
  142. # Functions
  143.  
  144. spin ()
  145. {
  146. echo -ne "$White-"
  147. echo -ne "$LightGray\b|"
  148. echo -ne "$LightGreen\bo"
  149. sleep .02
  150. echo -ne "$LightBlue\b-$RC"
  151. }
  152.  
  153. teks1 ()
  154. {
  155. sleep .02
  156. echo -ne "$White W"
  157. sleep .02
  158. echo -ne e
  159. sleep .02
  160. echo -ne l
  161. sleep .02
  162. echo -ne c
  163. sleep .02
  164. echo -ne o
  165. sleep .02
  166. echo -ne m
  167. sleep .02
  168. echo -ne e
  169. sleep .02
  170. echo -ne " "
  171. sleep .02
  172. echo -ne t
  173. sleep .02
  174. echo -ne o
  175. sleep .02
  176. echo -ne " "
  177. sleep .02
  178. echo -ne "$HOSTNAME $NC"
  179. sleep .02
  180. }
  181.  
  182. teks2 ()
  183. {
  184. sleep .02
  185. echo -ne "$LightGreen L"
  186. sleep .02
  187. echo -ne i
  188. sleep .02
  189. echo -ne n
  190. sleep .02
  191. echo -ne u
  192. sleep .02
  193. echo -ne x
  194. sleep .02
  195. echo -ne " "
  196. sleep .02
  197. echo -ne U
  198. sleep .02
  199. echo -ne n
  200. sleep .02
  201. echo -ne t
  202. sleep .02
  203. echo -ne u
  204. sleep .02
  205. echo -ne k
  206. sleep .02
  207. echo -ne " "
  208. echo -ne R
  209. sleep .02
  210. echo -ne a
  211. sleep .02
  212. echo -ne k
  213. sleep .02
  214. echo -ne y
  215. sleep .02
  216. echo -ne a
  217. sleep .02
  218. echo -ne t
  219. sleep .02
  220. echo -ne !
  221. sleep .02
  222. echo -ne "! "
  223. sleep .02
  224. }
  225.  
  226. yur4 ()
  227. {
  228. sleep .5
  229. echo -ne "$LightGreen ."
  230. sleep .5
  231. echo -ne .
  232. sleep .5
  233. echo -ne .
  234. echo -ne .
  235. sleep .5
  236. echo -ne .
  237. sleep .8
  238. echo -ne "$LightBlue done"
  239. }
  240. INTERFACE=wlan0
  241. # Welcome screen
  242.  
  243. clear;
  244. echo -e "";
  245. for i in `seq 1 20` ; do spin; done; teks1; for i in `seq 1 23` ; do spin; done ;echo "";
  246. echo "";
  247. echo -ne "$LightBlue wellcome $White$USER $LightBlue!";
  248. echo ""; sleep .3;
  249. echo "";
  250. echo -ne "$LightBlue Hari & tanggal: $White `date "+%b %d, %Y"`";
  251. echo ""; sleep .3;
  252. echo "";
  253. echo -ne "$Red Please Wait"; yur4;
  254. echo ""; sleep .3;
  255. echo "";
  256. echo -ne "$LightBlue Distro: $White `cat /etc/issue`";
  257. echo "";
  258. echo -ne "$LightBlue Kernel: $White `uname -smr`";
  259. echo "";
  260. echo -ne "$LightBlue IP: $White `/sbin/ip addr show $INTERFACE | grep 'inet ' | cut -d t -f2 | cut -d / -f1 | cut -b 2-`";
  261. echo "";
  262. echo -ne "$LightBlue Uptime: $White `uptime | awk {'print $3" "$4" "$5'} | sed 's/:/ hours, /' | sed -r 's/,$/ minutes/'`";
  263. echo ""; sleep .3;
  264. echo "";
  265. for i in `seq 1 20` ; do spin; done; teks2; for i in `seq 1 25` ; do spin; done ;echo "";
  266. echo "" $NC;
  267.  
  268. # Simple bash
  269.  
  270. PS1="\[\e[01;37m\]┌─[\t]──[\[\e[01;37m\u\e[01;37m\]]──[\[\e[00;37m\]${HOSTNAME%%.*}\[\e[01;37m\]]:\w$\[\e[01;37m\]\n\[\e[01;37m\]└──\[\e[01;37m\](\[\e[32;1m\]\$(/bin/ls -1 | /usr/bin/wc -l | /bin/sed 's: ::g') files, \$(/bin/ls -lah | /bin/grep -m 1 total | /bin/sed 's/total //')b\[\e[01;37m\])>>\[\e[0m\]"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement