Changes

Jump to navigation Jump to search
482 bytes added ,  08:34, 28 February 2020
m
Line 12: Line 12:  
=~/.bash_aliases=
 
=~/.bash_aliases=
 
==BBVA==
 
==BBVA==
<nowiki>alias clip="cat /media/sf_vmshared/clipboard"
+
<syntaxhighlight lang="bash">
      alias nanoclip="nano /media/sf_vmshared/clipboard"
+
alias clip="cat /media/sf_vmshared/clipboard"
      #alias runserver="python manage.py runserver 0.0.0.0:8888 --settings=malwepid.settings.dev"
+
alias nanoclip="nano /media/sf_vmshared/clipboard"
      alias runserver="python manage.py runserver 0.0.0.0:8888"
+
#alias runserver="python manage.py runserver 0.0.0.0:8888 --settings=malwepid.settings.dev"
      alias ssh_malwepid="ssh -i ~/.ssh/DNC-FKY.pem ubuntu@ec2-52-57-220-220.eu-central-1.compute.amazonaws.com"
+
alias runserver="python manage.py runserver 0.0.0.0:8888"
      alias fpsim_fronend='ssh ubuntu@fpsim-frontend'
+
alias ssh_malwepid="ssh -i ~/.ssh/DNC-FKY.pem ubuntu@ec2-52-57-220-220.eu-central-1.compute.amazonaws.com"
      alias fpsim_spark="ssh ubuntu@fpsim-frontend 'ssh ubuntu@fpsim-spark'"
+
alias fpsim_fronend='ssh ubuntu@fpsim-frontend'
      alias dev_settings="export DJANGO_SETTINGS_MODULE=malwepid.settings.dev"
+
alias fpsim_spark="ssh ubuntu@fpsim-frontend 'ssh ubuntu@fpsim-spark'"
      alias tunnel_fsimdb="ssh -i ~/.ssh/DNC-FKY.pem -N -L 5555:fsim-dbpg.c9hdfwhhklwy.eu-central-1.rds.amazonaws.com:5432  ubuntu@ec2-52-57-220-220.eu-central-1.compute.amazonaws.com"
+
alias dev_settings="export DJANGO_SETTINGS_MODULE=malwepid.settings.dev"
      alias tunnel_newsdb="ssh -i ~/.ssh/rra_id.pem -N -L 5555:fsim-dbpg.c9hdfwhhklwy.eu-central-1.rds.amazonaws.com:5432  ubuntu@news.menupayapp.com"
+
alias tunnel_fsimdb="ssh -i ~/.ssh/DNC-FKY.pem -N -L 5555:fsim-dbpg.c9hdfwhhklwy.eu-central-1.rds.amazonaws.com:5432  ubuntu@ec2-52-57-220-220.eu-central-1.compute.amazonaws.com"
      alias tunnel_news_adsl="ssh -i ~/.ssh/rt_rsa -ND 10.0.2.15:1111 rra@20.1.40.109"
+
alias tunnel_newsdb="ssh -i ~/.ssh/rra_id.pem -N -L 5555:fsim-dbpg.c9hdfwhhklwy.eu-central-1.rds.amazonaws.com:5432  ubuntu@news.menupayapp.com"
      alias push="git push origin --all;git push gitlab --all;git push origin --tags;git push gitlab --tags"
+
alias tunnel_news_adsl="ssh -i ~/.ssh/rt_rsa -ND 10.0.2.15:1111 rra@20.1.40.109"
      alias pdgrt_remote_master_back="git remote set-url origin git@git.rra.lan:pdgrt/misiones/back-end.git;git remote add gitlab git@git.herrerosolis.com:BBVA-RedTeam/Django/pdgrt/master-back.git"
+
alias push="git push origin --all;git push gitlab --all;git push origin --tags;git push gitlab --tags"
      alias pdgrt_remote_master_front="git remote set-url origin git@git.rra.lan:pdgrt/misiones/front-end.git;git remote add gitlab git@git.herrerosolis.com:BBVA-RedTeam/Django/pdgrt/master-front.git"
+
alias pdgrt_remote_master_back="git remote set-url origin git@git.rra.lan:pdgrt/misiones/back-end.git;git remote add gitlab git@git.herrerosolis.com:BBVA-RedTeam/Django/pdgrt/master-back.git"
      alias pdgrt_remote_node_back="git remote set-url origin git@git.rra.lan:pdgrt/encargos/back-end.git;git remote add gitlab git@git.herrerosolis.com:BBVA-RedTeam/Django/pdgrt/node-back.git"
