<file_sep>#!/bin/bash


##### Install axel
apt-get -y install axel
#--- Setup alias
grep -q 'alias axel="axel -a"' /root/.bash_aliases || echo 'alias axel="axel -a"' >> /root/.bash_aliases
#source /root/.bashrc
<file_sep>#!/bin/bash

##### Install OP packers
apt-get -y install upx-ucl   #wget http://upx.sourceforge.net/download/upx309w.zip -P /usr/share/packers/ && unzip -o -d /usr/share/packers/ /usr/share/packers/upx309w.zip && rm -f /usr/share/packers/upx309w.zip
mkdir -p /usr/share/packers/
wget "http://www.eskimo.com/~scottlu/win/cexe.exe" -P /usr/share/packers/
wget "http://www.farbrausch.de/~fg/kkrunchy/kkrunchy_023a2.zip" -P /usr/share/packers/ && unzip -o -d /usr/share/packers/ /usr/share/packers/kkrunchy_023a2.zip && rm -f /usr/share/packers/kkrunchy_023a2.zip
#--- Setup hyperion
unzip -o -d /usr/share/windows-binaries/ /usr/share/windows-binaries/Hyperion-1.0.zip
#rm -f /usr/share/windows-binaries/Hyperion-1.0.zip
i686-w64-mingw32-g++ -static-libgcc -static-libstdc++ /usr/share/windows-binaries/Hyperion-1.0/Src/Crypter/*.cpp -o /usr/share/windows-binaries/Hyperion-1.0/Src/Crypter/bin/crypter.exe
ln -s /usr/share/windows-binaries/Hyperion-1.0/Src/Crypter/bin/crypter.exe /usr/share/windows-binaries/Hyperion-1.0/crypter.exe
<file_sep>#!/bin/sh

xhost + #turns off access control list for x
<file_sep>#!/bin/bash

################ common header identical except for usage, getopts etc #########################################################################################################
Usage() {
  cat <<EOF
usage: ${0##*/} [options] distro dir

  Currently this script takes three options
  and 1 argument
  -d < distro >
  -d <kali|stable|unstable|testing|ubuntu>
  
  -n <no modding> do not mod the pakage just
  build
  
  -i < include the built packages into your
  custom repo>
  
  -g < building from git sources >
  
  This script uses pbuilder and reprepro
  to build the package in the current dir
  result is found at the location
  specified in aaa-master-configure
  as aaa_build_result
  

EOF
}



if [[ $1 = @(-h|--help) ]]; then
  Usage
  exit 1
fi

#source common functions
if [[ -r /usr/bin/aaa-common-functions ]]; then
	. /usr/bin/aaa-common-functions
	if [[ ! $? -eq 0 ]]; then
		echo " failed to source common functions at /usr/bin/aaa-common-functions"
		echo "quitting !! "
		exit 1
	fi
else
	echo " failed to find common functions at /usr/bin/aaa-common-functions"
	echo "quitting !! "
	exit 1
fi

#source settings
if [ -r $HOME/.aaa_settings ]; then
  Info "found a settings file.. reading it"
  . $HOME/.aaa_settings
fi

#source config
if [ -r /etc/aaa-master-config ]; then
  Info "found my master config file.. reading it"
  . /etc/aaa-master-config
	if [ -r $HOME/.aaa-local-config ]; then
		Info "found a local settings file.. reading it"
		. $HOME/.aaa-local-config
	fi
else
	Fuck "Failed to find master settings file quitting"
	exit 1
fi


#setup working dirs
CleanMyBuildArea

# Memstat.sh is a shell script that calculates linux memory usage for each program / application.
# Script outputs shared and private memory for each program running in linux. Since memory calculation is bit complex,
# this shell script tries best to find more accurate results. Script use 2 files ie /proc//status (to get name of process)
# and /proc//smaps for memory statistic of process. Then script will convert all data into Kb, Mb, Gb.
# Also make sure you install bc command.


#Source : http://www.linoxide.com/linux-shell-script/linux-memory-usage-program/
#Parent : http://www.linoxide.com/guide/scripts-pdf.html

# Make sure only root can run our script

[[ "$(id -u)" != "0" ]] && Fuck "This script must be run as root"

### Functions
#This function will count memory statistic for passed PID
get_process_mem ()
{
PID=$1
#we need to check if 2 files exist
if [ -f /proc/$PID/status ];
then
        if [ -f /proc/$PID/smaps ];
        then
                #here we count memory usage, Pss, Private and Shared = Pss-Private
                Pss=`cat /proc/$PID/smaps | grep -e "^Pss:" | awk '{print $2}'| paste -sd+ | bc `
                Private=`cat /proc/$PID/smaps | grep -e "^Private" | awk '{print $2}'| paste -sd+ | bc `
                #we need to be sure that we count Pss and Private memory, to avoid errors
                if [ x"$Rss" != "x" -o x"$Private" != "x" ];
                then

                        let Shared=${Pss}-${Private}
                        Name=`cat /proc/$PID/status | grep -e "^Name:" |cut -d':' -f2`
                        #we keep all results in bytes
                        let Shared=${Shared}*1024
                        let Private=${Private}*1024
                        let Sum=${Shared}+${Private}

                        echo -e "$Private + $Shared = $Sum \t $Name"
                fi
        fi
fi
}

#this function make conversion from bytes to Kb or Mb or Gb
convert()
{
value=$1
power=0
#if value 0, we make it like 0.00
if [ "$value" = "0" ];
then
        value="0.00"
fi

#We make conversion till value bigger than 1024, and if yes we divide by 1024
while [ $(echo "${value} > 1024"|bc) -eq 1 ]
do
        value=$(echo "scale=2;${value}/1024" |bc)
        let power=$power+1
done

#this part get b,kb,mb or gb according to number of divisions
case $power in
        0) reg=b;;
        1) reg=kb;;
        2) reg=mb;;
        3) reg=gb;;
esac

echo -n "${value} ${reg} "
}



