Skip to content

Commit

Permalink
v7.0.3
Browse files Browse the repository at this point in the history
  • Loading branch information
Enkidu-6 committed Mar 16, 2024
1 parent 016582a commit 87a1be4
Show file tree
Hide file tree
Showing 5 changed files with 125 additions and 124 deletions.
65 changes: 0 additions & 65 deletions conntrack-2.sh

This file was deleted.

177 changes: 122 additions & 55 deletions conntrack.sh
Original file line number Diff line number Diff line change
@@ -1,69 +1,136 @@
#!/bin/bash
# set -x
green='\033[1;32m'
blue='\033[1;36m'
white='\033[1;37m'
plain='\033[0m'
rhel() {
green='\033[1;32m'
blue='\033[1;36m'
white='\033[1;37m'
plain='\033[0m'

if [[ ! -e /proc/net/nf_conntrack ]]; then
clear
echo -e "${green}Your system does not come with nf_conntrack. Please install\nconntrack utilities if you don't already have it.\n'apt install conntrack' and use conntrack-2.sh${plain}"
exit 1
fi
if [[ ! -e /var/tmp/file2 ]]; then
curl -s 'https://raw.githubusercontent.com/Enkidu-6/tor-relay-lists/main/relays-v4.txt' >/var/tmp/file2
elif
[[ $(find "/var/tmp/file2" -mmin +60 -print) ]]
then
curl -s 'https://raw.githubusercontent.com/Enkidu-6/tor-relay-lists/main/relays-v4.txt' >/var/tmp/file2
fi

if [[ ! -e /var/tmp/file2 ]]; then
curl -s 'https://raw.githubusercontent.com/Enkidu-6/tor-relay-lists/main/relays-v4.txt' >/var/tmp/file2
elif
[[ $(find "/var/tmp/file2" -mmin +60 -print) ]]
then
curl -s 'https://raw.githubusercontent.com/Enkidu-6/tor-relay-lists/main/relays-v4.txt' >/var/tmp/file2
fi
if [[ ! -e /var/tmp/multi ]]; then
curl -s 'https://raw.githubusercontent.com/Enkidu-6/tor-relay-lists/main/above1-or.txt' >/var/tmp/multi
elif
[[ $(find "/var/tmp/multi" -mmin +60 -print) ]]
then
curl -s 'https://raw.githubusercontent.com/Enkidu-6/tor-relay-lists/main/above1-or.txt' >/var/tmp/multi
fi

if [[ ! -e /var/tmp/multi ]]; then
curl -s 'https://raw.githubusercontent.com/Enkidu-6/tor-relay-lists/main/above1-or.txt' >/var/tmp/multi
elif
[[ $(find "/var/tmp/multi" -mmin +60 -print) ]]
then
curl -s 'https://raw.githubusercontent.com/Enkidu-6/tor-relay-lists/main/above1-or.txt' >/var/tmp/multi
fi
if [[ ! -e /var/tmp/snow ]]; then
curl -s 'https://raw.githubusercontent.com/Enkidu-6/tor-relay-lists/main/snowflake.txt' >/var/tmp/snow
elif
[[ $(find "/var/tmp/snow" -mmin +60 -print) ]]
then
curl -s 'https://raw.githubusercontent.com/Enkidu-6/tor-relay-lists/main/snowflake.txt' >/var/tmp/snow
fi

if [[ ! -e /var/tmp/snow ]]; then
curl -s 'https://raw.githubusercontent.com/Enkidu-6/tor-relay-lists/main/snowflake.txt' >/var/tmp/snow
elif
[[ $(find "/var/tmp/snow" -mmin +60 -print) ]]
then
curl -s 'https://raw.githubusercontent.com/Enkidu-6/tor-relay-lists/main/snowflake.txt' >/var/tmp/snow
fi
echo -e "${green}Conntrack count:${plain}"
echo -e " ${blue}$(cat /proc/sys/net/netfilter/nf_conntrack_count)${plain}"

echo -e "${green}IPs with more than Two connections:${plain}"
cat /proc/net/nf_conntrack | grep ESTABLISHED | awk '{ print $7 }' | awk -F= '{ print $2 }' | sort | uniq -c >/var/tmp/5
cd /var/tmp
echo -e "${white}$(cat 5 | grep -v ' 1 ' | grep -v ' 2 ' | sort -n)${plain}"

echo -e "${green}IPs with More than Two connections:${plain}"
cat 5 | grep -v ' 1 ' | grep -v ' 2 ' | awk '{ print $2 }' >8

echo -e "${white} There are ${blue}$(cat 8 | wc -l)${white} IPs With More than Two connections"
echo -e "${blue} $(perl -ne 'print if ($seen{$_} .= @ARGV) =~ /10$/' 8 file2 | wc -l) ${white}Relays"
echo -e "${blue} $(perl -ne 'print if ($seen{$_} .= @ARGV) =~ /10$/' 8 multi | wc -l) ${white}Multi-OR"
echo -e "${blue} $(perl -ne 'print if ($seen{$_} .= @ARGV) =~ /10$/' 8 snow | wc -l) ${white}Snowflake${plain}"

echo -e "${green}IPs with Two connections:${plain}"
cat 5 | grep ' 2 ' | awk '{ print $2 }' >6

echo -e "${white} There are ${blue}$(cat 6 | wc -l)${white} IPs With Two connections"
echo -e "${blue} $(perl -ne 'print if ($seen{$_} .= @ARGV) =~ /10$/' 6 file2 | wc -l) ${white}Relays${plain}"
echo -e "${blue} $(perl -ne 'print if ($seen{$_} .= @ARGV) =~ /10$/' 6 multi | wc -l) ${white}Multi-OR${plain}"
echo -e "${blue} $(perl -ne 'print if ($seen{$_} .= @ARGV) =~ /10$/' 6 snow | wc -l) ${white}Snowflake${plain}"

echo -e "${green}Conntrack count:${plain}"
echo -e " ${blue}$(cat /proc/sys/net/netfilter/nf_conntrack_count)${plain}"
echo -e "${green}IPs with One connection:${plain}"
cat 5 | grep ' 1 ' | awk '{ print $2 }' >7

echo -e "${green}IPs with more than Two connections:${plain}"
cat /proc/net/nf_conntrack | grep ESTABLISHED | awk '{ print $7 }' | awk -F= '{ print $2 }' | sort | uniq -c >/var/tmp/5
cd /var/tmp
echo -e "${white}$(cat 5 | grep -v ' 1 ' | grep -v ' 2 ' | sort -n)${plain}"
echo -e "${white} There are ${blue}$(cat 7 | wc -l)${white} IPs With One connection"
echo -e "${blue} $(perl -ne 'print if ($seen{$_} .= @ARGV) =~ /10$/' 7 file2 | wc -l) ${white}Relays"
echo -e "${blue} $(perl -ne 'print if ($seen{$_} .= @ARGV) =~ /10$/' 7 multi | wc -l) ${white}Multi-OR${plain}"
echo -e "${blue} $(perl -ne 'print if ($seen{$_} .= @ARGV) =~ /10$/' 7 snow | wc -l) ${white}Snowflake${plain}"
/bin/rm -r 5 6 7 8
}