+
alias pdgrt_remote_master_front="git remote set-url origin git@git.rra.lan:pdgrt/misiones/front-end.git;git remote add gitlab git@git.herrerosolis.com:BBVA-RedTeam/Django/pdgrt/master-front.git"
      alias pdgrt_remote_node_front="git remote set-url origin git@git.rra.lan:pdgrt/encargos/front-end.git;git remote add gitlab git@git.herrerosolis.com:BBVA-RedTeam/Django/pdgrt/node-front.git"
+
alias pdgrt_remote_node_back="git remote set-url origin git@git.rra.lan:pdgrt/encargos/back-end.git;git remote add gitlab git@git.herrerosolis.com:BBVA-RedTeam/Django/pdgrt/node-back.git"
      alias pdgrt_remote_deploy="git remote set-url origin git@git.rra.lan:pdgrt/deploy.git;git remote add gitlab git@git.herrerosolis.com:BBVA-RedTeam/Django/pdgrt/deploy.git"
+
alias pdgrt_remote_node_front="git remote set-url origin git@git.rra.lan:pdgrt/encargos/front-end.git;git remote add gitlab git@git.herrerosolis.com:BBVA-RedTeam/Django/pdgrt/node-front.git"
      alias dns="sudo cp ~/.openvpn/resolv.conf /etc"
+
alias pdgrt_remote_deploy="git remote set-url origin git@git.rra.lan:pdgrt/deploy.git;git remote add gitlab git@git.herrerosolis.com:BBVA-RedTeam/Django/pdgrt/deploy.git"
      alias firefox='/opt/firefox/firefox'
+
alias firefox='/opt/firefox/firefox'
      alias pilaf_settings="export DJANGO_SETTINGS_MODULE=pilaf_detectors.settings.test"
+
alias pilaf_settings="export DJANGO_SETTINGS_MODULE=pilaf_detectors.settings.test"
      alias mirror_log='tail -f /home/rafa/PycharmProjects/git_mirror/logs/git_mirror.log'
+
alias mirror_log='tail -f /home/rafa/PycharmProjects/git_mirror/logs/git_mirror.log'
      alias mirror="/home/rafa/.virtualenvs/git_mirror/bin/python /home/rafa/PycharmProjects/git_mirror/mirror.py work"
+
alias git-mirror="/home/rafa/.virtualenvs/git_mirror/bin/python /home/rafa/PycharmProjects/git_mirror/mirror.py work"
      alias terse='/home/rafa/RACF/terse/terselinux.i386'
+
alias terse='/home/rafa/RACF/terse/terselinux.i386'
      alias push='git push'
+
alias push='git push'
      alias upgrade="sudo apt update && sudo apt upgrade"
+
alias gitdiscard='git add . && git stash && git stash drop'
      # Proxy
+
alias upgrade="sudo apt update && sudo apt upgrade"
     
+
alias mkvirtualenv="mkvirtualenv -p /usr/bin/python3"
      ETH0=$(ifconfig | grep -A 1 eth0 | grep inet | awk '{print $2}')
+
# Proxy
      TUN0=$(ifconfig | grep -A 1 tun0 | grep inet | awk '{print $2}')
+
 
      alias foxy="ssh -ND 127.0.0.1:1080  -i ~/.ssh/DNC-FKY.pem ubuntu@ec2-52-57-220-220.eu-central-1.compute.amazonaws.com"
+
ETH0=$(ifconfig | grep -A 1 eth0 | grep inet | awk '{print $2}')
      alias proxy_vpn="echo 'Opening SOCKS5 @$TUN0:1080' && ssh -ND $TUN0:1080 rafa@localhost"
+
ETH0=$(ifconfig | grep -A 1 br0 | grep inet | awk '{print $2}')
      alias proxy_15="echo 'Opening SOCKS5 @$ETH0:1080' && ssh -ND $ETH0:1080 rafa@localhost"</nowiki>
+
TUN0=$(ifconfig | grep -A 1 tun0 | grep inet | awk '{print $2}')
 +
alias foxy="ssh -ND 127.0.0.1:1080  -i ~/.ssh/DNC-FKY.pem ubuntu@ec2-52-57-220-220.eu-central-1.compute.amazonaws.com"
 +
alias proxy_mossad="ssh -ND 127.0.0.1:1080 mossad.rra.lan"
 +
alias proxy_vpn="echo 'Opening SOCKS5 @$TUN0:1080' && ssh -ND $TUN0:1080 rafa@localhost"
 +
alias proxy_15="echo 'Opening SOCKS5 @$ETH0:1080' && ssh -ND $BR0:1080 rafa@localhost"
 +
 
 +
function dns(){
 +
    nslookup ${1} | grep Address | grep -v 127.0.0.1 | awk '{print $NF}'
 +
}
 +
 
 +