#if argument passed script will show statistic only for that pid, of not � we list all processes in /proc/ #and get statistic for all of them, all result we store in file /tmp/res
if [ $# -eq 0 ]
then
        pids=`ls /proc | grep -e [0-9] | grep -v [A-Za-z] `
        for i in $pids
        do
        get_process_mem $i >> "$aaa_work_dir/res"
        done
else
        get_process_mem $1>> "$aaa_work_dir/res"
fi


#This will sort result by memory usage
cat "$aaa_work_dir/res" | sort -gr -k 5 > "$aaa_work_dir/res2"

#this part will get uniq names from process list, and we will add all lines with same process list
#we will count nomber of processes with same name, so if more that 1 process where will be
# process(2) in output
for Name in `cat "$aaa_work_dir/res2" | awk '{print $6}' | sort | uniq`
do
count=`cat "$aaa_work_dir/res2" | awk -v src=$Name '{if ($6==src) {print $6}}'|wc -l| awk '{print $1}'`
if [ $count = "1" ];
then
        count=""
else
        count="(${count})"
fi

VmSizeKB=`cat "$aaa_work_dir/res2" | awk -v src=$Name '{if ($6==src) {print $1}}' | paste -sd+ | bc`
VmRssKB=`cat "$aaa_work_dir/res2" | awk -v src=$Name '{if ($6==src) {print $3}}' | paste -sd+ | bc`
total=`cat "$aaa_work_dir/res2" | awk '{print $5}' | paste -sd+ | bc`
Sum=`echo "${VmRssKB}+${VmSizeKB}"|bc`
#all result stored in "$aaa_work_dir/res3 file"
echo -e "$VmSizeKB + $VmRssKB = $Sum \t ${Name}${count}" >>"$aaa_work_dir/res3"
done


#this make sort once more.
cat "$aaa_work_dir/res3" | sort -gr -k 5 | uniq > "$aaa_work_dir/res"

#now we print result , first header
echo -e "Private \t + \t Shared \t = \t RAM used \t Program"
#after we read line by line of temp file
while read line
do
        echo $line | while read a b c d e f
        do
#we print all processes if Ram used if not 0
                if [ $e != "0" ]; then
#here we use function that make conversion
                echo -en "`convert $a` \t $b \t `convert $c` \t $d \t `convert $e` \t $f"
                echo ""
                fi
        done
done < "$aaa_work_dir/res"

#this part print footer, with counted Ram usage
echo "--------------------------------------------------------"
echo -e "\t\t\t\t\t\t `convert $total`"
echo "========================================================"

# we clean temporary file
[[ -f "$aaa_work_dir/res" ]] && rm -f "$aaa_work_dir/res"
[[ -f "$aaa_work_dir/res2" ]] && rm -f "$aaa_work_dir/res2"
[[ -f "$aaa_work_dir/res3" ]] && rm -f "$aaa_work_dir/res3"
<file_sep>#!/bin/bash


Usage() {
  cat <<EOF
usage: ${0##*/} [options] < name of boot.img fle.. defaults to boot.img> < name of file to edit defaults to init.rc >

	-t < leave temp dirs on exit >
	-x just recompress
	-c do not recompress on exit
 
EOF
}



if [[ $1 = @(-h|--help) ]]; then
  Usage
  exit 1
fi

#source common functions
if [[ -r /usr/bin/aaa-common-functions ]]; then
	. /usr/bin/aaa-common-functions
	if [[ ! $? -eq 0 ]]; then
		echo " failed to source common functions at /usr/bin/aaa-common-functions"
		echo "quitting !! "
		exit 1
	fi
else
	echo " failed to find common functions at /usr/bin/aaa-common-functions"
	echo "quitting !! "
	exit 1
fi


# get options and arguments http://wiki.bash-hackers.org/howto/getopts_tutorial

while getopts ":tcx" opt; do
  case $opt in
	t) no_clean=1 ;;
	x) just_compress=1 ;;
	c) if [[ $just_compress -eq 1 ]]; then
			Info " -x passed, hence -c makes no sense "
			exit 1
		else
			no_recompress=1
		fi ;;
	esac
done



#shift the options and args out the way http://wiki.bash-hackers.org/howto/getopts_tutorial
shift $((OPTIND-1))

image_name=${1:-boot.img}
shift
edit_target=${1:-init.rc}

clean_up() {
  
rm -rf ramdisk
rm -f bootimg.cfg
rm -f initrd.img
rm -f zImage

}

if [[ $just_compress -eq 1 ]]; then
	cd ramdisk
	find . | cpio -o -H newc | gzip > ../initrd.img
	cd ..
	abootimg --create "$image_name"_new -k zImage -r initrd.img
	[[ $no_clean -eq 1 ]] || clean_up
	exit 0
fi


abootimg -x "$image_name"


mkdir ramdisk
cp initrd.img ramdisk/initrd.gz
cd ramdisk
gunzip -c initrd.gz | cpio -i
rm initrd.gz
rm ../initrd.img

nano "$edit_target"

if [[ $no_recompress -eq 1 ]]; then
	Info "-c passed not recompressing"
else
	find . | cpio -o -H newc | gzip > ../initrd.img
	cd ..
	abootimg --create "$image_name"_new -k zImage -r initrd.img
	[[ $no_clean -eq 1 ]] || clean_up
fi


exit 0
<file_sep>#!/bin/bash

##### Install meld
apt-get -y install meld
#--- Configure meld
gconftool-2 --type bool --set /apps/meld/show_line_numbers true
gconftool-2 --type bool --set /apps/meld/show_whitespace true
gconftool-2 --type bool --set /apps/meld/use_syntax_highlighting true
gconftool-2 --type int --set /apps/meld/edit_wrap_lines 2

<file_sep>#!/bin/bash

##### Install tftp
#--- Client
apt-get -y install tftp
#--- Server
apt-get -y install atftpd


##### Install lynx
apt-get -y install lynx


##### Install p7zip
apt-get -y install p7zip


##### Install zip
apt-get -y install zip


##### Install pptp vpn support
apt-get -y install network-manager-pptp-gnome network-manager-pptp



##### Install the backdoor factory
apt-get -y install backdoor-factory


##### Install bully
apt-get -y install bully


##### Install seclist ~ http://bugs.kali.org/view.php?id=648
apt-get -y install seclists


##### Install unicornscan ~ http://bugs.kali.org/view.php?id=388
apt-get -y install unicornscan
<file_sep>#!/bin/bash

