├── 301_checker.py ├── Bananian_Firewall.sh ├── Bash_RC ├── Emre-FileClient-Arp.py ├── Emre-FileClient-Disk.py ├── Emre-FileClient-Inet.py ├── Emre_Firewall.sh ├── Firewall_Accept.sh ├── Flush_Firewall.sh ├── NAS_Backup_All.py ├── Network_Down.sh ├── Network_Up.sh ├── OpenVPN.sh ├── README.md ├── Raspberrypi_Firewall.sh ├── RaspiZero-Wifi.txt ├── Samba_Files_Pass_1234.zip ├── SystemMsg.sh ├── Update.sh ├── VNC_Connection.txt ├── WD-Backup.sh ├── backup.py ├── backup_tar.py ├── backup_weekly.py ├── berkocan.py ├── conky-start.sh ├── crontab.txt ├── cve2exploit.py ├── debian_progs ├── del.py ├── dig_domain.sh ├── digger.sh ├── dns_req.py ├── emre-mailclient-backup.py ├── emre-mailclient-weeklybackup.py ├── esxi_adduser.txt ├── esxi_hostname.txt ├── ftp-rules.sh ├── getSessiontime.py ├── git_elle.sh ├── git_gpgkey_signing ├── git_usage.sh ├── gnmap_pars.sh ├── gnmap_pars2.sh ├── gophish_track.txt ├── hackthebox_firewall.sh ├── ip_link_mac.sh ├── ip_remover.sh ├── ip_to_host_and_web.py ├── iptables-redirecting.sh ├── iptables_forward.sh ├── iptables_portfwd_others.sh ├── issue.net ├── kali_progs ├── macOS_iso_to_usb ├── mobile_basics.txt ├── nessus_pause.sh ├── nmap_2_livehosts.sh ├── nmap_2_nessus.sh ├── nmap_lazy_pingscan.sh ├── nmap_parse_smb.py ├── ntds_audit.txt ├── pentest_scripts.sh ├── ping_live.sh ├── py3_compare.py ├── py3_crawler.py ├── py3_excel_parser.py ├── py3_googleforms.py ├── py3_nmap_autoscan.py ├── py3_sm.py ├── raspi-enc.sh ├── samba_iptables.sh ├── smb_null_session.sh ├── steam.sh ├── tar.gz.txt ├── twilio-python.py ├── ubuntu_18.sh ├── ubuntu_progs ├── vpn_gw ├── auth.txt ├── internet.sh ├── openvpn.sh └── vpnBridge.py ├── wifi-txpower.sh ├── wifi_check.sh └── word-count.py /301_checker.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/python3 2 | # 301 Checker 3 | # EmreOvunc 4 | 5 | from os import popen 6 | from os import system 7 | from re import findall 8 | from time import sleep 9 | from socket import gethostbyname 10 | from multiprocessing import Queue 11 | from multiprocessing import Process 12 | 13 | 14 | def dns_lookup(host, q): 15 | try: 16 | gethostbyname(host) 17 | q.put(host) 18 | except: 19 | pass 20 | 21 | 22 | system('rm -rf redirected.txt 2 ' + str(urls[0]) + '\n') 57 | flag += 1 58 | except: 59 | pass 60 | 61 | try: 62 | https_proc = popen('curl -s -I ' + https + ' --connect-timeout 2 --max-time 2').read() 63 | if https_proc != "": 64 | urls = findall('https?://(?:[-\w.]|(?:%[\da-fA-F]{2}))+', https_proc) 65 | if len(urls[0]) != 0: 66 | if https != str(urls[0]) or https != str(urls[0]) + "/": 67 | if flag == 0: 68 | yesArr.append('##### ' + str(IP) + ' #####' + '\n') 69 | yesArr.append(https + ' -> ' + str(urls[0]) + '\n') 70 | flag += 1 71 | except: 72 | pass 73 | 74 | if flag == 0: 75 | IPorDomain = findall("^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9]?[0-9])\.){3}" 76 | "(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9]?[0-9])$", IP) 77 | if len(IPorDomain) != 0: 78 | no.write(IP + '\n') 79 | else: 80 | q = Queue() 81 | p = Process(target=dns_lookup, args=(IP, q)) 82 | p.start() 83 | sleep(1) 84 | 85 | if q.empty(): 86 | p.terminate() 87 | down.write(IP + '\n') 88 | else: 89 | q.get() 90 | no.write(IP + '\n') 91 | 92 | for index in range(0, len(yesArr)-1): 93 | if yesArr[index] != "": 94 | try: 95 | if yesArr[index].startswith('##### ') and yesArr[index+1].startswith('##### '): 96 | index += 1 97 | elif yesArr[index].startswith('##### ') and yesArr[index+1].startswith('http'): 98 | yes.write(yesArr[index]) 99 | yes.write(yesArr[index+1]) 100 | elif yesArr[index].startswith('http://') and yesArr[index+1].startswith('https://'): 101 | yes.write(yesArr[index+1]) 102 | except: 103 | pass 104 | 105 | down.close() 106 | yes.close() 107 | no.close() 108 | ip_file.close() 109 | -------------------------------------------------------------------------------- /Bananian_Firewall.sh: -------------------------------------------------------------------------------- 1 | 2 | #!/bin/sh 3 | HOME="192.168.1.0/24" 4 | iptables -F 5 | iptables -P INPUT DROP 6 | iptables -P OUTPUT DROP 7 | iptables -P FORWARD DROP 8 | iptables -A INPUT -i lo -j ACCEPT 9 | iptables -A INPUT -i eth0 -p udp -m udp --sport 53 -j ACCEPT 10 | iptables -A OUTPUT -o eth0 -p udp -m udp --dport 53 -j ACCEPT 11 | iptables -A OUTPUT -o lo -j ACCEPT 12 | ## 13 | iptables -A INPUT -p tcp -m tcp --dport 80 -m state --state NEW,ESTABLISHED -j ACCEPT 14 | iptables -A INPUT -p tcp -m tcp --dport 443 -m state --state NEW,ESTABLISHED -j ACCEPT 15 | iptables -A INPUT -p tcp -m tcp --sport 80 -m state --state NEW,ESTABLISHED -j ACCEPT 16 | iptables -A INPUT -p tcp -m tcp --sport 443 -m state --state NEW,ESTABLISHED -j ACCEPT 17 | iptables -A OUTPUT -p tcp -m tcp --dport 80 -m state --state NEW,ESTABLISHED -j ACCEPT 18 | iptables -A OUTPUT -p tcp -m tcp --dport 443 -m state --state NEW,ESTABLISHED -j ACCEPT 19 | iptables -A OUTPUT -p tcp -m tcp --sport 80 -m state --state NEW,ESTABLISHED -j ACCEPT 20 | iptables -A OUTPUT -p tcp -m tcp --sport 443 -m state --state NEW,ESTABLISHED -j ACCEPT 21 | ## 22 | iptables -A INPUT -i eth0 -s $HOME -p tcp -m mac --mac-source AA:BB:CC:11:22:33 --dport 2222 -j ACCEPT 23 | iptables -A OUTPUT -o eth0 -d $HOME -p tcp --sport 2222 -j ACCEPT 24 | ## 25 | iptables -A INPUT -i eth0 -p udp -s $HOME --dport 137 -j ACCEPT 26 | iptables -A INPUT -i eth0 -p udp -s $HOME --dport 138 -j ACCEPT 27 | iptables -A INPUT -i eth0 -p tcp -s $HOME --dport 139 -j ACCEPT 28 | iptables -A INPUT -i eth0 -p tcp -s $HOME --dport 445 -j ACCEPT 29 | iptables -A OUTPUT -o eth0 -d $HOME -p tcp --sport 139 -m state --state ESTABLISHED -j ACCEPT 30 | iptables -A OUTPUT -o eth0 -d $HOME -p tcp --sport 445 -m state --state ESTABLISHED -j ACCEPT 31 | iptables -A OUTPUT -o eth0 -d $HOME -p udp --sport 137:138 -m state --state ESTABLISHED -j ACCEPT 32 | ## 33 | iptables-save 34 | ## 35 | -------------------------------------------------------------------------------- /Bash_RC: -------------------------------------------------------------------------------- 1 | echo -e " \e[38;5;198m############################### \e[4m\e[1mEmre Ovunc \e[21m\e[24m###############################\e[96m" 2 | sudo ifconfig | grep "inet addr" | grep -v '127' 3 | echo -e " \e[38;5;198m############################## \e[4m\e[1mMonster Debian\e[21m\e[24m ############################" 4 | -------------------------------------------------------------------------------- /Emre-FileClient-Arp.py: -------------------------------------------------------------------------------- 1 | import socket,os,time 2 | 3 | host = "SERVERIP" 4 | port = "SERVERPORT" 5 | 6 | s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) 7 | s.connect((host, port)) 8 | s.send("EmreOvunc-ArpA") 9 | if (os.path.isdir("arp-a.txt")): 10 | os.remove("arp-a.txt") 11 | time.sleep(1) 12 | os.system("sudo arp -a > arp-a.txt") 13 | time.sleep(1) 14 | f = open('arp-a.txt', 'rb') 15 | l = f.read(1024) 16 | while (l): 17 | s.send(l) 18 | l = f.read(1024) 19 | f.close() 20 | s.close() 21 | os.system("rm -rf /home/monster/arp-a.txt") 22 | -------------------------------------------------------------------------------- /Emre-FileClient-Disk.py: -------------------------------------------------------------------------------- 1 | import socket,os,time 2 | 3 | host = "ServerIP" 4 | port = "ServerPORT" 5 | 6 | s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) 7 | s.connect((host, port)) 8 | s.send("EmreOvunc-Disk") 9 | if (os.path.isdir("df-h.txt")): 10 | os.remove("df-h.txt") 11 | time.sleep(1) 12 | os.system("df -h > df-h.txt") 13 | time.sleep(1) 14 | f = open('df-h.txt', 'rb') 15 | l = f.read(1024) 16 | while (l): 17 | s.send(l) 18 | l = f.read(1024) 19 | f.close() 20 | s.close() 21 | os.system("rm -rf /home/monster/df-h.txt") 22 | -------------------------------------------------------------------------------- /Emre-FileClient-Inet.py: -------------------------------------------------------------------------------- 1 | import socket,os,time 2 | 3 | host = "ServerIP" 4 | port = "ServerPORT" 5 | 6 | s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) 7 | s.connect((host, port)) 8 | s.send("EmreOvunc-Inet") 9 | if (os.path.isdir("inet_conn.txt")): 10 | os.remove("inet_conn.txt") 11 | time.sleep(1) 12 | os.system("sudo ifconfig > inet_conn.txt") 13 | time.sleep(1) 14 | f = open('inet_conn.txt', 'rb') 15 | l = f.read(1024) 16 | while (l): 17 | s.send(l) 18 | l = f.read(1024) 19 | f.close() 20 | s.close() 21 | os.system("rm -rf /home/monster/inet_conn.txt") 22 | -------------------------------------------------------------------------------- /Emre_Firewall.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | ###################### 3 | #IP LIST FOR FIREWALL 4 | VIRTUAL="VIRTUALSIP" 5 | ANOTHER_HOST="ANOTHERIP" 6 | HOME="192.168.1.0/24" 7 | MY_SERVER="SERVERIP" 8 | MY_HOSTING="SERVERIP" 9 | MUTE_SERVER="SERVERIP" 10 | PORTS="PORTS" 11 | ###################### 12 | #FLUSH FIREWALL 13 | sudo iptables -F 14 | ###################### 15 | #DROP EVERY CHAIN 16 | sudo iptables -P INPUT DROP 17 | sudo iptables -P OUTPUT DROP 18 | sudo iptables -P FORWARD DROP 19 | ###################### 20 | #LOCALHOST 21 | sudo iptables -A INPUT -i lo -j ACCEPT 22 | sudo iptables -A OUTPUT -o lo -j ACCEPT 23 | ###################### 24 | #DNS COMMUNICATIONS 25 | sudo iptables -A INPUT -i enp3s0 -p udp -m udp --sport 53 -j ACCEPT 26 | sudo iptables -A INPUT -i wlp4s0 -p udp -m udp --sport 53 -j ACCEPT 27 | sudo iptables -A OUTPUT -p udp -m udp --dport 53 -j ACCEPT 28 | ###################### 29 | #HTTP & HTTPS PORTS 30 | sudo iptables -A INPUT -p tcp -m tcp --dport 80 -m state --state NEW,ESTABLISHED -j ACCEPT 31 | sudo iptables -A INPUT -p tcp -m tcp --sport 80 -m state --state NEW,ESTABLISHED -j ACCEPT 32 | sudo iptables -A INPUT -p tcp -m tcp --dport 443 -m state --state NEW,ESTABLISHED -j ACCEPT 33 | sudo iptables -A INPUT -p tcp -m tcp --sport 443 -m state --state NEW,ESTABLISHED -j ACCEPT 34 | ###################### 35 | #HTTP & HTTPS PORTS 36 | sudo iptables -A OUTPUT -p tcp -m tcp --sport 80 -m state --state NEW,ESTABLISHED -j ACCEPT 37 | sudo iptables -A OUTPUT -p tcp -m tcp --dport 80 -m state --state NEW,ESTABLISHED -j ACCEPT 38 | sudo iptables -A OUTPUT -p tcp -m tcp --sport 443 -m state --state NEW,ESTABLISHED -j ACCEPT 39 | sudo iptables -A OUTPUT -p tcp -m tcp --dport 443 -m state --state NEW,ESTABLISHED -j ACCEPT 40 | ###################### 41 | #ICMP DROP 42 | sudo iptables -A INPUT -p icmp -m icmp --icmp-type 17 -j DROP 43 | sudo iptables -A INPUT -p icmp -m icmp --icmp-type 13 -j DROP 44 | ###################### 45 | #PORTSCAN LOG 46 | sudo iptables -A INPUT -p tcp -m tcp --dport 139 -m recent --set --name PortScan --mask 255.255.255.0 --rsource -j LOG --log-prefix "PortScan !!!:" 47 | sudo iptables -A FORWARD -p tcp -m tcp --dport 139 -m recent --set --name PortScan --mask 255.255.255.0 --rsource -j LOG --log-prefix "PortScan !!!:" 48 | ###################### 49 | #FTP SERVER CONNECTION 50 | sudo iptables -A INPUT -s $MY_SERVER,$MY_HOSTING -p tcp --sport 21 -m state --state ESTABLISHED -j ACCEPT 51 | sudo iptables -A INPUT -s $MY_SERVER,$MY_HOSTING -p tcp --sport 1024: --dport 1024: -m state --state ESTABLISHED,RELATED -j ACCEPT 52 | sudo iptables -A INPUT -m state --state ESTABLISHED,RELATED -s $MY_SERVER,$MY_HOSTING,$MUTE_SERVER,$HOME -j ACCEPT 53 | ###################### 54 | #SSH PORTS 55 | sudo iptables -A INPUT -p tcp -s $MY_SERVER --sport 22222 -m state --state NEW -j ACCEPT 56 | sudo iptables -A INPUT -p tcp -s $MUTE_SERVER,$HOME --sport 22 -m state --state NEW -j ACCEPT 57 | ###################### 58 | #SMB SERVER PORTS 59 | sudo iptables -A INPUT -p udp -s $HOME --dport 137 -j ACCEPT 60 | sudo iptables -A INPUT -p udp -s $HOME --dport 138 -j ACCEPT 61 | sudo iptables -A INPUT -p tcp -s $HOME --dport 139 -j ACCEPT 62 | sudo iptables -A INPUT -p tcp -s $HOME --dport 445 -j ACCEPT 63 | ###################### 64 | #FTP SERVER CONNECTION 65 | sudo iptables -A OUTPUT -d $MY_SERVER,$MY_HOSTING -p tcp --dport 21 -m state --state NEW,ESTABLISHED -j ACCEPT 66 | sudo iptables -A OUTPUT -o wlp4s0 -p tcp --dport 21 -j ACCEPT 67 | sudo iptables -A OUTPUT -o enp3s0 -p tcp --dport 21 -j ACCEPT 68 | ###################### 69 | #SSH PORTS 70 | sudo iptables -A OUTPUT -o wlp4s0 -p tcp --dport 22 -j ACCEPT 71 | sudo iptables -A OUTPUT -o enp3s0 -p tcp --dport 22 -j ACCEPT 72 | sudo iptables -A OUTPUT -d $MUTE_SERVER,$HOME -p tcp --dport 22 -m state --state NEW,ESTABLISHED -j ACCEPT 73 | sudo iptables -A OUTPUT -d $MY_SERVER -p tcp --dport 22222 -m state --state NEW,ESTABLISHED -j ACCEPT 74 | ###################### 75 | #FTP SERVER CONNECTION 76 | sudo iptables -A OUTPUT -o enp3s0 -p tcp --dport 1024: -j ACCEPT 77 | sudo iptables -A OUTPUT -o wlp4s0 -p tcp --sport 1024: -j ACCEPT 78 | sudo iptables -A OUTPUT -d $MY_SERVER,$MY_HOSTING -p tcp --sport 1024: --dport 1024: -m state --state ESTABLISHED,RELATED -j ACCEPT 79 | ###################### 80 | #SMB SERVER PORTS 81 | sudo iptables -A OUTPUT -d $HOME -p udp --sport 137:138 -m state --state ESTABLISHED -j ACCEPT 82 | sudo iptables -A OUTPUT -d $HOME -p tcp --sport 139 -m state --state ESTABLISHED -j ACCEPT 83 | sudo iptables -A OUTPUT -d $HOME -p tcp --sport 445 -m state --state ESTABLISHED -j ACCEPT 84 | ###################### 85 | #CUSTOM PORTS 86 | sudo iptables -A OUTPUT -d $MY_SERVER -p tcp --dport $PORTS -m state --state NEW,ESTABLISHED -j ACCEPT 87 | sudo iptables -A OUTPUT -d $MY_SERVER -p tcp --dport $PORTS -m state --state NEW,ESTABLISHED -j ACCEPT 88 | sudo iptables -A OUTPUT -d $MY_SERVER -p tcp --dport $PORTS -m state --state NEW,ESTABLISHED -j ACCEPT 89 | ###################### 90 | #VIRTUAL TO ANOTHER HOST 91 | #sudo iptables -A FORWARD -s $ANOTHER_HOST -i enp3s0 -o wboxnet0 -d $VIRTUAL -j ACCEPT 92 | #sudo iptables -A FORWARD -s $ANOTHER_HOST -i enp3s0 -p wboxnet0 -d $VIRTUAL -m state --state #ESTABLISHED,RELATED -j ACCEPT 93 | #sudo iptables -t nat -A POSTROUTING -o enp3s0 -j MASQUERADE 94 | ###################### 95 | #SAVE & NOTIFY 96 | sudo iptables-save 97 | notify-send "Firewall" "Firewall is setted!" -i /usr/share/icons/Adwaita/32x32/status/changes-prevent.png & paplay /usr/share/sounds/KDE-Im-Internal-Error.ogg 98 | -------------------------------------------------------------------------------- /Firewall_Accept.sh: -------------------------------------------------------------------------------- 1 | notify-send "Firewall" "Now Unsecured!" -i /usr/share/icons/Adwaita/32x32/status/dialog_warning.png & /usr/share/sounds/KDE-Im-Error-On-Connection.ogg 2 | sudo iptables -F 3 | sudo iptables -P INPUT ACCEPT 4 | sudo iptables -P OUTPUT ACCEPT 5 | sudo iptables -P FORWARD ACCEPT 6 | -------------------------------------------------------------------------------- /Flush_Firewall.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | sudo iptables -P INPUT ACCEPT 3 | sudo iptables -P OUTPUT ACCEPT 4 | sudo iptables -P FORWARD ACCEPT 5 | sudo iptables -F 6 | notify-send "Firewall" "Rules are flushed!" -i /usr/share/icons/Adwaita/32x32/status/changes-allow.png & paplay /usr/share/sounds/KDE-Im-Error-On-Connection.ogg 7 | -------------------------------------------------------------------------------- /NAS_Backup_All.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/python 2 | 3 | import os 4 | 5 | def main(): 6 | os.system("notify-send 'Backup' 'NAS Backup Starting...' -i /usr/share/pixmaps/xarchiver/xarchiver-extract.png ") 7 | os.system("sudo mount -o username='emre' //192.168.1.2/Samba /media/NAS") 8 | os.system("sudo rsync -av --include='.profile' --include='.bash*' --exclude='.*' --exclude='VirtualBox*' --exclude='BurpSuite*' --delete /home/monster /media/NAS") 9 | os.system("sudo umount /media/NAS") 10 | os.system("python /home/monster/Scripts/emre-mailclient-weeklybackup.py") 11 | os.system("notify-send 'Backup' 'NAS Backup Completed!' -i /usr/share/pixmaps/xarchiver/xarchiver-add.png & paplay /usr/share/sounds/KDE-Im-User-Auth.ogg") 12 | 13 | main() 14 | -------------------------------------------------------------------------------- /Network_Down.sh: -------------------------------------------------------------------------------- 1 | sudo service networking stop 2 | sudo service network-manager stop 3 | sudo iptables -F 4 | notify-send "Network" "Network Services are stopped!" -i /usr/share/icons/Adwaita/32x32/status/network-error.png & paplay /usr/share/sounds/KDE-Im-Contact-Out.ogg 5 | -------------------------------------------------------------------------------- /Network_Up.sh: -------------------------------------------------------------------------------- 1 | sudo service networking start 2 | sudo service network-manager start 3 | sh /home/monster/Scripts/Emre_Firewall.sh 4 | notify-send "Network" "Network Services are started!" -i /usr/share/icons/Adwaita/32x32/status/network-transmit-receive.png & paplay /usr/share/sounds/KDE-Im-Contact-In.ogg 5 | -------------------------------------------------------------------------------- /OpenVPN.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | sudo openvpn --config /home/monster/client.ovpn 3 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # MyDailyScripts 2 | I use all of scripts in this repository daily and schedule them to control my systems. 3 | 4 | [![](https://img.shields.io/github/issues/EmreOvunc/MyDailyScripts)](https://github.com/EmreOvunc/MyDailyScripts/issues) 5 | [![](https://img.shields.io/github/stars/EmreOvunc/MyDailyScripts)](https://github.com/EmreOvunc/MyDailyScripts/stargazers) 6 | [![](https://img.shields.io/github/forks/EmreOvunc/MyDailyScripts)](https://github.com/EmreOvunc/MyDailyScripts/network/members) 7 | 8 | ![alt tag](https://emreovunc.com/images/mydaily_scripts.png) 9 | -------------------------------------------------------------------------------- /Raspberrypi_Firewall.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | sudo iptables -F 3 | sudo iptables -P INPUT DROP 4 | sudo iptables -P FORWARD DROP 5 | sudo iptables -P OUTPUT DROP 6 | sudo iptables -A INPUT -i lo -j ACCEPT 7 | sudo iptables -A INPUT -i wlan0 -p udp -m udp --sport 53 -j ACCEPT 8 | sudo iptables -A INPUT -i eth0 -p udp -m udp --sport 53 -j ACCEPT 9 | sudo iptables -A INPUT -p tcp -m tcp --dport 80 -m state --state NEW,ESTABLISHED -j ACCEPT 10 | sudo iptables -A INPUT -p tcp -m tcp --dport 443 -m state --state NEW,ESTABLISHED -j ACCEPT 11 | sudo iptables -A INPUT -p tcp -m tcp --sport 80 -m state --state NEW,ESTABLISHED -j ACCEPT 12 | sudo iptables -A INPUT -p tcp -m tcp --sport 443 -m state --state NEW,ESTABLISHED -j ACCEPT 13 | sudo iptables -A INPUT -s 192.168.1.254 -i eth0 -p tcp -m tcp --dport 2222 -j ACCEPT 14 | sudo iptables -A INPUT -s 192.168.1.254 -i wlan0 -p tcp -m tcp --dport 2222 -m mac --mac-source AA:BB:CC:11:22:33 -j ACCEPT 15 | sudo iptables -A INPUT -s 10.0.0.1 -i eth0 -p tcp -m tcp --dport 2222 -j ACCEPT 16 | sudo iptables -A OUTPUT -o eth0 -p udp -m udp --dport 53 -j ACCEPT 17 | sudo iptables -A OUTPUT -o wlan0 -p udp -m udp --dport 53 -j ACCEPT 18 | sudo iptables -A OUTPUT -o lo -j ACCEPT 19 | sudo iptables -A OUTPUT -p tcp -m tcp --dport 80 -m state --state NEW,ESTABLISHED -j ACCEPT 20 | sudo iptables -A OUTPUT -p tcp -m tcp --dport 443 -m state --state NEW,ESTABLISHED -j ACCEPT 21 | sudo iptables -A OUTPUT -p tcp -m tcp --sport 80 -m state --state NEW,ESTABLISHED -j ACCEPT 22 | sudo iptables -A OUTPUT -p tcp -m tcp --sport 443 -m state --state NEW,ESTABLISHED -j ACCEPT 23 | sudo iptables -A OUTPUT -d 192.168.1.254 -o eth0 -p tcp -m tcp --sport 2222 -j ACCEPT 24 | sudo iptables -A OUTPUT -d 192.168.1.0/24 -o wlan0 -p tcp -m tcp --sport 2222 -j ACCEPT 25 | sudo iptables -A OUTPUT -d 10.0.0.1 -o eth0 -p tcp -m tcp --sport 2222 -j ACCEPT 26 | sudo iptables-save 27 | -------------------------------------------------------------------------------- /RaspiZero-Wifi.txt: -------------------------------------------------------------------------------- 1 | #nano -cB /etc/network/interfaces 2 | auto wlan0 3 | allow-hotplug wlan0 4 | iface wlan0 inet static 5 | address 192.168.2.101 6 | netmask 255.255.255.0 7 | broadcast 192.168.2.255 8 | network 192.168.2.0 9 | gateway 192.168.2.1 10 | wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf 11 | 12 | #nano -cB /etc/wpa_supplicant/wpa_supplicant.conf 13 | network={ 14 | ssid="EmreOvunc" 15 | psk="P4ssw0rd" 16 | proto=RSN 17 | key-mgmt=WPA-PSK 18 | pairwise=CCMP 19 | auth_alg=OPEN 20 | } 21 | 22 | #PiHole 23 | curl -sSL https://install.pi-hole.net | bash 24 | 25 | #IPv6 -> Raspi 3 26 | sudo nano -c /etc/sysctl.conf 27 | #net.ipv6.conf.all.disable_ipv6 = 1 28 | -------------------------------------------------------------------------------- /Samba_Files_Pass_1234.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EmreOvunc/MyDailyScripts/346c2576110537cf2709f77a77f1a9824f930f8b/Samba_Files_Pass_1234.zip -------------------------------------------------------------------------------- /SystemMsg.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | sudo tail -n0 -f /var/log/messages | while read line; do notify-send "System Message" "$line" -i /usr/share/icons/Adwaita/32x32/emblems/emblem-important.png ;done 3 | 4 | -------------------------------------------------------------------------------- /Update.sh: -------------------------------------------------------------------------------- 1 | #notify-send "Update" "Update is starting..." -i /usr/share/pixmaps/xfce4-appfinder.xpm & paplay /usr/share/sounds/KDE-Sys-App-Positive.ogg 2 | sudo apt update -y 3 | sudo apt upgrade -y 4 | sudo apt dist-upgrade -y 5 | sudo apt full-upgrade -y 6 | sudo apt-get autoremove -y 7 | sudo apt-get autoclean all 8 | #notify-send "Update" "Monster is Updated!" -i /usr/share/pixmaps/synaptic.png & paplay /usr/share/sounds/KDE-Sys-App-Positive.ogg 9 | -------------------------------------------------------------------------------- /VNC_Connection.txt: -------------------------------------------------------------------------------- 1 | # Server 2 | sudo apt-get install tightvncserver 3 | vncserver :1 -geometry 1920x1080 4 | 5 | # Client 6 | sudo apt-get install xtightvncviewer 7 | xtightvncviewr 192.168.1.100:1 8 | 9 | -------------------------------------------------------------------------------- /WD-Backup.sh: -------------------------------------------------------------------------------- 1 | rsync -av /media/backup /media/monster/My\ Book 2 | -------------------------------------------------------------------------------- /backup.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/python 2 | import os 3 | 4 | def main(): 5 | os.system("notify-send 'Backup' 'Hourly Backup Starting...' -i /usr/share/pixmaps/xarchiver/xarchiver-extract.png") 6 | os.system("mount /dev/sdc5") 7 | os.system("rsync -av --delete /home/monster/Desktop /media/backup/Debian/monster") 8 | os.system("umount /dev/sdc5") 9 | os.system("python /home/monster/Scripts/emre-mailclient-backup.py") 10 | os.system("notify-send 'Backup' 'Hourly Backup Completed!' -i /usr/share/pixmaps/xarchiver/xarchiver-add.png & paplay /usr/share/sounds/KDE-Im-User-Auth.ogg") 11 | 12 | main() 13 | -------------------------------------------------------------------------------- /backup_tar.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/python 2 | import os 3 | def main(): 4 | os.system("notify-send 'Backup Compress' 'Backup Compress Starting...'-i /usr/share/pixmaps/xarchiver/xarchiver-extract.png ") 5 | os.system("mount /dev/sdc5") 6 | os.system("tar -cvjf /media/backup/Weekly_$(date +%Y%m%d).tar.bz2 /media/backup/Debian/monster") 7 | os.system("umount /dev/sdc5") 8 | os.system("python /home/monster/Scripts/emre-mailclient-weeklytar.py") 9 | os.system("notify-send 'Backup Compress' 'Backup Compress Completed!' -i /usr/share/pixmaps/xarchiver/xarchiver-add.png & paplay /usr/share/sounds/KDE-Im-User-Auth.ogg") 10 | 11 | main() 12 | 13 | 14 | -------------------------------------------------------------------------------- /backup_weekly.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/python 2 | import os 3 | 4 | def main(): 5 | os.system("notify-send 'Backup' 'Weekly Backup Starting...' -i /usr/share/pixmaps/xarchiver/xarchiver-extract.png ") 6 | os.system("mount /dev/sdc6") 7 | os.system("rsync -av --include='.profile' --include='.bash*' --exclude='.*' --exclude='Downloads' --exclude='VirtualBox*' --exclude='BurpSuite*' --exclude='Videos' --delete /home/monster/ /media/backup/") 8 | os.system("sudo umount /dev/sdc6") 9 | os.system("python /home/monster/Scripts/emre-mailclient-weeklybackup.py") 10 | os.system("notify-send 'Backup' 'Weekly Backup Completed!' -i /usr/share/pixmaps/xarchiver/xarchiver-add.png & paplay /usr/share/sounds/KDE-Im-User-Auth.ogg") 11 | 12 | main() 13 | -------------------------------------------------------------------------------- /berkocan.py: -------------------------------------------------------------------------------- 1 | #Emre 2 | from PIL import ImageGrab 3 | from time import sleep 4 | 5 | path = "C:\\Users\\root\\Desktop\\" 6 | x = 0 7 | 8 | while True: 9 | x += 1 10 | snapshot = ImageGrab.grab() 11 | save_path = path + "berko" + str(x) + ".jpg" 12 | snapshot.save(save_path) 13 | sleep(2) 14 | -------------------------------------------------------------------------------- /conky-start.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | sleep 10 4 | 5 | conky-manager 6 | -------------------------------------------------------------------------------- /crontab.txt: -------------------------------------------------------------------------------- 1 | DISPLAY=:0.0 2 | 5 * * * * /usr/bin/python /home/monster/Scripts/backup.py 3 | 30 * * * * /usr/bin/python /home/monster/Scripts/emre-mailclient-running.py 4 | @reboot /usr/bin/python /home/monster/Scripts/emre-mailclient-reboot.py 5 | 0 */4 * * * /bin/sh /home/monster/Scripts/Update.sh 6 | 45 */4 * * * /usr/bin/python /home/monster/Scripts/Emre-FileClient-Disk.py 7 | 10 22 * * * /usr/bin/python /home/monster/Scripts/backup_weekly.py 8 | 55 22 * * 3 /usr/bin/python /home/monster/Scripts/backup_tar.py 9 | 15 * * * * /usr/bin/python /home/monster/Scripts/Emre-FileClient-Arp.py 10 | 25 */4 * * * /usr/bin/python /home/monster/Scripts/Emre-FileClient-Inet.py 11 | #25 22 * * * /usr/bin/notify-send "Alert!" 'CTF' -i /usr/share/pixmaps/xfce4_xicon.png & paplay /usr/share/sounds/KDE-Sys-App-Error-Serious.ogg 12 | */30 * * * * /usr/bin/notify-send "Hooop :)" 'Kalk ve küçük egzersizler yap.' -i /usr/share/pixmaps/gksu-icon.png & paplay /usr/share/sounds/KDE-Sys-Trash-Emptied.ogg 13 | 14 | -------------------------------------------------------------------------------- /cve2exploit.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/python 2 | #EmreOvunc 3 | 4 | from requests import get 5 | 6 | urlFile = open('emo.txt','r') 7 | lines = urlFile.readlines() 8 | 9 | for line in lines: 10 | URL = line.strip() 11 | CVE = URL.split("=")[1] 12 | res = get(url=URL) 13 | if "exploit-db" in str(res._content): 14 | exploit = ("https://www.exploit-db" + str(res._content).split('exploit-db')[1].split('"')[0]) 15 | print(CVE + "|" + URL + "|" + exploit) 16 | -------------------------------------------------------------------------------- /debian_progs: -------------------------------------------------------------------------------- 1 | apt install bumblebee firmware-atheros sudo aptitude firmware-realtek firmware-misc-nonfree firmware-iwlwifi -y 2 | apt install linux-cpupower net-tools llvm-3.9 firmware-intel-sound leafpad apache2 kdenlive iptables-persistent -y 3 | apt install krita clang-3.9 filezilla nmap macchanger rsync gparted samba audacity wireshark python-scapy -y 4 | apt install python3-scapy python-pip python3-pip apktool adb androguard android-platform-tools-base -y 5 | apt install network-manager-ssh-gnome network-manager-openvpn-gnome network-manager-pptp-gnome python3 tcptrack -y 6 | apt install speedometer exfat-utils exfat-fuse cups cifs-utils tmux foremost fcrackzip aircrack-ng sqlmap -y 7 | apt install dnsrecon iodine whatweb -y 8 | -------------------------------------------------------------------------------- /del.py: -------------------------------------------------------------------------------- 1 | import os 2 | import platform 3 | 4 | Platform = platform.system() 5 | 6 | if Platform == 'Linux': 7 | from os.path import expanduser 8 | drc_1 = "/" 9 | drc_2 = "." 10 | drc_3 = expanduser("~") 11 | for dirName, subdirList, fileList in os.walk(drc_3): 12 | for fname in fileList: 13 | try: 14 | if fname.endswith(".psd") or fname.endswith(".dwg"): 15 | os.remove(dirName+"/"+fname) 16 | except: 17 | pass 18 | for dirName, subdirList, fileList in os.walk(drc_2): 19 | for fname in fileList: 20 | try: 21 | if fname.endswith(".psd") or fname.endswith(".dwg"): 22 | os.remove(dirName+"/"+fname) 23 | except: 24 | pass 25 | for dirName, subdirList, fileList in os.walk(drc_1): 26 | for fname in fileList: 27 | try: 28 | if fname.endswith(".psd") or fname.endswith(".dwg"): 29 | os.remove(dirName+"/"+fname) 30 | except: 31 | pass 32 | else: 33 | Dir_List = list(string.uppercase) 34 | for drc in Dir_List: 35 | drc = drc+":/" 36 | if (os.path.isdir(drc) == "True": 37 | for dirName, subdirList, fileList in os.walk(drc): 38 | print DirList 39 | for fname in fileList: 40 | try: 41 | if fname.endswith(".psd") or fname.endswith(".dwg"): 42 | os.remove(dirName+"/"+fname) 43 | except: 44 | pass 45 | -------------------------------------------------------------------------------- /dig_domain.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | filename=`cat subdomains.txt` 3 | for host in $filename; 4 | do 5 | IP=`dig $host |grep $host |grep -v ';' |awk '{ print $5 }' |grep -v 'A'` 6 | echo $host - $IP 7 | done -------------------------------------------------------------------------------- /digger.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # Emre Ovunc 3 | 4 | files='192.168.*' 5 | nameserver='8.8.8.8' 6 | save='live_domains.txt' 7 | touch $save 8 | # tail is used for removing .emo local domain 9 | 10 | for file_name in $files; do 11 | read_file=`cat $file_name|cut -f2` 12 | for domains in $read_file; do 13 | tail=`echo $domains|tail -c 4` 14 | if [[ $tail != *'emo'* ]]; then 15 | digger=`dig +short $domains @$nameserver` 16 | result=`echo $digger` 17 | if [[ $result != *'not known'* ]]; then 18 | domain=`echo $result|cut -d" " -f3` 19 | echo $domain "|" $domains|sort -u >> $save 20 | fi 21 | fi 22 | done 23 | done 24 | -------------------------------------------------------------------------------- /dns_req.py: -------------------------------------------------------------------------------- 1 | from scapy.all import * 2 | 3 | qName="emreovunc.com" 4 | dnsServer="8.8.8.8" 5 | 6 | answer = sr1(IP(dst=dnsServer)/UDP(dport=53)/DNS(rd=1,qd=DNSQR(qname=qName)),verbose=1) 7 | 8 | print answer[DNS].summary() 9 | -------------------------------------------------------------------------------- /emre-mailclient-backup.py: -------------------------------------------------------------------------------- 1 | import socket 2 | 3 | # Emre Ovunc 4 | # info@emreovunc.com 5 | 6 | HOST = 'SERVERIP' 7 | PORT = 'SERVERPORT' 8 | 9 | def socket_func(): 10 | s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) 11 | s.connect((HOST, PORT)) 12 | s.sendall('EmreOvunc-Backup') 13 | s.close() 14 | 15 | socket_func() 16 | -------------------------------------------------------------------------------- /emre-mailclient-weeklybackup.py: -------------------------------------------------------------------------------- 1 | import socket 2 | 3 | # Emre Ovunc 4 | # info@emreovunc.com 5 | 6 | HOST = 'SERVERIP' 7 | PORT = 'SERVERPORT' 8 | 9 | def socket_func(): 10 | s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) 11 | s.connect((HOST, PORT)) 12 | s.sendall('EmreOvunc-Backup') 13 | s.close() 14 | 15 | socket_func() 16 | -------------------------------------------------------------------------------- /esxi_adduser.txt: -------------------------------------------------------------------------------- 1 | #Shell 2 | cd /bin/ 3 | ln -s /usr/lib/vmware/busybox/bin/busybox adduser 4 | adduser -s /bin/ash -g Administrator -G root -h / [username] 5 | #UI 6 | Actions -> Permissions -> Add user 7 | -------------------------------------------------------------------------------- /esxi_hostname.txt: -------------------------------------------------------------------------------- 1 | Networking >>> TCP/IP configuration 2 | TCP/IP Stack Configuration >>> DNS Configuration 3 | Host name >> [hostname] 4 | -------------------------------------------------------------------------------- /ftp-rules.sh: -------------------------------------------------------------------------------- 1 | SERVER_IP = "SERVERIP" 2 | sudo iptables -F 3 | sudo iptables -P OUTPUT DROP 4 | sudo iptables -P INPUT DROP 5 | sudo iptables -P FORWARD DROP 6 | sudo iptables -A OUTPUT -d $SERVER_IP -p tcp --dport 21 -m state --state NEW,ESTABLISHED -j ACCEPT 7 | sudo iptables -A INPUT -s $SERVER_IP -p tcp --sport 21 -m state --state ESTABLISHED -j ACCEPT 8 | sudo iptables -A OUTPUT -d $SERVER_IP -p tcp --sport 1024: --dport 1024: -m state --state ESTABLISHED,RELATED -j ACCEPT 9 | sudo iptables -A INPUT -s $SERVER_IP -p tcp --sport 1024: --dport 1024: -m state --state ESTABLISHED -j ACCEPT 10 | -------------------------------------------------------------------------------- /getSessiontime.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/python3 2 | #EmreOvunc 3 | 4 | ######################### 5 | # pip3 install requests # 6 | ######################### 7 | 8 | from multiprocessing import Process 9 | from threading import Thread 10 | from requests import head 11 | from time import sleep 12 | 13 | def threads(): 14 | for i in range(10): 15 | sleep(0.001) 16 | t = Thread(target=getTime) 17 | t.start() 18 | 19 | def getTime(): 20 | while True: 21 | try: 22 | response = head(url, cookies=cookies) 23 | if (response.headers['Set-Cookie'].split(";")[0][:4]) != "Last": 24 | print(response.headers['Set-Cookie'].split(";")[2].split(',')[1].strip()) 25 | else: 26 | print(response.headers['Set-Cookie'].split(";")[0].strip()) 27 | except: 28 | pass 29 | 30 | jobs = [] 31 | 32 | url = "URL" 33 | cookies = {'sessionID':'testCookie'} 34 | 35 | for i in range(5): 36 | p = Process(target=threads) 37 | jobs.append(p) 38 | p.start() -------------------------------------------------------------------------------- /git_elle.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | path='/root/tool/' 3 | cd $path'AndroBugs_Framework' 4 | git pull 5 | cd $path'apd_launchpad' 6 | git pull 7 | cd $path'ARP-Poisoning-Tool' 8 | git pull 9 | cd $path'Bad-Pdf' 10 | git pull 11 | cd $path'CrackMapExec' 12 | git pull 13 | cd $path'datasploit' 14 | git pull 15 | cd $path'DeathStar' 16 | git pull 17 | cd $path'dnsteal' 18 | git pull 19 | cd $path'droopescan' 20 | git pull 21 | cd $path'eapeak' 22 | git pull 23 | cd $path'eaphammer' 24 | git pull 25 | cd $path'Empire' 26 | git pull 27 | cd $path'EyeWitness' 28 | git pull 29 | cd $path'gobuster' 30 | git pull 31 | cd $path'icebreaker' 32 | git pull 33 | cd $path'impacket' 34 | git pull 35 | cd $path'labs' 36 | git pull 37 | cd $path'metasploit-loader' 38 | git pull 39 | cd $path'Mobile-Security-Framework-MobSF' 40 | git pull 41 | cd $path'MyDailyScripts' 42 | git pull 43 | cd $path'ntlmv1-multi' 44 | git pull 45 | cd $path'python-pty-shells' 46 | git pull 47 | cd $path'Responder' 48 | git pull 49 | cd $path'snarf' 50 | git pull 51 | cd $path'subbrute' 52 | git pull 53 | cd $path'tcpprox' 54 | git pull 55 | cd $path'tomcatWarDeployer' 56 | git pull 57 | cd $path'vlan-hopping---frogger' 58 | git pull 59 | cd $path'web-shells' 60 | git pull 61 | cd $path'Windows-Exploit-Suggester' 62 | git pull 63 | cd $path'windows-privesc-check' 64 | git pull 65 | cd $path'winshock-test' 66 | git pull 67 | cd $path'xerosploit' 68 | git pull 69 | -------------------------------------------------------------------------------- /git_gpgkey_signing: -------------------------------------------------------------------------------- 1 | gpg --full-generate-key 2 | gpg --list-secret-keys --keyid-format LONG 3 | gpg --armor --export [GPG_KEY_ID] 4 | #Go to your GitHub account via browser 5 | Settings >> SSH and GPG keys >> New GPG key >> Paste it. 6 | -------------------------------------------------------------------------------- /git_usage.sh: -------------------------------------------------------------------------------- 1 | #Git basic usage 2 | git clone https://github.com/EmreOvunc/MyDailyScripts.git 3 | cd MyDailyScripts 4 | #changing files bla bla.. 5 | #git update-index --chmod=+x 6 | #git config core.filemode true 7 | git add . 8 | git commit -S -m "Changing file permissions" 9 | git config --global user.email "@emreovunc.com" 10 | git config --global user.name "EmreOvunc" 11 | git push 12 | -------------------------------------------------------------------------------- /gnmap_pars.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | for i in {128..255}; do 3 | IPs=`cat 10.128.0.0.gnmap | cut -d" " -f2 | grep "10.$i." > _$i` 4 | size=`ls -la _$i | cut -d" " -f5` 5 | if [[ $size == 0 ]]; then 6 | rm -rf _$i 7 | fi 8 | done 9 | exit 0 10 | -------------------------------------------------------------------------------- /gnmap_pars2.sh: -------------------------------------------------------------------------------- 1 | cat Scan.gnmap | grep -E "Ports|open" | grep -v "close" |grep -w “80/open" | cut -d" " -f2 -------------------------------------------------------------------------------- /gophish_track.txt: -------------------------------------------------------------------------------- 1 | #Create scenario 2 | cat gophish.log |grep "10.20.30.40"|grep POST|grep -v login|grep campaigns|grep 2019-12-06 3 | #Delete scenario 4 | cat gophish.log |grep "10.20.30.40"|grep DELETE|grep 2019-12-06 -------------------------------------------------------------------------------- /hackthebox_firewall.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | #HackTheBox IPTables Firewall 3 | #EmreOvunc 4 | # 5 | ETHERNET="eth0" 6 | INTERNAL="192.168.0.0/16" 7 | OPENVPN="tun0" 8 | MACHINES="10.10.10.0/24" 9 | # 10 | iptables -F 11 | iptables -P INPUT DROP 12 | iptables -P OUTPUT DROP 13 | iptables -P FORWARD DROP 14 | # 15 | iptables -A INPUT -i lo -j ACCEPT 16 | iptables -A INPUT -i $ETHERNET -j ACCEPT 17 | iptables -A INPUT -s 127.0.0.0/16 -j ACCEPT 18 | iptables -A INPUT -p udp --sport 53 -j ACCEPT 19 | iptables -A INPUT -p tcp -m tcp --sport 80 -j ACCEPT 20 | iptables -A INPUT -p tcp -m tcp --sport 443 -j ACCEPT 21 | iptables -A INPUT -i $OPENVPN -p udp -s $MACHINES -j ACCEPT 22 | iptables -A INPUT -i $OPENVPN -m tcp -p tcp -s $MACHINES -j ACCEPT 23 | iptables -A INPUT -i $OPENVPN -p tcp -s $MACHINES --dport 139 -j ACCEPT 24 | iptables -A INPUT -i $OPENVPN -p tcp -s $MACHINES --dport 445 -j ACCEPT 25 | iptables -A INPUT -i $OPENVPN -p tcp -s $MACHINES --dport 8000 -j ACCEPT 26 | iptables -A INPUT -i $OPENVPN -s $MACHINES -m tcp -p tcp --dport 4444 -j ACCEPT 27 | iptables -A INPUT -i $OPENVPN -s $MACHINES -m tcp -p tcp --dport 4545 -j ACCEPT 28 | # 29 | iptables -A FORWARD -i $ETHERNET -s $INTERNAL -j ACCEPT 30 | iptables -A FORWARD -o $ETHERNET -d $INTERNAL -j ACCEPT 31 | # 32 | iptables -A OUTPUT -o lo -j ACCEPT 33 | iptables -A OUTPUT -o $ETHERNET -j ACCEPT 34 | iptables -A OUTPUT -d 127.0.0.0/16 -j ACCEPT 35 | iptables -A OUTPUT -p udp --dport 53 -j ACCEPT 36 | iptables -A OUTPUT -p tcp -m tcp --dport 80 -j ACCEPT 37 | iptables -A OUTPUT -p tcp -m tcp --dport 443 -j ACCEPT 38 | iptables -A OUTPUT -o $OPENVPN -p udp -d $MACHINES -j ACCEPT 39 | iptables -A OUTPUT -o $OPENVPN -m tcp -p tcp -d $MACHINES -j ACCEPT 40 | iptables -A OUTPUT -o $OPENVPN -p tcp -d $MACHINES --sport 139 -j ACCEPT 41 | iptables -A OUTPUT -o $OPENVPN -p tcp -d $MACHINES --sport 445 -j ACCEPT 42 | iptables -A OUTPUT -o $OPENVPN -p tcp -d $MACHINES --sport 8000 -j ACCEPT 43 | iptables -A OUTPUT -o $OPENVPN -d $MACHINES -m tcp -p tcp --sport 4444 -j ACCEPT 44 | iptables -A OUTPUT -o $OPENVPN -d $MACHINES -m tcp -p tcp --sport 4545 -j ACCEPT 45 | # 46 | iptables-save -------------------------------------------------------------------------------- /ip_link_mac.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | ip link set dev eth0 down 3 | ip link set dev eth0 address AA:BB:CC:11:22:33 4 | ip link set dev eth0 up 5 | ip link show eth0 6 | -------------------------------------------------------------------------------- /ip_remover.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # EmreOvunc 3 | 4 | #whitelist.txt contains; 5 | #192.168.1.x 6 | #172.16.150.x 7 | 8 | #ipler.txt contains; 9 | #192.168.2.1, 10.0.0.1, 172.16.24.10 10 | 11 | file_name='whitelist.txt' 12 | read_file=`cat $file_name` 13 | 14 | sick_file='ipler.txt' 15 | read_sick=`cat $sick_file` 16 | 17 | all='' 18 | 19 | for line in $read_sick ; do 20 | ip_check=`echo $line` 21 | if [[ $ip_check = *','* ]]; then 22 | ip=`echo $ip_check|sed s'/.$//'` 23 | else 24 | ip=`echo $ip_check` 25 | fi 26 | ip_=`echo $ip|cut -d":" -f1` 27 | if [ ! "$ip_" ]; then 28 | break 29 | fi 30 | for l1ne in $read_file ; do 31 | white_ip=`echo $l1ne|cut -d"." -f1,2,3|sed 's/$/./g'` 32 | if [[ $ip_ = *"$white_ip"* ]]; then 33 | all+=`echo "$ip, "` 34 | echo "$ip - $white_ip" 35 | fi 36 | done 37 | done 38 | echo $all|xclip -sel clipboard 39 | -------------------------------------------------------------------------------- /ip_to_host_and_web.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/python3 2 | 3 | from socket import gethostbyaddr 4 | from os import system 5 | from subprocess import Popen, PIPE 6 | 7 | ## Current configuration is designed to discover 8 | ## hostname and web url to given IP 0-255 (means /24) 9 | ## If you want to scan /16 instead of /24, you should 10 | ## change last_subnet to 255 or other one. 11 | ## last_subnet is on line #84. 12 | 13 | ## IP = Network ID 14 | ## Examples: 15 | ## /24 = 192.168.1.0 16 | ## /16 = 192.168.0.0 17 | 18 | IP = "10.0.0.0" 19 | List = [] 20 | webList = [] 21 | path = '/root/Desktop/ip2hostname_web' 22 | system('mkdir ' + path) 23 | 24 | def httpHeaders(IP): 25 | nmapScript = 'nmap --script http-headers -p80,443 ' + IP +' -T5 |grep Location |grep -v "' + IP + '"' 26 | nmapProc = Popen([nmapScript], stdout=PIPE, shell=True) 27 | (out, err) = nmapProc.communicate() 28 | if out.decode() != "": 29 | webList.append((IP, out.decode().split()[2])) 30 | 31 | def writewebList(list): 32 | file_web = open(path + '/webhost.txt', 'w') 33 | file_ip2web = open(path + '/ip2web.txt', 'w') 34 | for webip in list: 35 | file_web.write(str(webip[1])) 36 | file_ip2web.write(str(webip[0] + '|' + str(webip[1]))) 37 | file_web.close() 38 | file_ip2web.close() 39 | 40 | def writeList(list): 41 | file_ip = open(path + '/ip_list.txt', 'w') 42 | file_host = open(path + '/host_list.txt', 'w') 43 | file_ip2host = open(path + '/ip2host.txt', 'w') 44 | for ips in list: 45 | if not 'Unkn' in str(ips).split(' ')[0][2:-2]: 46 | file_ip.write(str(ips).split(' ')[2][2:-3]) 47 | file_host.write(str(ips).split(' ')[0][2:-2]) 48 | file_ip2host.write(str(ips).split(' ')[2][2:-3] + '|' + str(ips).split(' ')[0][2:-2]) 49 | file_ip.close() 50 | file_host.close() 51 | file_ip2host.close() 52 | 53 | def gethostname(IPaddr): 54 | try: 55 | List.append(gethostbyaddr(IPaddr)) 56 | except: 57 | List.append(('Unknown Host', [], IPaddr)) 58 | 59 | 60 | subnet = IP.split('.')[0] + '.' +\ 61 | IP.split('.')[1] + '.' 62 | 63 | target = IP.split('.')[0] + '.' +\ 64 | IP.split('.')[1] + '.' +\ 65 | IP.split('.')[2] + '.' 66 | 67 | last_subnet = int(IP.split('.')[2]) 68 | last_part = int(IP.split('.')[3]) 69 | 70 | while True: 71 | last_part += 1 if last_part < 255 else -255 72 | temp_IP = str(subnet) + str(last_subnet)+ '.' + str(last_part) 73 | 74 | gethostname(temp_IP) 75 | httpHeaders(temp_IP) 76 | 77 | if last_part == 255: 78 | last_subnet += 1 79 | 80 | ## Change it if you want to discover another subnet. 81 | ## For Example: IP = 10.250.180.0 82 | ## /24 -> last_subnet = 181 83 | ## /16 -> last_subnet = 256 84 | if last_subnet == 256: 85 | break 86 | 87 | writeList(List) 88 | writewebList(webList) -------------------------------------------------------------------------------- /iptables-redirecting.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | sudo iptables -F 3 | sudo iptables -A FORWARD -s 192.168.1.41 -i wlan0 -o vboxnet0 -d 10.0.0.210 -j ACCEPT 4 | sudo iptables -A FORWARD -s 192.168.1.41 -i wlan0 -o vboxnet0 -d 10.0.0.210 -m state --state ESTABLISHED,RELATED -j ACCEPT 5 | sudo iptables -t nat -A POSTROUTING -o wlan0 -j MASQUERADE 6 | -------------------------------------------------------------------------------- /iptables_forward.sh: -------------------------------------------------------------------------------- 1 | sysctl net.ipv4.ip_forward=1 2 | dst_ip="1.1.1.1" 3 | iptables -t nat -A PREROUTING -p tcp --dport 139 -j DNAT --to $dst_ip:139 4 | iptables -A FORWARD -d $dst_ip -p tcp --dport 139 -j ACCEPT 5 | iptables -t nat -A PREROUTING -p tcp --dport 445 -j DNAT --to $dst_ip:445 6 | iptables -A FORWARD -d $dst_ip -p tcp --dport 445 -j ACCEPT -------------------------------------------------------------------------------- /iptables_portfwd_others.sh: -------------------------------------------------------------------------------- 1 | sudo iptables -t nat -F 2 | sudo iptables -F 3 | MY="10.0.1.143" 4 | DST="10.70.50.1" 5 | sudo iptables -t nat -A PREROUTING -p tcp --dport 80 -j DNAT --to-destination $DST:80 6 | sudo iptables -t nat -A POSTROUTING -p tcp -d $DST --dport 80 -j SNAT --to-source $MY 7 | sudo sysctl net.ipv4.ip_forward=1 8 | -------------------------------------------------------------------------------- /issue.net: -------------------------------------------------------------------------------- 1 | ######################################################## 2 | # # 3 | # Welcome to Secret Server # 4 | # (Emre OVUNC) # 5 | # # 6 | ######################################################## 7 | # [ Login Attempts are logged ! ] # 8 | ######################################################## 9 | 10 | 11 | -------------------------------------------------------------------------------- /kali_progs: -------------------------------------------------------------------------------- 1 | git clone https://github.com/DataSploit/datasploit.git 2 | git clone https://github.com/ChrisTruncer/EyeWitness.git 3 | git clone https://github.com/AndroBugs/AndroBugs_Framework.git 4 | git clone --recursive https://github.com/byt3bl33d3r/CrackMapExec 5 | git clone https://github.com/SpiderLabs/Responder.git 6 | git clone https://github.com/DanMcInerney/icebreaker.git 7 | git clone https://github.com/mgeeky/tomcatWarDeployer.git 8 | git clone https://github.com/LionSec/xerosploit.git 9 | git clone https://github.com/anexia-it/winshock-test.git 10 | git clone https://github.com/nccgroup/vlan-hopping---frogger.git 11 | git clone https://github.com/EmreOvunc/ARP-Poisoning-Tool.git 12 | git clone https://github.com/nixawk/labs.git 13 | git clone https://github.com/CoreSecurity/impacket.git 14 | git clone https://github.com/infodox/python-pty-shells.git 15 | git clone https://github.com/MobSF/Mobile-Security-Framework-MobSF.git 16 | git clone https://github.com/strawp/web-shells.git 17 | git clone https://github.com/m57/dnsteal.git 18 | git clone https://github.com/EmpireProject/Empire.git 19 | git clone https://github.com/byt3bl33d3r/DeathStar.git 20 | git clone https://github.com/deepzec/Bad-Pdf.git 21 | git clone https://github.com/staaldraad/tcpprox.git 22 | wget https://github.com/caffix/amass/releases/download/v2.3.0/amass_2.3.0_linux_amd64.zip 23 | git clone https://github.com/pentestmonkey/windows-privesc-check.git 24 | git clone https://github.com/GDSSecurity/Windows-Exploit-Suggester.git 25 | git clone https://github.com/OJ/gobuster.git 26 | git clone https://github.com/droope/droopescan.git 27 | git clone https://github.com/rsmudge/metasploit-loader.git 28 | wget https://github.com/rsmudge/metasploit-loader/files/1238757/main64.zip 29 | git clone https://github.com/TheRook/subbrute.git 30 | git clone https://github.com/EmreOvunc/MyDailyScripts.git 31 | git clone https://github.com/securestate/eapeak.git 32 | git clone https://github.com/s0lst1c3/eaphammer.git 33 | git clone https://github.com/evilmog/ntlmv1-multi.git 34 | git clone https://github.com/purpleteam/snarf.git 35 | git clone https://github.com/WJDigby/apd_launchpad.git 36 | git clone https://github.com/merttasci/csrf-poc-generator.git 37 | git clone https://github.com/SpiderLabs/ikeforce.git 38 | git clone https://github.com/guelfoweb/knock.git 39 | git clone https://github.com/robotattackorg/robot-detect.git 40 | git clone https://github.com/Antonin-Deniau/cave_miner.git 41 | git clone https://github.com/RUB-NDS/Metadata-Attacker.git 42 | apt install bloodhound python3-scapy golang sublist3r -y 43 | #https://github.com/michenriksen/aquatone/releases/ 44 | git clone https://github.com/EmreOvunc/Http-Headers-and-Web-Services-Screenshots.git 45 | git clone https://github.com/jordanpotti/CloudScraper.git 46 | git clone https://github.com/GerbenJavado/LinkFinder.git 47 | git clone https://github.com/shivsahni/FireBaseScanner.git 48 | git clone https://github.com/1N3/Wordpress-XMLRPC-Brute-Force-Exploit.git 49 | git clone https://github.com/sa7mon/S3Scanner.git 50 | git clone https://github.com/drwetter/testssl.sh.git 51 | git clone https://github.com/nccgroup/fuzzowski.git 52 | git clone https://github.com/EmreOvunc/Python-SYN-Flood-Attack-Tool.git 53 | git clone https://github.com/yassineaboukir/CVE-2018-0296.git 54 | git clone https://github.com/Nekmo/dirhunt.git 55 | git clone https://github.com/rishuranjanofficial/JWTweak.git 56 | git clone https://github.com/jordanpotti/AWSBucketDump.git 57 | git clone https://github.com/libimobiledevice/libimobiledevice.git 58 | git clone https://github.com/sleventyeleven/linuxprivchecker.git 59 | git clone https://github.com/m4ll0k/SecretFinder.git 60 | git clone https://github.com/sensepost/heartbleed-poc.git 61 | git clone https://github.com/yogeshojha/rengine.git 62 | git clone https://github.com/m4ll0k/Atlas.git 63 | -------------------------------------------------------------------------------- /macOS_iso_to_usb: -------------------------------------------------------------------------------- 1 | hdiutil convert -format UDRW -o debian.img debian-10.6.0-amd64-netinst.iso 2 | mv debian.img.dmg debian.img 3 | diskutil list 4 | diskutil unmountDisk /dev/diskXXXX 5 | sudo dd if=debian.img of=/dev/rdiskXXXX bs=1m 6 | -------------------------------------------------------------------------------- /mobile_basics.txt: -------------------------------------------------------------------------------- 1 | # apktool d testbank.apk 2 | # -name *.xml *.smali 3 | #Find HTTP Requests 4 | find testbank/ -type f -name *.xml -exec cat {} \;|grep -i http|egrep -v "schemas|w3" 5 | #Find IPv4 Addresses 6 | find testbank/ -type f -name *.xml -exec cat {} \;|grep -E "([0-9]{1,3}[\.]){3}[0-9]{1,3}" 7 | -------------------------------------------------------------------------------- /nessus_pause.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | #EmreOvunc 3 | login=`curl -i -s -k -X $'POST' \ 4 | -H $'Host: localhost:8834' -H $'User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Firefox/52.0' -H $'Accept: */*' -H $'Accept-Language: en-US,en;q=0.5' -H $'Accept-Encoding: gzip, deflate' -H $'Referer: https://localhost:8834/' -H $'Content-Type: application/json' -H $'X-API-Token: XXXXXX-XXXX-XXXX-XXXXXX' -H $'Connection: close' \ 5 | --data-binary $'{\"username\":\"emre\",\"password\":\"Passw0rd\"}' \ 6 | $'https://localhost:8834/session'` 7 | tokenim=`echo $login|cut -d":" -f15|cut -d"}" -f1| sed 's:^.\(.*\).$:\1:'` 8 | pause_nessus=`curl -X POST -H "Content-Type: application/json; charset=utf-8" -H "X-Cookie: token=$tokenim" -H "X-API-Token: XXXXX-XXXX-XXXX-XXXXX-XXXXXXX" https://localhost:8834/scans/XXX/pause -k` 9 | echo $pause_nessus 10 | -------------------------------------------------------------------------------- /nmap_2_livehosts.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # EmreOvunc 3 | dirs=`ls -l|awk '{print $9}'|sort -u` 4 | for dir in $(echo $dirs); do 5 | cmd=`cat $dir/*.gnmap|egrep "Host|Up"|cut -d" " -f2|sort -u > $dir/live.txt` 6 | done 7 | -------------------------------------------------------------------------------- /nmap_2_nessus.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | #EmreOvunc 3 | # Change localhost:8834 to your nessus | x4 times 4 | # Change X-API-Token | x2 times 5 | # Change uuid | x1 times 6 | # Change username and password | x1 times 7 | login=`curl -i -s -k -X $'POST' \ 8 | -H $'Host: localhost:8834' -H $'User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Firefox/52.0' -H $'Accept: */*' -H $'Accept-Language: en-US,en;q=0.5' -H $'Accept-Encoding: gzip, deflate' -H $'Referer: https://localhost:8834/' -H $'Content-Type: application/json' -H $'X-API-Token: XXXXXX-XXXXX-XXXXX-XXXXXX' -H $'Connection: close' \ 9 | --data-binary $'{\"username\":\"emre\",\"password\":\"Passw0rd\"}' \ 10 | $'https://localhost:8834/session'` 11 | tokenim=`echo $login|cut -d":" -f15|cut -d"}" -f1| sed 's:^.\(.*\).$:\1:'` 12 | dir=`ls -l|awk '{print $9}'|sort -u` 13 | rm -rf dizin.txt 2 $dizin/live.txt` 19 | read_live=`cat $dizin/live.txt` 20 | lives=`echo $read_live|tr " " ','` 21 | rm -rf req.txt 2 req.txt 23 | add_nessus=`curl -X POST -H "Content-Type: application/json; charset=utf-8" -H "X-Cookie: token=$tokenim" -H "X-API-Token: XXXXXX-XXXXX-XXXXX-XXXXXX" -d@req.txt https://localhost:8834/scans -k` 24 | echo $add_nessus 25 | fi 26 | done 27 | -------------------------------------------------------------------------------- /nmap_lazy_pingscan.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | for host in $(cat taranmayan.txt); do x1=`echo $host|cut -d"-" -f1`; x2=`echo $host|cut -d"-" -f2`; x3=`echo $host|cut -d"-" -f3`; x4=`echo $host|cut -d"-" -f4`; x5=`echo $host|cut -d"-" -f5`; ip=`echo $x1.$x2.$x3.$x4/$x5`; outf=`echo $x1-$x2-$x3-$x4-$x5`; mkdir live_kalanlar/$outf; nmap -sn -n $ip -oA live_kalanlar/$outf/$outf; done 3 | -------------------------------------------------------------------------------- /nmap_parse_smb.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/python3 2 | #EmreOvunc 3 | 4 | from os import listdir 5 | from os import system 6 | 7 | system('rm ms17_010.txt 2 ../snmp-info/$host; done 12 | 13 | # Read all .gnmap and find smb attacks on port 445. 14 | for host in $(cat */*.gnmap|grep "445/open"|cut -d" " -f2| sort -u); do nmap -p445 --script smb-vuln-* -Pn -n $host --open -oA ../smb-vuln/$host; done 15 | 16 | # Nbtscan 17 | nbtscan -r 10.0.0.0/24 > nbtscan.txt 18 | 19 | # Read nbtscan results and find ms17_010 vuln on port 445. 20 | for ip in $(cat nbtscan.txt|cut -d" " -f1); do nmap -n -Pn --open -p445 $ip --script smb-vuln-ms17*; done 21 | 22 | # Find file size = 0 in the current directory. 23 | list=`ls -la */live.txt`; for satir in $(echo $list); do size=`ls -la $satir 2>/dev/null|awk '{print $5}'|grep -o "0"`; if [[ $size == 0 ]]; then echo $satir; fi done 24 | 25 | # Run 'cat /etc/passwd && hostname' commands on given ssh host list. 26 | for host in $(cat ssh_host_list.txt); do sshpass -p 'password' ssh -o StrictHostKeyChecking=no USER@$host "/bin/cat /etc/passwd && hostname && id" > sshpass_dir/$host; done 27 | 28 | # Find and show files that contains 'admin' string 29 | files=`ls -l|awk '{print $9}'`; for file in $(echo $files); do size=`ls -l $file|awk '{print $5}'`; string=`cat $file|grep 'admin'`; if [[ $string != '' ]]; then echo $file; fi done 30 | 31 | # Find and remove directories that contains empty live.txt file. 32 | dirc=`ls -l|awk '{print $9}'`; for dir in $(echo $dirc); do size=`ls -l $dir|grep live.txt|awk '{print $5}'`; if [[ $size == 0 ]]; then rm -rf $dir; fi done 33 | 34 | # Find all IP address of the nameservers given domain 35 | domain="twitter.com"; nameservers=`dig $domain NS|grep $domain.|egrep -v ";$domain|DiG"|awk '{print $5}'|sed 's/.$//'`; for ns in $nameservers; do res=`dig $ns +short`; echo $res $ns; done 36 | 37 | #Domain GPP module 38 | msfconsole -> scanner/smb/smb_enum_gpp 39 | -------------------------------------------------------------------------------- /ping_live.sh: -------------------------------------------------------------------------------- 1 | host_file="targets.txt" 2 | online_file="online.txt" 3 | offline_file="offline.txt" 4 | if [ -f "$online_file" ]; 5 | then 6 | rm "$online_file" 7 | fi 8 | touch "$online_file" 9 | if [ -f "$offline_file" ]; 10 | then 11 | rm "$offline_file" 12 | fi 13 | touch "$offline_file" 14 | cat "$host_file" | sort -u | while read line 15 | do 16 | live=`ping -c 1 -t 2 "$line" 2>/dev/null | grep time | cut -d" " -f4 | cut -d":" -f1` 17 | if [ "$live" != "" ]; 18 | then 19 | echo "$live - Accessible" 20 | echo "$line" >> "$online_file" 21 | else 22 | echo "$line - Inaccessible" 23 | echo "$line" >> "$offline_file" 24 | fi 25 | done -------------------------------------------------------------------------------- /py3_compare.py: -------------------------------------------------------------------------------- 1 | #/usr/bin/python3 2 | 3 | giden = open('giden.txt','r') 4 | gline = giden.readlines() 5 | 6 | total = open('group_template.csv','r') 7 | tline = total.readlines() 8 | 9 | for line in tline: 10 | tot = line.strip() 11 | 12 | cnt = 0 13 | 14 | for line2 in gline: 15 | 16 | if line2.strip().upper() in tot: 17 | 18 | break 19 | 20 | else: 21 | 22 | cnt += 1 23 | 24 | #Total number of duplicates 1465 25 | if cnt >= 1464: 26 | 27 | print(tot) 28 | 29 | 30 | 31 | 32 | -------------------------------------------------------------------------------- /py3_crawler.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/python3 2 | #EmreOvunc 3 | 4 | ######################### 5 | # pip3 install requests # 6 | ######################### 7 | 8 | from multiprocessing import Process 9 | from multiprocessing import Queue 10 | from threading import Thread 11 | from requests import get 12 | from time import sleep 13 | from re import findall 14 | 15 | def findDuplicates(publicQueue, crawlingQueue, controlQueue, website, domain, urlFile): 16 | #qList for temp. URLs 17 | qList = [] 18 | addFlag = 0 19 | 20 | #Add first address to the list. 21 | qList.append(website) 22 | 23 | while True: 24 | if not publicQueue.empty(): 25 | tmpURL = publicQueue.get() 26 | 27 | for oldURL in qList: 28 | 29 | #If the URL come already. 30 | if oldURL == tmpURL: 31 | addFlag += 1 32 | break 33 | 34 | if addFlag == 0: 35 | 36 | #Controlling domain part 37 | if domain in tmpURL: 38 | urlFile.write(tmpURL + "\n") 39 | qList.append(tmpURL) 40 | crawlingQueue.put(tmpURL) 41 | 42 | else: 43 | addFlag -= 1 44 | 45 | else: 46 | sleep(0.05) 47 | 48 | #If the crawling done! 49 | if controlQueue.empty(): 50 | break 51 | 52 | urlFile.close() 53 | 54 | 55 | def findURLs(publicQueue, crawlingQueue, controlQueue, baseURL, domain): 56 | while True: 57 | 58 | #If crawling url not found! 59 | if crawlingQueue.empty() and not publicQueue.empty(): 60 | pass 61 | 62 | #If all queues are empty, stop crawling processes. 63 | elif publicQueue.empty() and crawlingQueue.empty(): 64 | controlQueue.get() 65 | exit(0) 66 | 67 | else: 68 | website = crawlingQueue.get() 69 | 70 | try: 71 | response = get(website) 72 | #response = get(website, cookies=cookies) 73 | except: 74 | response = "ERROR" 75 | 76 | try: 77 | content = response.content.decode('utf-8') 78 | except: 79 | content = "" 80 | 81 | urls = findall(r'href=[\'"]?([^\'" >]+)', content) 82 | 83 | for url in urls: 84 | 85 | #Hardcoded elimination for urls 86 | if "javascript:void(0)" != url.strip() and '#' != url.strip(): 87 | 88 | #Checking the url .css or .js extension 89 | if url.strip().split(".")[-1] != "js" and url.strip().split(".")[-1] != "css" \ 90 | and url.strip().split(".")[-1] != "png" and url.strip().split(".")[-1] != "json" \ 91 | and url.strip().split(".")[-1] != "jpeg" and url.strip().split(".")[-1] != "jpg" \ 92 | and url.strip().split(".")[-1] != "xml" and url.strip().split(".")[-1] != "co" \ 93 | and url.strip().split(".")[-1] != "pdf" and url.strip().split(".")[-1] != "rb" \ 94 | and url.strip().split(".")[-1] != "py" and url.strip().split(".")[-1] != "c" \ 95 | and url.strip().split(".")[-1] != "svg" and url.strip().split(".")[-1] != "ico" : 96 | 97 | #If the url is not in the http:// or https:// (base) format 98 | if not url.startswith(baseURL): 99 | 100 | #Passing mail 101 | if not url.startswith('mailto'): 102 | 103 | #If the URL is different from the target domain 104 | if not url.startswith('http'): 105 | 106 | #It prevents double // -> http://example.com//path 107 | if not url.startswith("/"): 108 | 109 | #Concatenate domain + url 110 | url = baseURL + "/" + url 111 | 112 | else: 113 | 114 | #Concatenate domain + url 115 | url = baseURL + url 116 | 117 | else: 118 | 119 | #Controlling domain part 120 | if not domain in url: 121 | break 122 | 123 | #Controlling via blackList 124 | blackFlag = 0 125 | for site in blackList: 126 | 127 | if site in url: 128 | blackFlag += 1 129 | break 130 | 131 | #blackFlag = 0 means, the URL is valid 132 | if blackFlag == 0: 133 | publicQueue.put(url) 134 | 135 | #Else, the url is in the blacklist. 136 | else: 137 | blackFlag -= 1 138 | 139 | #Multi-processing 140 | publicQueue = Queue(maxsize=5000) 141 | crawlingQueue = Queue(maxsize=5000) 142 | controlQueue = Queue(maxsize=2) 143 | 144 | controlQueue.put(1) 145 | 146 | #Write results in to the file 147 | urlFile = open('urlFiles.txt','w') 148 | 149 | #Do not put these urls into the Queue! 150 | blackList = ["microsoft.com", "google.com", "mozilla.org", "instagram.com",\ 151 | "linkedin.com", "twitter.com", "github.com", "facebook.com"] 152 | 153 | #Starting address for crawling 154 | 155 | baseURL = "https://example.com" 156 | website = "https://example.com" 157 | domain = "example.com" 158 | 159 | ''' 160 | #Change burp_cookie value to active session cookies!!! 161 | burp_cookie = "" 162 | burp_cookie = burp_cookie[8:] 163 | 164 | #New cookies in JSON format 165 | cookies = {} 166 | 167 | #Convert cookie to JSON 168 | for numberofcookies in range (0, len(burp_cookie.split(";"))): 169 | cookies[burp_cookie.split(";")[numberofcookies].split("=")[0].strip()] =\ 170 | burp_cookie.split(";")[numberofcookies].split("=")[1].strip() 171 | ''' 172 | 173 | #Put first URL into the crawling queue 174 | crawlingQueue.put(website) 175 | 176 | #Finding URLs 177 | url_proc = Process(target=findURLs, args=(publicQueue, crawlingQueue, controlQueue, baseURL, domain, ) ) 178 | url_proc.start() 179 | 180 | #Finding duplicates 181 | dup_proc = Process(target=findDuplicates, args=(publicQueue, crawlingQueue, controlQueue, website, domain, urlFile, ) ) 182 | dup_proc.start() 183 | 184 | while True: 185 | #If all processes are done! 186 | if not url_proc.is_alive() and not url_proc.is_alive(): 187 | exit() 188 | -------------------------------------------------------------------------------- /py3_excel_parser.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/python3 2 | # EmreOvunc 3 | 4 | from pandas import ExcelFile 5 | from argparse import ArgumentParser 6 | 7 | parser = ArgumentParser() 8 | parser.add_argument('--file', help='select a excel file') 9 | data_parser = parser.add_argument_group('[Data Manipulation]') 10 | data_parser.add_argument('--sheet-name', help='give a sheet name') 11 | data_parser.add_argument('--column', help='give a column name') 12 | args = parser.parse_args() 13 | 14 | if args.file != '' or args.file != False: 15 | try: 16 | excel = ExcelFile(args.file) 17 | if args.sheet_name != "" and args.sheet_name != None: 18 | sheet = excel.parse(args.sheet_name) 19 | if args.column != "" and args.column != None: 20 | for data in sheet[args.column]: 21 | print(data) 22 | else: 23 | print('[-]Please, use --column [COLUMN_NAME] to give a column name!') 24 | else: 25 | print('[-]Please, use --sheet-name [SHEET_NAME] to give a sheet name!') 26 | except: 27 | print('[-]' + str(args.file) + ' file could not found!') 28 | exit() 29 | else: 30 | print('[-]Please, use --file [FILENAME] to select an excel file!') 31 | exit() 32 | -------------------------------------------------------------------------------- /py3_googleforms.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/python3 2 | #EmreOvunc 3 | 4 | from selenium.webdriver.chrome.options import Options 5 | from selenium import webdriver 6 | from random import randint 7 | from time import sleep 8 | 9 | namefile = open('isimler.txt','r') 10 | names = namefile.readlines() 11 | 12 | snamefile = open('soyisim.txt','r') 13 | snames = snamefile.readlines() 14 | 15 | def getname(names): 16 | rast = randint(0,2447) 17 | if len(names[rast].lower().strip().split(' ')) == 1: 18 | ad = names[rast].lower().strip() 19 | else: 20 | ad = names[rast].lower().strip().split(' ')[1] 21 | return ad 22 | 23 | def getsname(snames): 24 | rasts = randint(0,2446) 25 | if len(snames[rasts].lower().strip().split(' ')) == 1: 26 | sad = snames[rasts].lower().strip() 27 | else: 28 | sad = snames[rasts].lower().strip().split(' ')[1] 29 | return sad 30 | 31 | def sec(): 32 | option = Options() 33 | driver_path = "chromedriver" 34 | option.add_argument('--no-sandbox') 35 | #option.add_argument('--headless') 36 | mobile_emulation = {"deviceName": "Nexus 5"} 37 | mobile_emulation = {"deviceMetrics": { "width": 360, "height": 640, "pixelRatio": 3.0 },"userAgent": "Mozilla/5.0 (Linux; Android 9; SM-N960F) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.62 Mobile Safari/537.36" } 38 | option.add_experimental_option("mobileEmulation", mobile_emulation) 39 | browser = webdriver.Chrome(executable_path=driver_path,options=option) 40 | browser.get('URL') 41 | browser.find_element_by_xpath(".//*[contains(text(), 'User')]").click() 42 | 43 | try: 44 | ad = getname(names) 45 | except: 46 | sec() 47 | 48 | try: 49 | sad = getsname(snames) 50 | except: 51 | sec() 52 | 53 | if 'ş' in ad: 54 | ad = ad.replace('ş','s') 55 | 56 | if 'ş' in sad: 57 | sad = sad.replace('ş','s') 58 | 59 | if 'ğ' in ad: 60 | ad = ad.replace('ğ','g') 61 | 62 | if 'ğ' in sad: 63 | sad = sad.replace('ğ','g') 64 | 65 | if 'ü' in ad: 66 | ad = ad.replace('ü','u') 67 | 68 | if 'ü' in sad: 69 | sad = sad.replace('ü','u') 70 | 71 | if 'ö' in ad: 72 | ad = ad.replace('ö','o') 73 | 74 | if 'ö' in sad: 75 | sad = sad.replace('ö','o') 76 | 77 | if 'ı' in ad: 78 | ad = ad.replace('ı','i') 79 | 80 | if 'ı' in sad: 81 | sad = sad.replace('ı','i') 82 | 83 | if 'ç' in ad: 84 | ad = ad.replace('ç','c') 85 | 86 | if 'ç' in sad: 87 | sad = sad.replace('ç','c') 88 | 89 | sans = randint(0,1) 90 | if sans == 0: 91 | person = ad + '_' + sad 92 | elif sans == 1: 93 | person = ad + '.' + sad 94 | 95 | mixed = randint(1000,9999) 96 | sans_mail = randint(0,3) 97 | if sans_mail == 0: 98 | mail = person + str(mixed) + "@gmail.com" 99 | elif sans == 1: 100 | mail = person + "@hotmail.com" 101 | elif sans == 2: 102 | mail = person + "@outlook.com" 103 | else: 104 | mail = person + "@" + ad + sad +".com" 105 | 106 | mail = "test@mail.com" 107 | browser.find_element_by_name("emailAddress").send_keys(str(mail)) 108 | sleep(1) 109 | browser.find_element_by_xpath(".//*[contains(text(), 'Gönder')]").click() 110 | sleep(3) 111 | browser.close() 112 | 113 | sec() -------------------------------------------------------------------------------- /py3_nmap_autoscan.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/python3 2 | # EmreOvunc 3 | 4 | from os import system 5 | from socket import inet_aton 6 | from datetime import datetime as dt 7 | 8 | ipList = open('ipList.txt', 'r') 9 | 10 | try: 11 | system('rm script_logs.txt 2>/dev/null') 12 | except: 13 | pass 14 | 15 | system('touch script_logs.txt') 16 | logger = open('script_logs.txt', 'w') 17 | 18 | IPs = ipList.readlines() 19 | flag = 1 20 | 21 | forbiddenIP = ['1.1.1.1', '10.0.0.0/24'] 22 | 23 | for IP in IPs: 24 | scanIP = IP.strip() 25 | try: 26 | network = scanIP.split('/')[0] 27 | subnet = scanIP.split('/')[1] 28 | except: 29 | pass 30 | 31 | try: 32 | inet_aton(network) 33 | except: 34 | time = dt.now().strftime('%Y-%m-%d %H:%M:%S') 35 | err1 ='[-]' + str(time) + '|' + str(scanIP) + ' taranamıyor !' 36 | logger.write(str(err1) + '\n') 37 | flag = 0 38 | 39 | if flag != 0: 40 | for ip in forbiddenIP: 41 | if len(ip.split('/')) > 1: 42 | nw = ip.split('.')[0] + "." + ip.split('.')[1] + "." + ip.split('.')[2] + "." 43 | for lastpart in range(0, 256): 44 | checkip = nw + str(lastpart) 45 | if len(scanIP.split('/')) > 1: 46 | if ip == scanIP: 47 | time = dt.now().strftime('%Y-%m-%d %H:%M:%S') 48 | err2 = '[!]' + str(time) + '|' + str(scanIP) + ' yasaklı ! [' + ip + ']' 49 | logger.write(str(err2) + '\n') 50 | flag = 0 51 | break 52 | 53 | else: 54 | if checkip == scanIP: 55 | time = dt.now().strftime('%Y-%m-%d %H:%M:%S') 56 | err3 = '[!]' + str(time) + '|' + str(scanIP) + ' yasaklı ! [' + ip + ']' 57 | logger.write(str(err3) + '\n') 58 | flag = 0 59 | break 60 | else: 61 | if ip == scanIP: 62 | time = dt.now().strftime('%Y-%m-%d %H:%M:%S') 63 | err4 = '[!]' + str(time) + '|' + str(scanIP) + ' yasaklı ! [' + ip + ']' 64 | logger.write(str(err4) + '\n') 65 | flag = 0 66 | break 67 | 68 | if flag == 0: 69 | pass 70 | 71 | else: 72 | time = dt.now().strftime('%Y-%m-%d %H:%M:%S') 73 | status1 = '[?]' + str(time) + ' | ' + str(scanIP) + ' tarama başlatıldı !' 74 | logger.write(str(status1) + '\n') 75 | system('nmap -sV ' + str(scanIP) + ' --open') 76 | time = dt.now().strftime('%Y-%m-%d %H:%M:%S') 77 | status2 = '[+]' + str(time) + '|' + str(scanIP) + ' tarama bitti !' 78 | logger.write(str(status2) + '\n') 79 | 80 | flag = 1 81 | 82 | ipList.close() 83 | logger.close() 84 | -------------------------------------------------------------------------------- /py3_sm.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/python3 2 | # EmreOvunc 3 | # info@emreovunc.com 4 | 5 | from pandas import ExcelFile 6 | from argparse import ArgumentParser 7 | from os import system, path 8 | from hashlib import md5 9 | from datetime import datetime as dt 10 | 11 | parser = ArgumentParser() 12 | parser.add_argument('--file', help='select a excel file') 13 | data_parser = parser.add_argument_group('[Data Manipulation]') 14 | data_parser.add_argument('--sheet-name', help='give a sheet name') 15 | data_parser.add_argument('--column', help='give a column name') 16 | args = parser.parse_args() 17 | 18 | curr_time = dt.now().strftime("%H-%M-%S") 19 | 20 | if path.isdir(args.sheet_name): 21 | dirc = args.sheet_name + curr_time 22 | else: 23 | dirc = args.sheet_name 24 | 25 | viewed = open('who_viewed.txt','r') 26 | viewed_line = viewed.readlines() 27 | 28 | clicked = open('who_clicked.txt','r') 29 | clicked_line = clicked.readlines() 30 | 31 | system('mkdir ' + dirc) 32 | 33 | system('touch ' + dirc +'/user_md5s.txt') 34 | usermd5s = open(dirc +"/user_md5s.txt","a") 35 | 36 | system('touch ' + dirc +'/statistics.txt') 37 | statistics = open(dirc +"/statistics.txt","a") 38 | 39 | system('touch ' + dirc +'/user_clicked.txt') 40 | userclicked = open(dirc +"/user_clicked.txt","a") 41 | 42 | system('touch ' + dirc +'/user_viewed.txt') 43 | userviewed = open(dirc +"/user_viewed.txt","a") 44 | 45 | system('touch ' + dirc +'/mail_clicked.txt') 46 | mailclick = open(dirc +"/mail_clicked.txt","a") 47 | 48 | system('touch ' + dirc +'/mail_only_viewed.txt') 49 | mailview = open(dirc +"/mail_only_viewed.txt","a") 50 | 51 | system('touch ' + dirc +'/mail_no_action.txt') 52 | mailnoaction = open(dirc +"/mail_no_action.txt","a") 53 | 54 | clickedarr = [] 55 | viewedarr = [] 56 | fixedarr = [] 57 | mailviewed = [] 58 | mailclicked = [] 59 | 60 | total_clicked = 0 61 | total_notclicked = 0 62 | total_viewed = 0 63 | total_user = 0 64 | total_noaction = 0 65 | total_error = 0 66 | 67 | for lines in clicked_line: 68 | md5sums = lines.strip().split(" ")[3] 69 | if len(md5sums) == 32: 70 | clickedarr.append(md5sums) 71 | 72 | for lines in viewed_line: 73 | md5sums = lines.strip().split(" ")[3] 74 | if len(md5sums) == 32: 75 | viewedarr.append(md5sums) 76 | 77 | if args.file != '' or args.file != False: 78 | excel = ExcelFile(args.file) 79 | if args.sheet_name != "" and args.sheet_name != None: 80 | sheet = excel.parse(args.sheet_name) 81 | if args.column != "" and args.column != None: 82 | for data in sheet[args.column]: 83 | try: 84 | md5s = md5(data.encode()).hexdigest() 85 | usermd5s.write(md5s+'\n') 86 | total_user += 1 87 | except: 88 | total_error += 1 89 | flag_click = 0 90 | for whoclickedsum in clickedarr: 91 | if str(md5s) == str(whoclickedsum): 92 | flag_click += 1 93 | break 94 | else: 95 | pass 96 | if flag_click == 0: 97 | userclicked.write('-\n') 98 | total_notclicked += 1 99 | else: 100 | userclicked.write('+\n') 101 | mailclicked.append(data) 102 | total_clicked += 1 103 | flag_viewed = 0 104 | for whoviewedsum in viewedarr: 105 | if str(md5s) == str(whoviewedsum): 106 | flag_viewed += 1 107 | break 108 | else: 109 | pass 110 | if flag_viewed == 0: 111 | fixedarr.append('-') 112 | else: 113 | fixedarr.append('+') 114 | if flag_click == 0 and flag_viewed != 0: 115 | mailview.write(str(data) + '\n') 116 | elif flag_click == 0 and flag_viewed == 0: 117 | mailnoaction.write(str(data) + '\n') 118 | else: 119 | print('[-]Please, use --column [COLUMN_NAME] to give a column name!') 120 | else: 121 | print('[-]Please, use --sheet-name [SHEET_NAME] to give a sheet name!') 122 | else: 123 | print('[-]Please, use --file [FILENAME] to select an excel file!') 124 | exit() 125 | 126 | viewed.close() 127 | clicked.close() 128 | usermd5s.close() 129 | userclicked.close() 130 | 131 | user_click = open(dirc +"/user_clicked.txt","r") 132 | click_line = user_click.readlines() 133 | 134 | for ind in range(0, len(fixedarr)): 135 | if str(fixedarr[ind]).strip() == "+" and str(click_line[ind]).strip() == "-": 136 | userviewed.write('+\n') 137 | total_viewed += 1 138 | elif str(fixedarr[ind]).strip() == "+" and str(click_line[ind]).strip() == "+": 139 | userviewed.write('+\n') 140 | total_viewed += 1 141 | elif str(fixedarr[ind]).strip() == "-" and str(click_line[ind]).strip() == "+": 142 | userviewed.write('+\n') 143 | total_viewed += 1 144 | else: 145 | userviewed.write('-\n') 146 | total_noaction += 1 147 | 148 | userviewed.close() 149 | user_click.close() 150 | 151 | statistics.write('Total Clicked : ' + str(total_clicked) + '\n') 152 | statistics.write('Total NOT Clicked : ' + str(total_notclicked) + '\n') 153 | statistics.write('Total Viewed : ' + str(total_viewed) + '\n') 154 | statistics.write('Total No Action : ' + str(total_noaction - total_error) + '\n') 155 | statistics.write('Total User : ' + str(total_user) + '\n') 156 | statistics.write('Only Viewed : ' + str(total_viewed - total_clicked) + '\n') 157 | statistics.write('Total Error : ' + str(total_error) + '\n') 158 | 159 | print('Total Clicked : ', total_clicked) 160 | print('Total NOT Clicked : ', total_notclicked) 161 | print('Total Viewed : ', total_viewed) 162 | print('Total No Action : ', total_noaction - total_error) 163 | print('Total User : ', total_user) 164 | print('Only Viewed : ', total_viewed - total_clicked) 165 | print('Total Error : ', total_error) 166 | 167 | statistics.close() 168 | 169 | for mails in mailclicked: 170 | mailclick.write(mails + "\n") 171 | mailclick.close() 172 | mailnoaction.close() 173 | mailview.close() 174 | -------------------------------------------------------------------------------- /raspi-enc.sh: -------------------------------------------------------------------------------- 1 | #mount.sh 2 | #!/bin/bash 3 | cryptsetup luksOpen /dev/encdisk001 encpart 4 | mount -t ext4 /dev/mapper/encpart /emocan 5 | iptables -A INPUT -i wlan0 -p tcp --dport 21 -j DROP 6 | iptables -A INPUT -i wlan0 -p tcp --dport 139 -j DROP 7 | iptables -A INPUT -i wlan0 -p tcp --dport 445 -j DROP 8 | service vsftpd start 9 | service smbd start 10 | 11 | #umount.sh 12 | #!/bin/bash 13 | service vsftpd stop 14 | service smbd stop 15 | find /emocan -name $"._*" -exec rm -rf {} \; 16 | umount /emocan 17 | cryptsetup luksClose encpart 18 | 19 | #/etc/vsftpd.conf 20 | listen=YES 21 | listen_ipv6=NO 22 | anonymous_enable=NO 23 | local_enable=YES 24 | write_enable=YES 25 | anon_upload_enable=NO 26 | anon_mkdir_write_enable=NO 27 | dirmessage_enable=YES 28 | use_localtime=YES 29 | xferlog_enable=YES 30 | connect_from_port_20=YES 31 | chroot_local_user=YES 32 | local_root=/emocan 33 | allow_writeable_chroot=YES 34 | secure_chroot_dir=/var/run/vsftpd/empty 35 | pam_service_name=vsftpd 36 | rsa_cert_file=/etc/ssl/certs/ssl-cert-snakeoil.pem 37 | rsa_private_key_file=/etc/ssl/private/ssl-cert-snakeoil.key 38 | ssl_enable=NO 39 | utf8_filesystem=YES 40 | 41 | #/etc/samba/smb.conf 42 | [shared] 43 | comment = SharedArea 44 | browsable = yes 45 | read only = no 46 | create mask = 0760 47 | directory mask = 0760 48 | valid users = pi 49 | guest ok = no 50 | path = /emocan 51 | -------------------------------------------------------------------------------- /samba_iptables.sh: -------------------------------------------------------------------------------- 1 | sudo iptables -F 2 | sudo iptables -P INPUT DROP 3 | sudo iptables -P OUTPUT DROP 4 | sudo iptables -P FORWARD DROP 5 | sudo iptables -A INPUT -p udp -s 192.168.1.0/24 --dport 137 -j ACCEPT 6 | sudo iptables -A INPUT -p udp -s 192.168.1.0/24 --dport 138 -j ACCEPT 7 | sudo iptables -A INPUT -p tcp -s 192.168.1.0/24 --dport 139 -j ACCEPT 8 | sudo iptables -A INPUT -p tcp -s 192.168.1.0/24 --dport 445 -j ACCEPT 9 | sudo iptables -A OUTPUT -d 192.168.1.0/24 -p udp --sport 137:138 -m state --state ESTABLISHED -j ACCEPT 10 | sudo iptables -A OUTPUT -d 192.168.1.0/24 -p tcp --sport 139 -m state --state ESTABLISHED -j ACCEPT 11 | sudo iptables -A OUTPUT -d 192.168.1.0/24 -p tcp --sport 445 -m state --state ESTABLISHED -j ACCEPT 12 | -------------------------------------------------------------------------------- /smb_null_session.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | live_hosts=$1 3 | scan=`nbtscan -f $live_hosts > netbios_scan.txt` 4 | for host in $(cat netbios_scan.txt|grep server|cut -d" " -f1); do 5 | echo "############" 6 | echo $host 7 | rpcclient -U "" $host -c 'getusername;srvinfo;quit' 8 | echo "############" 9 | done 10 | -------------------------------------------------------------------------------- /steam.sh: -------------------------------------------------------------------------------- 1 | optirun wine .wine/drive_c/Program\ Files\ \(x86\)/Steam/Steam.exe 2 | #wine .wine/drive_c/Program\ Files\ \(x86\)/Steam/Steam.exe 3 | -------------------------------------------------------------------------------- /tar.gz.txt: -------------------------------------------------------------------------------- 1 | tar cvjf files.tar.xz files/ 2 | tar cv files1/ files/ | gzip --best > files.tar.gz 3 | -------------------------------------------------------------------------------- /twilio-python.py: -------------------------------------------------------------------------------- 1 | from twilio.rest import TwilioRestClient 2 | 3 | account_sid = "YOUR SID" 4 | auth_token = "YOUR AUTH" 5 | 6 | client = TwilioRestClient(account_sid, auth_token) 7 | 8 | message = client.messages.create(body="Server is running...", 9 | to="YOURPHONENUMBER", 10 | from_="YOURTWILIONUMBER") 11 | 12 | print(message.sid) 13 | -------------------------------------------------------------------------------- /ubuntu_18.sh: -------------------------------------------------------------------------------- 1 | #nano /etc/netplan/50-cloud-init.yaml 2 | #netplan apply 3 | network: 4 | ethernets: 5 | enp0s3: 6 | addresses: [192.168.1.2/24] 7 | gateway4: 192.168.1.1 8 | nameservers: 9 | addresses: [1.1.1.1,8.8.4.4] 10 | dhcp4: no 11 | dhcp6: no 12 | version: 2 13 | -------------------------------------------------------------------------------- /ubuntu_progs: -------------------------------------------------------------------------------- 1 | apt install aptitude python-pip python3-pip git net-tools python-scapy -y 2 | apt install leafpad apache2 kdenlive iptables-persistent python3 tcptrack -y 3 | apt install krita filezilla nmap macchanger rsync gparted fcrackzip aircrack-ng -y 4 | apt install python3-scapy apktool adb androguard audacity wireshark synaptic -y 5 | apt install network-manager-ssh network-manager-openvpn network-manager-pptp -y 6 | apt install speedometer exfat-utils exfat-fuse cups cifs-utils tmux foremost -y 7 | apt install aircrack-ng whatweb virtualbox virtualbox-ext-pack sqlmap samba -y 8 | add-apt-repository ppa:teejee2008/ppa 9 | apt update -y && apt install conky-manager -y 10 | add-apt-repository --remove ppa:teejee2008/ppa 11 | apt install unity-tweak-tool iodine golang -y 12 | -------------------------------------------------------------------------------- /vpn_gw/auth.txt: -------------------------------------------------------------------------------- 1 | username 2 | password 3 | -------------------------------------------------------------------------------- /vpn_gw/internet.sh: -------------------------------------------------------------------------------- 1 | sudo iptables -t nat -F 2 | sudo iptables -F 3 | sudo sysctl net.ipv4.ip_forward=1 4 | sudo rm -rf /etc/resolv.conf 5 | sudo echo "nameserver 1.1.1.1" > resolv.conf 6 | sudo echo "nameserver 8.8.8.8" >> resolv.conf 7 | sudo echo "nameserver 208.67.222.222" >> resolv.conf 8 | sudo echo "nameserver 8.8.4.4" >> resolv.conf 9 | sudo echo "nameserver 208.67.222.220" >> resolv.conf 10 | sudo mv resolv.conf /etc/resolv.conf 11 | sudo iptables -A FORWARD --in-interface eth0 -j ACCEPT 12 | sudo iptables -t nat -A POSTROUTING -o wlan1 -j MASQUERADE 13 | sudo iptables -A INPUT -i wlan1 -p tcp --dport 443 -j DROP 14 | sudo iptables -A INPUT -i wlan1 -p tcp --dport 80 -j DROP 15 | sudo iptables -A INPUT -i wlan1 -p tcp --dport 22 -j DROP 16 | sudo iptables -A INPUT -i wlan1 -p udp --dport 53 -j DROP 17 | -------------------------------------------------------------------------------- /vpn_gw/openvpn.sh: -------------------------------------------------------------------------------- 1 | sudo openvpn --config /home/pi/client.ovpn --auth-user-pass /home/pi/auth.txt & 2 | -------------------------------------------------------------------------------- /vpn_gw/vpnBridge.py: -------------------------------------------------------------------------------- 1 | import os 2 | import subprocess 3 | vpn_Proc = subprocess.Popen(['ifconfig | grep tun'], stdout=subprocess.PIPE, shell=True) 4 | (out, err) = vpn_Proc.communicate() 5 | if out.decode() != "": 6 | pass 7 | else: 8 | os.system('sudo pkill -9 openvpn') 9 | os.system('bash /home/pi/openvpn.sh') 10 | -------------------------------------------------------------------------------- /wifi-txpower.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | sudo ifup wlan1 3 | sudo ifconfig wlan1 down 4 | sudo iw reg set US 5 | sudo iwconfig wlan1 txpower 27 6 | sudo ifconfig wlan1 up 7 | sudo iwconfig 8 | 9 | ''' 10 | apt-get install python-m2crypto libgcrypt11-dev libnl-3-dev libnl-genl-3-dev 11 | curl -sSL https://www.kernel.org/pub/software/network/crda/crda-3.18.tar.xz | tar xJf - 12 | curl -sSL https://www.kernel.org/pub/software/network/wireless-regdb/wireless-regdb-2016.06.10.tar.xz | tar xJf - 13 | cd wireless-regdb-2016.06.10 14 | sed -i '/country CN/{n;s/20/30/}' db.txt 15 | make 16 | mv /lib/crda/regulatory.bin /lib/crda/regulatory.bin.old 17 | cp regulatory.bin /lib/crda/ 18 | chmod +x /lib/crda/regulatory.bin 19 | cp root.key.pub.pem ../crda-3.18/pubkeys/ 20 | cp /lib/crda/pubkeys/*.pem ../crda-3.18/pubkeys/ 21 | cd ../crda-3.18 22 | sed -i 's/\/usr//' Makefile 23 | sed -i 's/-Werror//' Makefile 24 | make 25 | make install 26 | reboot 27 | ''' -------------------------------------------------------------------------------- /wifi_check.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | interface="wlp3s0" 4 | wlan_check=`ifconfig $interface | grep inet\ addr | cut -d":" -f2 | cut -d" " -f1` 5 | 6 | if [[ $wlan_check =~ ^([0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}) ]]; then 7 | exit 8 | else 9 | /sbin/ifdown $interface && /sbin/ifup $interface 10 | fi 11 | -------------------------------------------------------------------------------- /word-count.py: -------------------------------------------------------------------------------- 1 | file = open('count', 'r') 2 | words = file.readlines() 3 | worders = [] 4 | total = 0 5 | flag = 0 6 | for word in words: 7 | for worder in range(0, len(worders)): 8 | if worders[worder][0].strip() == word.strip(): 9 | worders[worder] = (worders[worder][0].strip(), int(worders[worder][1]) + 1) 10 | flag = 1 11 | break 12 | else: 13 | flag = 0 14 | if flag == 0: 15 | worders.append((word, 1)) 16 | 17 | for words in worders: 18 | print(words[0].strip() + ' | ' + str(words[1])) 19 | total += int(words[1]) 20 | 21 | print('\nTotal: ', total) 22 | 23 | --------------------------------------------------------------------------------