function macs(){
 +
    ip -o link | awk '$2 != "lo:" {print $2, $(NF-2)}'
 +
}
    +
function newpass() {
 +
    tr -dc 'a-zA-Z0-9._!@#$%^&*()' < /dev/urandom | fold -w $1 | head -n 1
 +
}
 +
 +
</syntaxhighlight><br />
 
==Trinity==
 
==Trinity==
 
<syntaxhighlight lang="bash">
 
<syntaxhighlight lang="bash">
Line 90: Line 107:  
     if [ -z "$FILE_PATH" ]; then
 
     if [ -z "$FILE_PATH" ]; then
 
         echo Not Found
 
         echo Not Found
         exit -1
+
         [ $PS1 ] && return || exit;
 
     elif [ "${LINES}" -ne "1" ]; then
 
     elif [ "${LINES}" -ne "1" ]; then
 
         echo More than one found: ${LINES}
 
         echo More than one found: ${LINES}
 
         echo ${FILE_PATH}
 
         echo ${FILE_PATH}
         exit -1
+
         [ $PS1 ] && return || exit;
 
     else
 
     else
   Line 103: Line 120:  
     fi
 
     fi
 
}
 
}
 +
      Line 118: Line 136:  
==Morpheus==
 
==Morpheus==
 
  <nowiki>function tr_move() {
 
  <nowiki>function tr_move() {
          if [ -z $TR_AUTH ]; then
+
              if [ -z $TR_AUTH ]; then
              echo "Must export TR_AUTH=username:password  (leave a space before the comand so it doesn't get recorded at .bash_history"
+
                  echo "Must export TR_AUTH=username:password  (leave a space before the comand so it doesn't get recorded at .bash_history"
          elif [ -z $1 ]; then
+
              elif [ -z $1 ]; then
              echo "Must provide a torrent id"
+
                  echo "Must provide a torrent id"
          else
+
              else
              transmission-remote -n ${TR_AUTH} -t ${1} --move /var/lib/transmission-daemon/downloads/porn/
+
                  transmission-remote -n ${TR_AUTH} -t ${1} --move /var/lib/transmission-daemon/downloads/porn/
          fi
+
              fi
      }
+
          }
     
+
         
      function tr_list() {
+
          function tr_list() {
          if [ -z $TR_AUTH ]; then
+
              if [ -z $TR_AUTH ]; then
              echo "Must export TR_AUTH=username:password  (leave a space before the comand so it doesn't get recorded at .bash_history"
+
                  echo "Must export TR_AUTH=username:password  (leave a space before the comand so it doesn't get recorded at .bash_history"
          else
+
              else
              transmission-remote -n ${TR_AUTH} -l
+
                  transmission-remote -n ${TR_AUTH} -l
          fi
+
              fi
      }
+
          }
     
+
         
      function tr_find() {
+
          function tr_find() {
          if [ -z $TR_AUTH ]; then
+
              if [ -z $TR_AUTH ]; then
              echo "Must export TR_AUTH=username:password  (leave a space before the comand so it doesn't get recorded at .bash_history"
+
                  echo "Must export TR_AUTH=username:password  (leave a space before the comand so it doesn't get recorded at .bash_history"
          elif [ -z "${1}" ]; then
+
              elif [ -z "${1}" ]; then
              echo "Must provide a search string"
+
                  echo "Must provide a search string"
          else
+
              else
              transmission-remote -n ${TR_AUTH} -l | grep -i "${1}"
+
                  transmission-remote -n ${TR_AUTH} -l | grep -i "${1}"
          fi
+
              fi
      }
+
          }
      alias upgrade="sudo apt update && sudo apt upgrade"</nowiki>
+
          alias upgrade="sudo apt update && sudo apt upgrade"</nowiki>
    
==Some usefull alias==
 
==Some usefull alias==
 
  <nowiki>alias h="history" # quick access to command history
 
  <nowiki>alias h="history" # quick access to command history
      alias c="clear" # quick way to clear terminal screen
+
          alias c="clear" # quick way to clear terminal screen
      alias grep="grep —color -n" # colorize matches; show line numbers
+
          alias grep="grep —color -n" # colorize matches; show line numbers
      alias df="df -h" # show free space using human readable units
+
          alias df="df -h" # show free space using human readable units
      alias du="du -sh" # show disk usage using human readable units
+
          alias du="du -sh" # show disk usage using human readable units
      alias sc="source $HOME/.cshrc"
+
          alias sc="source $HOME/.cshrc"
      alias gousb="cd $USBDRIVE_PATH"</nowiki>
+
          alias gousb="cd $USBDRIVE_PATH"</nowiki>

Navigation menu