test
This commit is contained in:
parent
cb7febe71f
commit
976be48811
65
repokey
65
repokey
|
@ -1,65 +0,0 @@
|
||||||
#!/bin/bash
|
|
||||||
echo "--------------The Fat Rat Repokey 1.0----------"
|
|
||||||
echo ".....Checking Dependencies....."
|
|
||||||
if [ $(id -u) != "0" ]; then
|
|
||||||
echo "Root Previledge is required to run this script"
|
|
||||||
exit 0
|
|
||||||
fi
|
|
||||||
which apt-key > /dev/null 2>&1
|
|
||||||
if [ "$?" != "0" ]; then
|
|
||||||
echo "APT Package Management is not installed"
|
|
||||||
exit 0
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo ".....Dependencies Check Done....."
|
|
||||||
|
|
||||||
rchk () {
|
|
||||||
apt-get update &> /tmp/aptkey.log
|
|
||||||
awk '{print $1}' RS='NO_PUBKEY' /tmp/aptkey.log | sed '1d' > /tmp/expkeys.log
|
|
||||||
awk '{print $1}' RS='EXPKEYSIG' /tmp/aptkey.log | sed '1d' >> /tmp/expkeys.log
|
|
||||||
sort /tmp/expkeys.log | uniq > /tmp/expkeystmp.log
|
|
||||||
rm /tmp/expkeys.log && mv /tmp/expkeystmp.log /tmp/expkeys.log
|
|
||||||
cntk=$(wc -l /tmp/expkeys.log | awk '{print$1}' | sed 's/ //g')
|
|
||||||
if [[ "$cntk" == "0" ]]
|
|
||||||
then
|
|
||||||
echo "No Keys to be processed"
|
|
||||||
exit 0
|
|
||||||
else
|
|
||||||
echo "Unable to process key for $dist"
|
|
||||||
echo ""
|
|
||||||
echo "Possible Causes"
|
|
||||||
echo "- Check if you are connected to Internet"
|
|
||||||
echo "- Any unofficial repository in /etc/apt/sources.list"
|
|
||||||
echo "- Key not validated yet by the repository maintainers"
|
|
||||||
echo ""
|
|
||||||
exit 0
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
keyapt () {
|
|
||||||
apt-get update &> /tmp/aptkey.log
|
|
||||||
awk '{print $1}' RS='NO_PUBKEY' /tmp/aptkey.log | sed '1d' > /tmp/expkeys.log
|
|
||||||
awk '{print $1}' RS='EXPKEYSIG' /tmp/aptkey.log | sed '1d' >> /tmp/expkeys.log
|
|
||||||
cat /tmp/expkeys.log | sort | uniq > /tmp/expkeystmp.log
|
|
||||||
rm /tmp/expkeys.log && mv /tmp/expkeystmp.log /tmp/expkeys.log
|
|
||||||
cntk=$(wc -l /tmp/expkeys.log | awk '{print$1}' | sed 's/ //g')
|
|
||||||
if [[ "$cntk" == "0" ]]
|
|
||||||
then
|
|
||||||
echo "No Keys to be processed"
|
|
||||||
exit 0
|
|
||||||
fi
|
|
||||||
for i in $(seq $cntk)
|
|
||||||
do
|
|
||||||
gtkey=$(sed -n ${i}p /tmp/expkeys.log)
|
|
||||||
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys $gtkey &> /tmp/gtkey.log
|
|
||||||
kout=$(grep -w "Total number processed:" /tmp/gtkey.log | awk -F'Total number processed:' '{print $2}' | sed 's/ //g')
|
|
||||||
dist=$(grep -o '".*"' /tmp/gtkey.log | sed 's/"//g')
|
|
||||||
if [[ "$kout" == "1" ]]
|
|
||||||
then
|
|
||||||
echo "Succefull Key processed for $dist"
|
|
||||||
else
|
|
||||||
rchk
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
exit 0
|
|
||||||
}
|
|
||||||
keyapt
|
|
|
@ -1,5 +1,94 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
#Instalation of searchsploit (exploitdb)
|
#Instalation of searchsploit (exploitdb)
|
||||||
|
function optmingw () {
|
||||||
|
case $sel in
|
||||||
|
y|Y|yes|YES|Yes)
|
||||||
|
echo -n "Removing mingw as requested..."
|
||||||
|
xterm -T "☣ REMOVING MINGW ☣" -geometry 100x30 -e "apt remove --purge *mingw* -y && apt autoremove -y"
|
||||||
|
which x86_64-w64-mingw32-gcc >> /dev/null 2>&1
|
||||||
|
if [ "$?" != "0" ]; then
|
||||||
|
echo "Done"
|
||||||
|
else
|
||||||
|
echo "Error"
|
||||||
|
echo ""
|
||||||
|
echo "Setup was unable to remove mingw Installation"
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
n|N|No|NO)
|
||||||
|
echo "Setup will not remove current mingw installation"
|
||||||
|
echo "However you will encounter issues running Fudwin"
|
||||||
|
echo -n "in fatrat menu , press ENTER to resume setup"
|
||||||
|
read -rsp var
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
}
|
||||||
|
rchk () {
|
||||||
|
apt-get update &> /tmp/aptkey.log
|
||||||
|
awk '{print $1}' RS='NO_PUBKEY' /tmp/aptkey.log | sed '1d' > /tmp/expkeys.log
|
||||||
|
awk '{print $1}' RS='EXPKEYSIG' /tmp/aptkey.log | sed '1d' >> /tmp/expkeys.log
|
||||||
|
sort /tmp/expkeys.log | uniq > /tmp/expkeystmp.log
|
||||||
|
rm /tmp/expkeys.log && mv /tmp/expkeystmp.log /tmp/expkeys.log
|
||||||
|
cntk=$(wc -l /tmp/expkeys.log | awk '{print$1}' | sed 's/ //g')
|
||||||
|
if [[ "$cntk" == "0" ]]
|
||||||
|
then
|
||||||
|
echo "No Keys to be processed"
|
||||||
|
else
|
||||||
|
echo "Unable to process key for $dist"
|
||||||
|
echo ""
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
function repokey () {
|
||||||
|
apt-get update &> /tmp/aptkey.log
|
||||||
|
awk '{print $1}' RS='NO_PUBKEY' /tmp/aptkey.log | sed '1d' > /tmp/expkeys.log
|
||||||
|
awk '{print $1}' RS='EXPKEYSIG' /tmp/aptkey.log | sed '1d' >> /tmp/expkeys.log
|
||||||
|
cat /tmp/expkeys.log | sort | uniq > /tmp/expkeystmp.log
|
||||||
|
rm /tmp/expkeys.log && mv /tmp/expkeystmp.log /tmp/expkeys.log
|
||||||
|
cntk=$(wc -l /tmp/expkeys.log | awk '{print$1}' | sed 's/ //g')
|
||||||
|
if [[ "$cntk" == "0" ]]
|
||||||
|
then
|
||||||
|
echo "No Keys to be processed"
|
||||||
|
fi
|
||||||
|
for i in $(seq $cntk)
|
||||||
|
do
|
||||||
|
gtkey=$(sed -n ${i}p /tmp/expkeys.log)
|
||||||
|
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys $gtkey &> /tmp/gtkey.log
|
||||||
|
kout=$(grep -w "Total number processed:" /tmp/gtkey.log | awk -F'Total number processed:' '{print $2}' | sed 's/ //g')
|
||||||
|
dist=$(grep -o '".*"' /tmp/gtkey.log | sed 's/"//g')
|
||||||
|
if [[ "$kout" == "1" ]]
|
||||||
|
then
|
||||||
|
echo "Succefull Key processed for $dist"
|
||||||
|
else
|
||||||
|
rchk
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
exit 0
|
||||||
|
}
|
||||||
|
function mingwchk () {
|
||||||
|
echo -ne "$green" "[ ? ] ....Checking Mingw Version.................."
|
||||||
|
which x86_64-w64-mingw32-gcc >> /dev/null 2>&1
|
||||||
|
if [ "$?" -eq "0" ]; then
|
||||||
|
chkvs=$(x86_64-w64-mingw32-gcc --version | sed -n 1p | awk '{print$3}')
|
||||||
|
case $chkvs in
|
||||||
|
4.9.1)
|
||||||
|
echo "[✔]"
|
||||||
|
;;
|
||||||
|
6.3.0)
|
||||||
|
echo "[✔]"
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
echo "Error"
|
||||||
|
echo ""
|
||||||
|
echo "TheFatRat detected an incorrent version of mingw installed"
|
||||||
|
echo "Do you wish to remove it and install the approriate one ?"
|
||||||
|
echo -n "Choose (yes/no) : "
|
||||||
|
read -r sel
|
||||||
|
optmingw
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
function ssplt() {
|
function ssplt() {
|
||||||
|
|
||||||
# check if searchsploit exists
|
# check if searchsploit exists
|
||||||
|
@ -359,7 +448,7 @@ echo "0" > "$stp"
|
||||||
echo "xterm -> Not OK" > "$inst"
|
echo "xterm -> Not OK" > "$inst"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
mingwchk
|
||||||
sleep 1
|
sleep 1
|
||||||
#check if dig its installed
|
#check if dig its installed
|
||||||
which dig > /dev/null 2>&1
|
which dig > /dev/null 2>&1
|
||||||
|
@ -708,8 +797,8 @@ fi
|
||||||
rm -f /etc/apt/sources.list
|
rm -f /etc/apt/sources.list
|
||||||
touch /etc/apt/sources.list
|
touch /etc/apt/sources.list
|
||||||
echo "deb http://deb.debian.org/debian/ jessie main contrib non-free" > /etc/apt/sources.list
|
echo "deb http://deb.debian.org/debian/ jessie main contrib non-free" > /etc/apt/sources.list
|
||||||
chmod +x repokey
|
repokey
|
||||||
xterm -T "☣ UPDATING REPOSITORIES DEDIAN JESSIE☣" -geometry 100x30 -e "sudo apt-get clean && sudo apt-get clean cache && ./repokey && sudo apt-get update -y | tee -a $mingw"
|
xterm -T "☣ UPDATING REPOSITORIES DEDIAN JESSIE☣" -geometry 100x30 -e "sudo apt-get clean && sudo apt-get clean cache && sudo apt-get update -y | tee -a $mingw"
|
||||||
sleep 1
|
sleep 1
|
||||||
|
|
||||||
# check if mingw32 or mingw-64 exists
|
# check if mingw32 or mingw-64 exists
|
||||||
|
@ -1306,7 +1395,6 @@ echo "[local]"
|
||||||
sshd|*/sshd) SESSION_TYPE=remote/ssh;;
|
sshd|*/sshd) SESSION_TYPE=remote/ssh;;
|
||||||
esac
|
esac
|
||||||
fi
|
fi
|
||||||
|
|
||||||
sleep 1
|
sleep 1
|
||||||
which nc > /dev/null 2>&1
|
which nc > /dev/null 2>&1
|
||||||
if [ "$?" -eq "0" ]; then
|
if [ "$?" -eq "0" ]; then
|
||||||
|
|
Loading…
Reference in New Issue