##### Setup ssh
rm -f /etc/ssh/ssh_host_*
rm -f /root/.ssh/*
ssh-keygen -A
ssh-keygen -b 4096 -t rsa -f /root/.ssh/id_rsa -P ""
#update-rc.d -f ssh remove; update-rc.d ssh enable    # Enable SSH at startup


<file_sep>#!/bin/bash


##### Install openvas
apt-get -y install openvas
openvas-setup   #<--- Doesn't automate
#--- Remove 'default' user (admin), and create a new admin user (root).
test -e /var/lib/openvas/users/admin && openvasad -c remove_user -n admin
test -e /var/lib/openvas/users/root || openvasad -c add_user -n root -r Admin   #<--- Doesn't automate
<file_sep>#!/bin/bash

#
# ##################################################################
#
# If you don't pass it any argument, this script will check if
# there's a control (debian/control) file somewhere in the current
# directory, and if it's so, it'll install the build dependencies
# listed there.
#
# If it gets a single argument, and it's the name of a file, it will
# read it, supposing that each line contains the name of a package,
# and install the build dependencies for all those.
#
# Otherwise, if there is more than one argument, or the given argument
# isn't the name of an existing file, it will suppose that the each
# argument is the name of a package, and install the dependencies for
# all of them.

#source common functions
. /usr/bin/aaa-common-functions


if [ $# -eq 0 ]
then
	#########################################################
	# Install the dependencies for the source package the
	# user is working on.
	
	if [ -f ../debian/control ]; then
		cd ..
	elif [ ! -f ./debian/control ]; then
		Info "\
Couldn't find file debian/control. You have to be inside the \
source directory of a Debian package or pass the name of the \
package(s) whose build dependencies you want to install in order \
to use this script."
		exit 1
	fi
	
	filepath="`pwd`/debian/control"
	missing_dependencies=$(dpkg-checkbuilddeps 2>&1)
	
	if [ -z "$missing_dependencies" ]; then
		Info "The build dependencies described in «$filepath» are already satisfied."
		exit 0
	fi
	
	Info "ok going to simulate your packages installation with dpkg-checkbuilddeps, check shit !!"
	Info "source = «$filepath» "
	Info "$missing_dependencies"
	Info "if your mixing repos between stable etc WATCH out results can be unpredictable"
	MenuActive "q" "to quit, any other key to continue"
	read -s -n1 aaatmpchr
	if [[ $aaatmpchr == "q" ]]; then
		exit 1
	fi

	aptitude -s install $(echo $missing_dependencies | awk -F: '{ print $3 }' | sed 's/([^)]*)//g' | sed 's/|\s[^\s]*//g')
	#' <--- Fix to avoid Geanys markup breaking
		
		
	Info "all cool ?????"
	MenuActive "q" "to quit with a return of 0"
	MenuActive "any other key" "to quit with a return of 1"
	MenuActive "p" "to try to use pbuilder if installed on the system"
	MenuActive "y" "to process the apt action"
	Info "proceed with caution, pbuilder does this fully automatic"
	Info "if not setup correctly it can and will fuck your system"
	read -s -n1 aaatmpchr
	if [[ $aaatmpchr == "y" ]]; then
		aptitude install $(echo $missing_dependencies | awk -F: '{ print $3 }' | sed 's/([^)]*)//g' | sed 's/|\s[^\s]*//g')
		#' <--- Fix to avoid Geanys markup breaking
		exit 0
	fi
	if [[ $aaatmpchr == "p" ]]; then
		if [[ -x /usr/lib/pbuilder/pbuilder-satisfydepends ]];then
			Warn "proceed with caution, pbuilder does this fully automatic"
			Warn "if not setup correctly it can and will fuck your system"
			Warn "so its best you vcheck it functions correctly before proceeding"
			MenuActive "y" "to proceed with pbuilder"
			read -s -n1 aaatmpchr
			if [[ $aaatmpchr == "y" ]]; then
				/usr/lib/pbuilder/pbuilder-satisfydepends
			else
				exit 1
			fi
		else
			axe_fuck "pbuilder not installed"
			exit 1
		fi
	fi
	[[ $aaatmpchr == "q" ]] && exit 0
	exit 1
elif [ $# -eq 1 ]
then
	#########################################################
	# Check if the given argument is a file name, else
	# continue after the if.
	if [ -f $1 ]
	then
		packages=''
		Info "you passsed the argument $1 you sure ?"
		Info "q to quit, any other key to continue"
		read -s -n1 aaatmpchr
		if [[ $aaatmpchr == "q" ]]; then
			exit 0
		fi
		Info "Installing the build dependencies for the following packages $1:"
		
		while read line
		do
			echo $line
			packages="$packages $line"
		done < $1
		echo
		apt-get build-dep $packages
		exit 0
	fi

	#########################################################
	# All arguments should be package names, install
	# their build dependencies.

	echo -e -n  "ok going to simulate your packages installation, check shit !!"
	MenuActive "q" "to quit, any other key to continue"
	read -s -n1 aaatmpchr
	if [[ $aaatmpchr == "q" ]]; then
		exit 0
	fi
	apt-get --simulate build-dep $*

	Info "all cool ?????"
	MenuActive "q" "to quit, any other key to continue"
	read -s -n1 aaatmpchr
	if [[ $aaatmpchr == "q" ]]; then
		exit 0
	fi

	apt-get build-dep $*

fi
<file_sep>#!/bin/bash


##### Configure samba
#--- Create samba user
useradd -M  -d /nonexistent -s /bin/false samba
#--- Use samba user
grep -q 'guest account =' /etc/samba/smb.conf
if [ $? -eq 0 ]; then sed -i 's/guest account = .*/guest account = samba/' /etc/samba/smb.conf; else sed -i 's/\[global\]/\[global\]\n   guest account = samba/' /etc/samba/smb.conf; fi
#--- Create samba path and configure it
mkdir -p /var/samba/
chown -R samba:samba /var/samba/
chmod -R 0770 /var/samba/
#--- Setup samba paths
grep -q '\[shared\]' /etc/samba/smb.conf || echo -e '\n[shared]\n   comment = Shared\n   path = /var/samba/\n   browseable = yes\n   read only = no\n   guest ok = yes' >> /etc/samba/smb.conf
#grep -q '\[www\]' /etc/samba/smb.conf || echo -e '\n[www]\n   comment = WWW\n   path = /var/www/\n   browseable = yes\n   read only = yes\n   guest ok = yes' >> /etc/samba/smb.conf
#--- Check result
#service samba restart
#smbclient -L \\127.0.0.1 -N
#service samba stop
<file_sep>#!/bin/bash


##### Install nessus
#--- Get download link
xdg-open http://www.tenable.com/products/nessus/select-your-operating-system    #wget "http://downloads.nessus.org/<file>" -O /tmp/nessus.deb   # ***!!! Hardcoded version value
dpkg -i /usr/local/src/Nessus-*-debian6_i386.deb
#rm -f /tmp/nessus.deb
/opt/nessus/sbin/nessus-adduser   #<--- Doesn't automate
xdg-open http://www.tenable.com/products/nessus/nessus-plugins/register-a-homefeed
#--- Check email
 /opt/nessus/bin/nessus-fetch --register <key>   #<--- Doesn't automate
service nessusd start

<file_sep>#!/bin/bash


##### Install htshells ~ http://bugs.kali.org/view.php?id=422
git clone git://github.com/wireghoul/htshells.git /usr/share/htshells/


##### Install veil ~ http://bugs.kali.org/view.php?id=421
apt-get -y install veil


##### Install mingw
apt-get -y install mingw-w64 binutils-mingw-w64 gcc-mingw-w64 mingw-w64-dev mingw-w64-tools

<file_sep># my alias for local test build
alias build='dpkg-buildpackage -us -uc -j$((    $(cat /proc/cpuinfo | grep processor | wc -l)+1    ))'

#debian dev, quilt aliases
alias dquilt="quilt --quiltrc=${HOME}/.quiltrc-dpkg"
complete -F _quilt_completion $_quilt_complete_opt dquilt

### tmux
alias tmux="tmux attach || tmux new"


### axel
alias axel="axel -a"


### screen
alias screen="screen -xRR"


### Directory navigation aliases
alias ..="cd .."
alias ...="cd ../.."
alias ....="cd ../../.."
alias .....="cd ../../../.."



### Extract file, example. "ex package.tar.bz2"
ex() {
    if [[ -f $1 ]]; then
        case $1 in
            *.tar.bz2)   tar xjf $1  ;;
            *.tar.gz)    tar xzf $1  ;;
            *.bz2)       bunzip2 $1  ;;
            *.rar)       rar x $1    ;;
            *.gz)        gunzip $1   ;;
            *.tar)       tar xf $1   ;;
            *.tbz2)      tar xjf $1  ;;
            *.tgz)       tar xzf $1  ;;
            *.zip)       unzip $1    ;;
            *.Z)         uncompress $1  ;;
            *.7z)        7z x $1     ;;
            *)           echo $1 cannot be extracted ;;
        esac
    else
        echo $1 is not a valid file
    fi
}