echo -e "${green}IPs with More than Two connections:${plain}"
cat 5 | grep -v ' 1 ' | grep -v ' 2 ' | awk '{ print $2 }' >8
deb() {
green='\033[1;32m'
blue='\033[1;36m'
white='\033[1;37m'
plain='\033[0m'

echo -e "${white} There are ${blue}$(cat 8 | wc -l)${white} IPs With More than Two connections"
echo -e "${blue} $(perl -ne 'print if ($seen{$_} .= @ARGV) =~ /10$/' 8 file2 | wc -l) ${white}Relays"
echo -e "${blue} $(perl -ne 'print if ($seen{$_} .= @ARGV) =~ /10$/' 8 multi | wc -l) ${white}Multi-OR"
echo -e "${blue} $(perl -ne 'print if ($seen{$_} .= @ARGV) =~ /10$/' 8 snow | wc -l) ${white}Snowflake${plain}"
if [[ ! -e /var/tmp/file2 ]]; then
curl -s 'https://raw.githubusercontent.com/Enkidu-6/tor-relay-lists/main/relays-v4.txt' >/var/tmp/file2
elif
[[ $(find "/var/tmp/file2" -mmin +60 -print) ]]
then
curl -s 'https://raw.githubusercontent.com/Enkidu-6/tor-relay-lists/main/relays-v4.txt' >/var/tmp/file2
fi

echo -e "${green}IPs with Two connections:${plain}"
cat 5 | grep ' 2 ' | awk '{ print $2 }' >6
if [[ ! -e /var/tmp/multi ]]; then
curl -s 'https://raw.githubusercontent.com/Enkidu-6/tor-relay-lists/main/above1-or.txt' >/var/tmp/multi
elif
[[ $(find "/var/tmp/multi" -mmin +60 -print) ]]
then
curl -s 'https://raw.githubusercontent.com/Enkidu-6/tor-relay-lists/main/above1-or.txt' >/var/tmp/multi
fi

echo -e "${white} There are ${blue}$(cat 6 | wc -l)${white} IPs With Two connections"
echo -e "${blue} $(perl -ne 'print if ($seen{$_} .= @ARGV) =~ /10$/' 6 file2 | wc -l) ${white}Relays${plain}"
echo -e "${blue} $(perl -ne 'print if ($seen{$_} .= @ARGV) =~ /10$/' 6 multi | wc -l) ${white}Multi-OR${plain}"
echo -e "${blue} $(perl -ne 'print if ($seen{$_} .= @ARGV) =~ /10$/' 6 snow | wc -l) ${white}Snowflake${plain}"
if [[ ! -e /var/tmp/snow ]]; then
curl -s 'https://raw.githubusercontent.com/Enkidu-6/tor-relay-lists/main/snowflake.txt' >/var/tmp/snow
elif
[[ $(find "/var/tmp/snow" -mmin +60 -print) ]]
then
curl -s 'https://raw.githubusercontent.com/Enkidu-6/tor-relay-lists/main/snowflake.txt' >/var/tmp/snow
fi

echo -e "${green}IPs with One connection:${plain}"
cat 5 | grep ' 1 ' | awk '{ print $2 }' >7
echo -e "${green}Conntrack count:${plain}"
echo -e " ${blue}$(conntrack -C)${plain}"

echo -e "${white} There are ${blue}$(cat 7 | wc -l)${white} IPs With One connection"
echo -e "${blue} $(perl -ne 'print if ($seen{$_} .= @ARGV) =~ /10$/' 7 file2 | wc -l) ${white}Relays"
echo -e "${blue} $(perl -ne 'print if ($seen{$_} .= @ARGV) =~ /10$/' 7 multi | wc -l) ${white}Multi-OR${plain}"
echo -e "${blue} $(perl -ne 'print if ($seen{$_} .= @ARGV) =~ /10$/' 7 snow | wc -l) ${white}Snowflake${plain}"
/bin/rm -r 5 6 7 8
echo -e "${green}IPs with more than 2 connections:\033[0;30m"
conntrack -L | grep ESTABLISHED | awk '{ print $5 }' | awk -F= '{ print $2 }' | sort | uniq -c >/var/tmp/5
conntrack -L -f ipv6 | grep ESTABLISHED | awk '{ print $5 }' | awk -F= '{ print $2 }' | sort | uniq -c >>/var/tmp/5
cd /var/tmp
echo -e "${white}$(cat 5 | grep -v ' 1 ' | grep -v ' 2 ')${plain}"

echo -e "${green}IPs with More than Two connections:${plain}"
cat 5 | grep -v ' 1 ' | grep -v ' 2 ' | awk '{ print $2 }' >8

echo -e "${white} There are ${blue}$(cat 8 | wc -l)${white} IPs With More than Two connections"
echo -e "${blue} $(perl -ne 'print if ($seen{$_} .= @ARGV) =~ /10$/' 8 file2 | wc -l) ${white}Relays"
echo -e "${blue} $(perl -ne 'print if ($seen{$_} .= @ARGV) =~ /10$/' 8 multi | wc -l) ${white}Multi-OR"
echo -e "${blue} $(perl -ne 'print if ($seen{$_} .= @ARGV) =~ /10$/' 8 snow | wc -l) ${white}Snowflake${plain}"

echo -e "${green}IPs with Two connections:${plain}"
cat 5 | grep ' 2 ' | awk '{ print $2 }' >6

echo -e "${white} There are ${blue}$(cat 6 | wc -l)${white} IPs with Two connections"
echo -e "${blue} $(perl -ne 'print if ($seen{$_} .= @ARGV) =~ /10$/' 6 file2 | wc -l) ${white}Relays${plain}"
echo -e "${blue} $(perl -ne 'print if ($seen{$_} .= @ARGV) =~ /10$/' 6 multi | wc -l) ${white}Multi-OR${plain}"
echo -e "${blue} $(perl -ne 'print if ($seen{$_} .= @ARGV) =~ /10$/' 6 snow | wc -l) ${white}Snowflake${plain}"

echo -e "${green}IPs with One connection:${plain}"
cat 5 | grep ' 1 ' | awk '{ print $2 }' >7

echo -e "${white} There are ${blue}$(cat 7 | wc -l)${white} IPs With One connection"
echo -e "${blue} $(perl -ne 'print if ($seen{$_} .= @ARGV) =~ /10$/' 7 file2 | wc -l) ${white}Relays"
echo -e "${blue} $(perl -ne 'print if ($seen{$_} .= @ARGV) =~ /10$/' 7 multi | wc -l) ${white}Multi-OR${plain}"
echo -e "${blue} $(perl -ne 'print if ($seen{$_} .= @ARGV) =~ /10$/' 7 snow | wc -l) ${white}Snowflake${plain}"
/bin/rm -r 5 6 7 8
}

if [[ ! -e /proc/net/nf_conntrack ]]; then
deb
else
rhel
fi
5 changes: 3 additions & 2 deletions download.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,10 @@ red='\033[0;31m'
green='\033[1;32m'
white='\033[1;37m'
plain='\033[0m'
wget -O tor.tar.gz https://github.com/Enkidu-6/tor-ddos/archive/refs/tags/v7.0.2.tar.gz
wget -O tor.tar.gz https://raw.githubusercontent.com/Enkidu-6/tor-ddos/main/src/tor.tar.gz
mkdir tor
tar -xzf tor.tar.gz -C tor --strip-components 1
tar -xzf tor.tar.gz -C tor
/bin/rm -r tor.tar.gz
sleep 1
cd tor
chmod 0700 *.sh
Expand Down
Binary file added src/tor.tar.gz
Binary file not shown.
2 changes: 0 additions & 2 deletions start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,6 @@ os() {

if [[ "${release}" == "debian" ]] || [[ "${release}" == "ubuntu" ]]; then
apt install -y conntrack ipset
/bin/rm -r conntrack.sh
mv conntrack-2.sh conntrack.sh
./multi.sh
else
./multi.sh
Expand Down

0 comments on commit 87a1be4

Please sign in to comment.