### compress file, example. "comp package.tar.bz2 directory name"
comp() {
    if [[ -f $1 ]]; then
        case $1 in
            *.tar.bz2)   tar xjf $1  ;;
            *.tar.gz)    tar xzf $1  ;;
            *.bz2)       bunzip2 $1  ;;
            *.rar)       rar x $1    ;;
            *.gz)        gunzip $1   ;;
            *.tar)       tar xf $1   ;;
            *.tbz2)      tar xjf $1  ;;
            *.tgz)       tar xzf $1  ;;
            *.zip)       unzip $1    ;;
            *.Z)         uncompress $1  ;;
            *.7z)        7z x $1     ;;
            *)           echo $1 cannot be extracted ;;
        esac
    else
        echo $1 is not a valid file
    fi
}






<file_sep>#!/bin/bash
Usage() {
  cat <<EOF
usage: ${0##*/} [options]

  -c remove all symlinks,restore
  backups
  
  

EOF
}

if [[ $1 = @(-h|--help) ]]; then
  Usage
  exit 1
fi


bin_path="/usr/bin"

while getopts ':c' arg; do
	case "$arg" in
		c) clean=1 ;;
	esac
done


if [[ ! clean -eq 1 ]]; then
	for file in `find . -maxdepth 1 -mindepth 1 -type f -executable`; do 
		[[ ${file#./} == "aaa-linkup" ]] || ln -s -f "$(pwd)/${file#./}" "$bin_path/${file#./}"
	done
	cd ./conf
	for file in `find . -type f`; do 
		case ${file#./} in
			10_linux|40_custom) [[ -L "/etc/grub.d/${file#./}" ]] || ln -s -b --suffix=.aaa-backup "$(pwd)/${file#./}" "/etc/grub.d/${file#./}" ;;
			nvidia-kernel-common.conf) [[ -L "/etc/modprobe.d/${file#./}" ]] || ln -s -b --suffix=.aaa-backup "$(pwd)/${file#./}" "/etc/modprobe.d/${file#./}" ;;
			grub2.png) [[ -L "/boot/grub/${file#./}" ]] || ln -s -b --suffix=.aaa-backup "$(pwd)/${file#./}" "/boot/grub/${file#./}" ;;
			grub) [[ -L "/etc/default/${file#./}" ]] || ln -s -b --suffix=.aaa-backup "$(pwd)/${file#./}" "/etc/default/${file#./}" ;;
			#inittab|bash.bashrc|rc.local) [[ -L "/etc/${file#./}" ]] || ln -s -b --suffix=.aaa-backup "$(pwd)/${file#./}" "/etc/${file#./}" ;;
			xorg.conf) [[ -L "/etc/X11/${file#./}" ]] || ln -s -b --suffix=.aaa-backup "$(pwd)/${file#./}" "/etc/X11/${file#./}" ;;
			.bash_aliases|.bashrc|.quiltrc) [[ -L "$HOME/${file#./}" ]] || ln -s -b --suffix=.aaa-backup "$(pwd)/${file#./}" "$HOME/${file#./}" ;;
			sources.list) [[ -L "/etc/apt/${file#./}" ]] || ln -s -b --suffix=.aaa-backup "$(pwd)/${file#./}" "/etc/apt//${file#./}" ;;
		esac
		
	done
else
	for file in `find . -maxdepth 1 -mindepth 1 -type f -executable`; do 
		rm -f "$bin_path/${file#./}" >/dev/null 2>&1
	done
	
	cd ./conf
	for file in `find . -maxdepth 1 -mindepth 1 -type f`; do 
	
		case ${file#./} in
			10_linux|40_custom) [[ -L "/etc/grub.d/${file#./}" ]] && rm -f "/etc/grub.d/${file#./}"
								mv -f "/etc/grub.d/${file#./}.aaa-backup" "/etc/grub.d/${file#./}" >/dev/null 2>&1 ;;
			nvidia-kernel-common.conf) [[ -L "/etc/modprobe.d/${file#./}" ]] && rm -f "/etc/modprobe.d/${file#./}"
									mv -f "/etc/modprobe.d/${file#./}.aaa-backup" "/etc/modprobe.d/${file#./}" >/dev/null 2>&1 ;;
			grub) [[ -L "/etc/default/${file#./}" ]] && rm -f "/etc/default/${file#./}"
					mv -f "/etc/default/${file#./}.aaa-backup" "/etc/default/${file#./}" >/dev/null 2>&1 ;;
			grub2.png) [[ -L "/boot/grub/${file#./}" ]] && rm -f "/boot/grub/${file#./}"
					mv -f "/boot/grub/${file#./}.aaa-backup" "/boot/grub/${file#./}" >/dev/null 2>&1 ;;
			#inittab|bash.bashrc|rc.local) [[ -L "/etc/${file#./}" ]] && rm -f "/etc/${file#./}"
			#		mv -f "/etc/${file#./}.aaa-backup" "/etc/${file#./}" >/dev/null 2>&1 ;;
			xorg.conf) [[ -L "/etc/X11/${file#./}" ]] && rm -f "/etc/X11/${file#./}"
						mv -f "/etc/X11/${file#./}.aaa-backup" "/etc/X11/${file#./}" >/dev/null 2>&1 ;;
			.bash_aliases|.bashrc|.quiltrc) [[ -L "$HOME/${file#./}" ]] && rm -f "$HOME/${file#./}" 
									mv -f "$HOME/${file#./}.aaa-backup" "$HOME/${file#./}" >/dev/null 2>&1 ;;
			sources.list) [[ -L "/etc/apt/${file#./}" ]] && rm -f "/etc/apt/${file#./}"
						mv -f "/etc/apt/${file#./}.aaa-backup" "/etc/apt/${file#./}" >/dev/null 2>&1 ;;
		esac
		
	done


fi
<file_sep>#!/bin/bash

################ common header identical except for usage, getopts etc #########################################################################################################


Usage() {
  cat <<EOF
usage: ${0##*/} [options] </path/to/pkg/dir>

  checks packages on system.. bla bla
  

EOF
}



if [[ $1 = @(-h|--help) ]]; then
  Usage
  exit 1
fi

#source common functions
if [[ -r /usr/bin/aaa-common-functions ]]; then
	. /usr/bin/aaa-common-functions
	if [[ ! $? -eq 0 ]]; then
		echo " failed to source common functions at /usr/bin/aaa-common-functions"
		echo "quitting !! "
		exit 1
	fi
else
	echo " failed to find common functions at /usr/bin/aaa-common-functions"
	echo "quitting !! "
	exit 1
fi

#source config
if [ -r /etc/aaa-master-config ]; then
  Info "found my master config file.. reading it"
  . /etc/aaa-master-config
	if [ -r $HOME/.aaa-local-config ]; then
		Info "found a local settings file.. reading it"
		. $HOME/.aaa-local-config
	fi
else
	Fuck "Failed to find master config file quitting"
	exit 1
fi

#source settings
if [ -r $HOME/.aaa_settings ]; then
  Info "found a settings file.. reading it"
  . $HOME/.aaa_settings
fi


 
for installed_pkg in $(dpkg-query -W | grep -v "kali" | awk '{print $1; }'); do
	Info "checking package $installed_pkg"
	found_one=$(apt-cache madison "$installed_pkg" | sed 's/http:\/\/http.kali.org\/kali\/ kali//' | sed 's/http:\/\/security.kali.org\/kali-security\/ kali//' | grep "kali")
	if [[ ! -z $found_one ]]; then
		Warn "the package $installed_pkg is present in the kali repos as a kali version"
		Warn "but in your system the version is not the kali one"
		quit_char=""
		while [[ ! $quit_char == "q" ]]; do
			Warn "$found_one"
			MenuActive "v" "run apt-cache madison $installed_pkg"
			MenuActive "a" "run aptitude versions $installed_pkg"
			MenuActive "r" "run aptitude"
			MenuActive "any other key" "to continue finding"
			read -s -n1 _AXE_TMP_CHAR
			case "$_AXE_TMP_CHAR" in
				v|V) vdetail=$(apt-cache madison "$installed_pkg")
					Info "$vdetail" ;;
				a|A) adetail=$(aptitude versions $installed_pkg)
					Info "$adetail" ;;
				r|R) aptitude ;;
				*) quit_char="q" ;;
			esac
		done
	fi
done
<file_sep>#!/bin/bash


Usage() {
  cat <<EOF
usage: ${0##*/}

EOF
}

if [[ $1 = @(-h|--help) ]]; then
  Usage
  exit 0
fi

#check eclipse bins present in default locations

if [[ ! -e /usr/share/android-sdk/platform-tools/adb ]]; then
	echo "/usr/share/android-sdk/platform-tools/adb not present"
	exit 1
fi

if [[ ! -e /usr/share/android-sdk/platform-tools/fastboot ]]; then
	echo "/usr/share/android-sdk/platform-tools/fastboot not present"
	exit 1
fi

if [[ ! -e /usr/bin/adb ]]; then
	echo "/usr/bin/adb not present"
	exit 1
fi

if [[ ! -e /usr/bin/fastboot ]]; then
	echo "/usr/bin/fastboot not present"
	exit 1
fi

if [[ -e /usr/bin/adb.debian]]; then
	echo "/usr/bin/adb.debian already prsent present"
	exit 1
fi


#android

#rename /sdk/adb to adb.sdk, and fastboot

mv /usr/share/android-sdk/platform-tools/adb /usr/share/android-sdk/platform-tools/adb.sdk
mv /usr/share/android-sdk/platform-tools/fastboot /usr/share/android-sdk/platform-tools/fastboot.sdk


#rename /etc/bin/adb to adb.debian, and fastboot

update-alternatives --install /usr/bin/adb adb /usr/bin/adb.debian 40 --slave /usr/bin/fastboot fastboot /usr/bin/adb.debian
update-alternatives --install /usr/bin/adb adb /usr/share/android-sdk/platform-tools/adb.sdk 60 --slave /usr/bin/fastboot fastboot /usr/share/android-sdk/platform-tools/fastboot.sdk
<file_sep>#!/bin/bash


##### Install filezilla
apt-get -y install filezilla
#--- Configure filezilla
filezilla & sleep 5; killall -w filezilla   # Start and kill. Files needed for first time run
sed -i 's/^.*"Default editor".*/\t<Setting name="Default editor" type="string">2\/usr\/bin\/geany<\/Setting>/' /root/.filezilla/filezilla.xml
<file_sep>#!/bin/bash

##### Install zsh
apt-get -y install zsh git
#--- Setup oh-my-zsh
curl -s -L https://github.com/robbyrussell/oh-my-zsh/raw/master/tools/install.sh | sh
#--- Configure zsh
file=/root/.zshrc; [ -e $file ] && cp -n $file{,.bkup}   #/etc/zsh/zshrc
grep -q interactivecomments /root/.zshrc || echo "setopt interactivecomments" >> /root/.zshrc
grep -q ignoreeof /root/.zshrc || echo "setopt ignoreeof" >> /root/.zshrc
grep -q correctall /root/.zshrc || echo "setopt correctall" >> /root/.zshrcsudo
grep -q globdots /root/.zshrc || echo "setopt globdots" >> /root/.zshrc
grep -q bash_aliases /root/.zshrc || echo -e 'source $HOME/.bash_aliases' >> /root/.zshrc   #grep -q bashrc /root/.zshrc || echo -e 'source $HOME/.bashrc' >> /root/.zshrc
#--- Configure zsh (themes) ~ https://github.com/robbyrussell/oh-my-zsh/wiki/Themes
sed -i 's/ZSH_THEME=.*/ZSH_THEME="alanpeabody"/' /root/.zshrc   # alanpeabody jreese   mh   candy   terminalparty kardan   nicoulaj sunaku    (Other themes I liked)
#--- Configure oh-my-zsh
sed -i 's/.*DISABLE_AUTO_UPDATE="true"/DISABLE_AUTO_UPDATE="true"/' /root/.zshrc
sed -i 's/plugins=(.*)/plugins=(git screen tmux last-working-dir)/' /root/.zshrc
#--- Set zsh as default
chsh -s `which zsh`
#--- Use zsh
#/usr/bin/env zsh
#source /root/.zshrc

<file_sep>#!/bin/bash

################ common header identical except for usage, getopts etc #########################################################################################################
shopt -s extglob

cd "$HOME"

Usage() {
  cat <<EOF
usage: ${0##*/} [options] distro

  usage: aaa-word-lists-setup

  Currently this script takes no
  options or arguments, when called it
  sets up individual wordlists and makes a bunch
  os simlinks
  

EOF
}

if [[ $1 = @(-h|--help) ]]; then
  Usage
  exit 1
fi

export AAA_DEBIAN_DISTRO=""
export AAA_SUPRESS_LOCAL_PBUILDERRC="yes"


#source common functions
if [[ -r /usr/bin/aaa-common-functions ]]; then
	. /usr/bin/aaa-common-functions
	if [[ ! $? -eq 0 ]]; then
		echo " failed to source common functions at /usr/bin/aaa-common-functions"
		echo "quitting !! "
		exit 1
	fi
else
	echo " failed to find common functions at /usr/bin/aaa-common-functions"
	echo "quitting !! "
	exit 1
fi

#source settings
if [ -r $HOME/.aaa_settings ]; then
  Info "found a settings file.. reading it"
  . $HOME/.aaa_settings
fi

#source config
if [ -r /etc/aaa-master-config ]; then
  Info "found my master config file.. reading it"
  . /etc/aaa-master-config
	if [ -r $HOME/.aaa-local-config ]; then
		Info "found a local settings file.. reading it"
		. $HOME/.aaa-local-config
	fi
else
	Fuck "Failed to find master settings file quitting"
	exit 1
fi




##### Configure (TTY) resolution
file=/etc/default/grub; [ -e $file ] && cp -n $file{,.bkup}
sed -i 's/GRUB_TIMEOUT=.*/GRUB_TIMEOUT=1/' /etc/default/grub
sed -i 's/GRUB_CMDLINE_LINUX_DEFAULT=.*/GRUB_CMDLINE_LINUX_DEFAULT="vga=0x0318 quiet"/' /etc/default/grub
update-grub



##### Configure terminal (need to restart xserver)
gconftool-2 --type bool --set /apps/gnome-terminal/profiles/Default/scrollback_unlimited true    # Terminal -> Edit -> Profile Preferences -> Scrolling -> Scrollback: Unlimited -> Close
#gconftool-2 --type string --set /apps/gnome-terminal/profiles/Default/background_darkness 0.85611499999999996   # Not working 100%!
gconftool-2 --type string --set /apps/gnome-terminal/profiles/Default/background_type transparent



##### Configure startup (randomize the hostname, eth0 & wlan0's MAC address)
#if [[ `grep -q macchanger /etc/rc.local; echo $?` == 1 ]]; then sed -i 's#^exit 0#for int in eth0 wlan0; do\n\tifconfig $int down\n\t/usr/bin/macchanger -r $int \&\& sleep 3\n\tifconfig $int up\ndone\n\n\nexit 0#' /etc/rc.local; fi
##echo -e '#!/bin/bash\nfor int in eth0 wlan0; do\n\techo "Randomizing: $int"\n\tifconfig $int down\n\tmacchanger -r $int\n\tsleep 3\n\tifconfig $int up\n\techo "--------------------"\ndone\nexit 0' > /etc/init.d/macchanger
##echo -e '#!/bin/bash\n[ "$IFACE" == "lo" ] && exit 0\nifconfig $IFACE down\nmacchanger -r $IFACE\nifconfig $IFACE up\nexit 0' > /etc/network/if-pre-up.d/macchanger
#grep -q "hostname" /etc/rc.local hostname || sed -i 's#^exit 0#hostname $(cat /dev/urandom | tr -dc "A-Za-z" | head -c8)\nexit 0#' /etc/rc.local


##### Install terminator
apt-get -y install terminator
#--- Configure terminator
if [ -e /root/.config/terminator/config ]; then cp -n /root/.config/terminator/config{.bkup}; fi
mkdir -p /root/.config/terminator/
echo -e '[global_config]\n  enabled_plugins = TerminalShot, LaunchpadCodeURLHandler, APTURLHandler, LaunchpadBugURLHandler\n[keybindings]\n[profiles]\n  [[default]]\n    background_darkness = 0.9\n    copy_on_selection = True\n    background_type = transparent\n    scrollback_infinite = True\n[layouts]\n  [[default]]\n    [[[child1]]]\n      type = Terminal\n      parent = window0\n    [[[window0]]]\n      type = Window\n      parent = ""\n[plugins]' > /root/.config/terminator/config

<file_sep>#!/bin/bash

Usage() {
  cat <<EOF
usage: ${0##*/} [ubunturelease] [ppa:user/ppa-name]

EOF
}

if [[ $1 = @(-h|--help) ]]; then
  Usage
  exit 1
fi



if [ $# -eq 2 ]
NM=`uname -a && date`
NAME=`echo $NM | md5sum | cut -f1 -d" "`
then
	ppa_name=`echo "$2" | cut -d":" -f2 -s`
	if [ -z "$ppa_name" ]
	then
		echo "PPA name not found"
		echo "Utility to add PPA repositories in your debian machine"
		echo "$0 ubunturelease ppa:user/ppa-name"
	else
		echo "$ppa_name"
		echo "deb http://ppa.launchpad.net/$ppa_name/ubuntu $1 main" >> /etc/apt/sources.list
		apt-get update >> /dev/null 2> /tmp/${NAME}_apt_add_key.txt
		key=`cat /tmp/${NAME}_apt_add_key.txt | cut -d":" -f6 | cut -d" " -f3`
		apt-key adv --keyserver keyserver.ubuntu.com --recv-keys $key
		rm -rf /tmp/${NAME}_apt_add_key.txt
	fi
else
	echo "Utility to add PPA repositories in your debian machine"
	echo "$0 ubunturelease ppa:user/ppa-name"
fi
<file_sep>#!/bin/sh
exec tail -n +3 $0
# This file provides an easy way to add custom menu entries.  Simply type the
# menu entries you want to add after this comment.  Be careful not to change
# the 'exec tail' line above.
menuentry "Windows 7 EDA EMBEDDED CODE (on /dev/sda1)" --class windows --class os {
	savedefault
	insmod part_msdos
	insmod ntfs
	parttool (hd0,1) hidden-
	parttool (hd0,3) hidden+
	parttool (hd1,1) hidden+
	parttool (hd1,2) hidden+
	set root='(hd0,msdos1)'
	chainloader +1
	parttool (hd0,1) boot+
}
menuentry "Windows 7 GAMES/3D DESIGN/2D DESIGN (on /dev/sda3)" --class windows --class os {
	savedefault
	insmod part_msdos
	insmod ntfs
	parttool (hd0,1) hidden+
	parttool (hd0,3) hidden-
	parttool (hd1,1) hidden+
	parttool (hd1,2) hidden+
	set root='(hd0,msdos3)'
	chainloader +1
	parttool (hd0,3) boot+
}
menuentry "Windows 7 CODE/OFFICE (on /dev/sdb1)" --class windows --class os {
	savedefault
	insmod part_msdos
	insmod ntfs
	parttool (hd0,1) hidden+
	parttool (hd0,3) hidden+
	parttool (hd1,1) hidden-
	parttool (hd1,2) hidden+
	set root='(hd1,msdos1)'
	chainloader +1
	parttool (hd1,1) boot+
}
menuentry "Windows 7 PLC/INDUSTRIAL PROGRAMMING (on /dev/sdb2)" --class windows --class os {
	savedefault
	insmod part_msdos
	insmod ntfs
	parttool (hd0,1) hidden+
	parttool (hd0,3) hidden+
	parttool (hd1,1) hidden+
	parttool (hd1,2) hidden-
	set root='(hd1,msdos2)'
	chainloader +1
	parttool (hd1,2) boot+
}<file_sep>#!/bin/bash

# fix broken $UID on some system...
if test "x$UID" = "x"; then
  if test -x /usr/xpg4/bin/id; then
    UID=`/usr/xpg4/bin/id -u`;
  else
    UID=`id -u`;
  fi
fi

# set $XDG_MENU_PREFIX to "xfce-" so that "xfce-applications.menu" is picked
# over "applications.menu" in all Xfce applications.
export XDG_MENU_PREFIX="xfce-"


# set DESKTOP_SESSION so that one can detect easily if an Xfce session is running
export DESKTOP_SESSION="xfce"

# $XDG_CONFIG_HOME defines the base directory relative to which user specific
# configuration files should be stored. If $XDG_CONFIG_HOME is either not set
# or empty, a default equal to $HOME/.config should be used.
export XDG_CONFIG_HOME="$HOME/.config"
[ -d "$XDG_CONFIG_HOME" ] || mkdir "$XDG_CONFIG_HOME"

# $XDG_CACHE_HOME defines the base directory relative to which user specific
# non-essential data files should be stored. If $XDG_CACHE_HOME is either not
# set or empty, a default equal to $HOME/.cache should be used.

export XDG_CACHE_HOME="$HOME/.cache"
[ -d "$XDG_CACHE_HOME" ] || mkdir "$XDG_CACHE_HOME"


# Modify libglade and glade environment variables so that
# it will find the files installed by Xfce
GLADE_CATALOG_PATH="$GLADE_CATALOG_PATH:"
GLADE_PIXMAP_PATH="$GLADE_PIXMAP_PATH:"
GLADE_MODULE_PATH="$GLADE_MODULE_PATH:"
export GLADE_CATALOG_PATH
export GLADE_PIXMAP_PATH
export GLADE_MODULE_PATH

# For now, start with an empty list
XRESOURCES=""

# Has to go prior to merging Xft.xrdb, as its the "Defaults" file
test -r "/etc/xdg/xfce4/Xft.xrdb" && XRESOURCES="$XRESOURCES /etc/xdg/xfce4/Xft.xrdb"
test -r $HOME/.Xdefaults && XRESOURCES="$XRESOURCES $HOME/.Xdefaults"

BASEDIR=$XDG_CONFIG_HOME/xfce4
if test -r "$BASEDIR/Xft.xrdb"; then
  XRESOURCES="$XRESOURCES $BASEDIR/Xft.xrdb"
elif test -r "$XFCE4HOME/Xft.xrdb"; then
  mkdir -p "$BASEDIR"
  cp "$XFCE4HOME/Xft.xrdb" "$BASEDIR"/
  XRESOURCES="$XRESOURCES $BASEDIR/Xft.xrdb"
fi

# merge in X cursor settings
test -r "$BASEDIR/Xcursor.xrdb" && XRESOURCES="$XRESOURCES $BASEDIR/Xcursor.xrdb"

# ~/.Xresources contains overrides to the above
test -r "$HOME/.Xresources" && XRESOURCES="$XRESOURCES $HOME/.Xresources"

# load all X resources (adds /dev/null to avoid an empty list that would hang the process)
cat /dev/null $XRESOURCES | xrdb -merge -

# load local modmap
test -r $HOME/.Xmodmap && xmodmap $HOME/.Xmodmap


/usr/bin/xfce4-session

exit 0
<file_sep>#!/bin/bash


##### Install geany
apt-get -y install geany
#--- Add to panel
dconf load /org/gnome/gnome-panel/layout/objects/geany/ << EOT
[instance-config]
location='/usr/share/applications/geany.desktop'

[/]
object-iid='PanelInternalFactory::Launcher'
pack-index=3
pack-type='start'
toplevel-id='top-panel'
EOT
dconf write /org/gnome/gnome-panel/layout/object-id-list "$(dconf read /org/gnome/gnome-panel/layout/object-id-list | sed "s/]/, 'geany']/")"
#--- Configure geany
geany & sleep 5; killall -w geany   # Start and kill. Files needed for first time run
# Geany -> Edit -> Preferences. Editor -> Newline strips trailing spaces: Enable. -> Indentation -> Type: Spaces. -> Files -> Strip trailing spaces and tabs: Enable. Replace tabs by space: Enable. -> Apply -> Ok
sed -i 's/^.*indent_type.*/indent_type=0/' /root/.config/geany/geany.conf   # Spaces over tabs
sed -i 's/^.*pref_editor_newline_strip.*/pref_editor_newline_strip=true/' /root/.config/geany/geany.conf
sed -i 's/^.*pref_editor_replace_tabs.*/pref_editor_replace_tabs=true/' /root/.config/geany/geany.conf
sed -i 's/^.*pref_editor_trail_space.*/pref_editor_trail_space=true/' /root/.config/geany/geany.conf
sed -i 's/^check_detect_indent=.*/check_detect_indent=true/' /root/.config/geany/geany.conf
sed -i 's/^pref_editor_ensure_convert_line_endings=.*/pref_editor_ensure_convert_line_endings=true/' /root/.config/geany/geany.conf
# Geany -> Tools -> Plugin Manger -> Save Actions -> HTML Characters: Enabled. Split WIndows: Enabled. Save Actions: Enabled. -> Preferences -> Backup Copy -> Enable -> Directory to save backup files in: /root/backups/geany/. Directory levels to include in the backup destination: 5 -> Apply -> Ok -> Ok
sed -i 's/^.*active_plugins.*/active_plugins=\/usr\/lib\/geany\/htmlchars.so;\/usr\/lib\/geany\/saveactions.so;\/usr\/lib\/geany\/splitwindow.so;/' /root/.config/geany/geany.conf
mkdir -p /root/backups/geany/
mkdir -p /root/.config/geany/plugins/saveactions/
echo -e '\n[saveactions]\nenable_autosave=false\nenable_instantsave=false\nenable_backupcopy=true\n\n[autosave]\nprint_messages=false\nsave_all=false\ninterval=300\n\n[instantsave]\ndefault_ft=None\n\n[backupcopy]\ndir_levels=5\ntime_fmt=%Y-%m-%d-%H-%M-%S\nbackup_dir=/root/backups/geany' > /root/.config/geany/plugins/saveactions/saveactions.conf

<file_sep>#!/bin/bash


##### Configure metasploit ~ http://docs.kali.org/general-use/starting-metasploit-framework-in-kali
#--- Start services
service postgresql start
service metasploit start
#--- Misc
export GOCOW=1   # Always a cow logo ;)
grep -q GOCOW /root/.bashrc || echo 'GOCOW=1' >> /root/.bashrc
#--- First time run
echo 'exit' > /tmp/msf.rc   #echo -e 'go_pro\nexit' > /tmp/msf.rc
msfconsole -r /tmp/msf.rc
#--- Sort out metasploiit
bash /opt/metasploit/scripts/launchui.sh    #<--- Doesn't automate. May take a little while to kick in
#--- Clean up
rm -f /tmp/msf.rc
<file_sep>aaa-admin-scripts
=================

admin scripts

aaa-add-ppa
usage: ubunturelease ppa:user/ppa-name

aaa-aliases
depreciated---- aliases added manually in .bash_aliases and symlinked from gitdir to home dir via aaa-linkup

aaa-android-alternatives
sets up alternatives for fastboot and adb between the sdk versions and debian versions
----needs work since renaming /usr/bin/adb will fuck up debian packaging system

aaa-edit-ramdisk
script to edit selected files within android kernel image ramdisk
this includes decompressing the disc and recompressing afterwards

aaa-kali-pkg-check
script checks each package on system to see if it should be a kali package but is not
-----working but needs little tidying and error checking

aaa-linkup
symlinks various files from the github dir to various system locations
allows a central location to update/keep working on files

aaa-meminfo
coppied script which displays advanced mem use info


aaa-mod-deps
script to modify deps in dbian package

aaa-wordlists
setup wordlists on kali sysem

STATUS: nearly done
<file_sep>#!/bin/sh


##### Update wordlists ~ http://bugs.kali.org/view.php?id=429
#--- Extract rockyou wordlist
gzip -dc < /usr/share/wordlists/rockyou.txt.gz > /usr/share/wordlists/rockyou.txt   #gunzip rockyou.txt.gz
#rm -f /usr/share/wordlists/rockyou.txt.gz
#--- Extract sqlmap wordlist
#unzip -o -d /usr/share/sqlmap/txt/ /usr/share/sqlmap/txt/wordlist.zip
#--- Add 10,000 Top/Worst/Common Passwords
wget http://xato.net/files/10k%20most%20common.zip -O /tmp/10kcommon.zip
unzip -o -d /usr/share/wordlists/ /tmp/10kcommon.zip
rm -f /tmp/10kcommon.zip
mv -f /usr/share/wordlists/10k{\ most\ ,_most_}common.txt
#--- Linking to more - folders
ln -sf /usr/share/dirb/wordlists /usr/share/wordlists/dirb
ln -sf /usr/share/dirbuster/wordlists /usr/share/wordlists/dirbuster
ln -sf /usr/share/fern-wifi-cracker/extras/wordlists /usr/share/wordlists/fern-wifi
ln -sf /usr/share/metasploit-framework/data/john/wordlists /usr/share/wordlists/metasploit-jtr
ln -sf /usr/share/metasploit-framework/data/wordlists /usr/share/wordlists/metasploit
ln -sf /opt/metasploit/apps/pro/data/wordlists /usr/share/wordlists/metasploit-pro
ln -sf /usr/share/webslayer/wordlist /usr/share/wordlists/webslayer
ln -sf /usr/share/wfuzz/wordlist /usr/share/wordlists/wfuzz
#--- Linking to more - files
ln -sf /usr/share/sqlmap/txt/wordlist.txt /usr/share/wordlists/sqlmap.txt
ln -sf /usr/share/dnsmap/wordlist_TLAs.txt /usr/share/wordlists/dnsmap.txt
ln -sf /usr/share/golismero/wordlist/wfuzz/Discovery/all.txt /usr/share/wordlists/wfuzz.txt
ln -sf /usr/share/nmap/nselib/data/passwords.lst /usr/share/wordlists/nmap.lst
ln -sf /usr/share/set/src/fasttrack/wordlist.txt /usr/share/wordlists/fasttrack.txt
ln -sf /usr/share/termineter/framework/data/smeter_passwords.txt /usr/share/wordlists/termineter.txt
ln -sf /usr/share/w3af/core/controllers/bruteforce/passwords.txt /usr/share/wordlists/w3af.txt
ln -sf /usr/share/wpscan/spec/fixtures/wpscan/modules/bruteforce/wordlist.txt /usr/share/wordlists/wpscan.txt
ln -sf /usr/share/arachni/spec/fixtures/passwords.txt /usr/share/wordlists/arachni
ln -sf /usr/share/cisco-auditing-tool/lists/passwords /usr/share/wordlists/cisco-auditing-tool/
ln -sf /usr/share/wpscan/spec/fixtures/wpscan/wpscan_options/wordlist.txt /usr/share/wordlists/wpscan-options.txt
<file_sep>#!/bin/bash

#aaa-checked



##### Configure aliases
#--- Enable defaults
#for file in $HOME/.bash_aliases $HOME/.bashrc /etc/bashrc /etc/bash.bashrc; do
#   if [ -e $file ]; then cp -n $file{,.bkup}; fi
#   touch $file
#   sed -i 's/#alias/alias/g' $file
#done
#--- Add in ours
grep -q '### tmux' $HOME/.bash_aliases || echo -e '\n### tmux\nalias tmux="tmux attach || tmux new"\n' >> $HOME/.bash_aliases
grep -q '### axel' $HOME/.bash_aliases || echo -e '\n### axel\nalias axel="axel -a"\n' >> $HOME/.bash_aliases
grep -q '### screen' $HOME/.bash_aliases || echo -e '\n### screen\nalias screen="screen -xRR"\n' >> $HOME/.bash_aliases
grep -q '### Directory navigation aliases' $HOME/.bash_aliases || echo -e '\n### Directory navigation aliases\nalias ..="cd .."\nalias ...="cd ../.."\nalias ....="cd ../../.."\nalias .....="cd ../../../.."\n\n' >> $HOME/.bash_aliases
grep -q '### Extract file, example' $HOME/.bash_aliases || echo -e '\n### Extract file, example. "ex package.tar.bz2"\nex() {\n    if [[ -f $1 ]]; then\n        case $1 in\n            *.tar.bz2)   tar xjf $1  ;;\n            *.tar.gz)    tar xzf $1  ;;\n            *.bz2)       bunzip2 $1  ;;\n            *.rar)       rar x $1    ;;\n            *.gz)        gunzip $1   ;;\n            *.tar)       tar xf $1   ;;\n            *.tbz2)      tar xjf $1  ;;\n            *.tgz)       tar xzf $1  ;;\n            *.zip)       unzip $1    ;;\n            *.Z)         uncompress $1  ;;\n            *.7z)        7z x $1     ;;\n            *)           echo $1 cannot be extracted ;;\n        esac\n    else\n        echo $1 is not a valid file\n    fi\n}' >> $HOME/.bash_aliases
#--- Apply new aliases
source $HOME/.bash_aliases     #source /root/.bashrc    # If using ZSH, will fail
#--- Check
#alias

<file_sep>VER=1

CONFDIR = /usr/share/aaa

BINPROGS = \
	aaa-build \
	aaa-build-cinnamon-pbuilder-git \
	aaa-build-cinnamon-pbuilder-release \
	aaa-build-compiz-emerald \
	aaa-common-functions \
	aaa-setup-build-env \
	aaa-setup-tmpfs
	
PATCHES = \
	remove_elevated_privelages_banner.patch \
	142DPI.patch \
	convert_to_debian.patch
	
HOOKS = \
	D05deps
	

install:
	
	#install  dirs
	install -dm755 $(DESTDIR)$(CONFDIR)
	install -dm755 $(DESTDIR)$(CONFDIR)/patches
	install -dm755 $(DESTDIR)$(CONFDIR)/pbuilder
	install -dm755 $(DESTDIR)$(CONFDIR)/pbuilder/hooks
	#install conf files
	install -m755 aaa-master-config $(DESTDIR)$(CONFDIR)/aaa-master-config
	
	#install patches
	install -m744 $(PATCHES) $(DESTDIR)$(CONFDIR)/patches
	
	#install hooks
	install -m744 $(HOOKS) $(DESTDIR)$(CONFDIR)/pbuilder/hooks
	
	#install scripts
	install -m755 $(BINPROGS) $(DESTDIR)/usr/bin

uninstall:
	for f in $(BINPROGS); do $(RM) $(DESTDIR)/usr/bin/$$f; done
	rm -rf $(DESTDIR)$(CONFDIR)
	

.PHONY: install uninstall
<file_sep>#!/bin/bash


##### Configure screen (if possible, use tmux instead)
apt-get -y install screen
#--- Configure screen
file=/root/.screenrc; [ -e $file ] && cp -n $file{,.bkup}
echo -e "# Don't display the copyright page\nstartup_message off\n\n# tab-completion flash in heading bar\nvbell off\n\n# keep scrollback n lines\ndefscrollback 1000\n\n# hardstatus is a bar of text that is visible in all screens\nhardstatus on\nhardstatus alwayslastline\nhardstatus string '%{gk}%{G}%H %{g}[%{Y}%l%{g}] %= %{wk}%?%-w%?%{=b kR}(%{W}%n %t%?(%u)%?%{=b kR})%{= kw}%?%+w%?%?%= %{g} %{Y} %Y-%m-%d %C%a %{W}'\n\n# title bar\ntermcapinfo xterm ti@:te@\n\n# default windows (syntax: screen -t label order command)\nscreen -t bash1 0\nscreen -t bash2 1\n\n# select the default window\nselect 1" > /root/.screenrc

