This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class L2Sniffer(threading.Thread): | |
| def __init__(self, iface, src, dst, no_filter=False): | |
| super(L2Sniffer, self).__init__() | |
| self.daemon = True | |
| self.no_filter = no_filter | |
| self.iface = iface | |
| self.src = src | |
| self.dst = dst | |
| self.started = threading.Event() | |
| self.started.clear() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| send(IP(dst=8.8.8.8) / TCP(dport=53, flags='S', seq=0)) | |
| offending_payload = str(DNS(rd=1, qd=DNSQR(qname="dl.dropbox.com"))) | |
| offending_payload = struct.pack("!H", len(offending_payload)) + offending_payload | |
| send(IP(dst=8.8.8.8) / TCP(dport=53, flags='A', seq=1, ack=100) / Raw(offending_payload)) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function consolidate() { | |
| var sheets = SpreadsheetApp.getActiveSpreadsheet().getSheets(); | |
| var routers = {}; | |
| var routerIps = []; | |
| for (var i = 0; i < sheets.length; i++) { | |
| var sheet = sheets[i]; | |
| if (0 == sheet.getName().indexOf('__')) { | |
| continue; | |
| } | |
| var values = sheet.getDataRange().getValues(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # source: http://blog.yegle.net/2012/05/01/email-and-tls/ | |
| # 从墙外向墙内SMTP服务器发起telnet连接 | |
| $ telnet mail.kingsoft.com 25 | |
| Trying 219.141.176.248... | |
| Connected to telecom.mail.kingsoft.com. | |
| Escape character is '^]'. | |
| 220 mail.kingsoft.com ESMTP | |
| EHLO yegle.net | |
| 250-mail.kingsoft.com | |
| 250-8BITMIME |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| int Apple80211Associate(struct Apple80211 *handle, CFDictionaryRef *network, CFString *wpa_key); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import subprocess | |
| import shlex | |
| import atexit | |
| import signal | |
| import dpkt | |
| import contextlib | |
| import binascii | |
| from scapy.all import * | |
| LOGGER = logging.getLogger() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <iostream> | |
| #include <cstdlib> | |
| #include <netinet/in.h> | |
| extern "C" { | |
| #include <linux/netfilter.h> | |
| #include <libnetfilter_queue/libnetfilter_queue.h> | |
| } | |
| using namespace std; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ('199.59.150.45', ['image-proxy-origin.twimg.com', u'image-proxy-origin.twimg.com']) | |
| ('199.59.149.90', ['pay.twitter.com', u'pay.twitter.com']) | |
| ('199.59.149.200', ['*.twitter.com', 'twitter.com', u'*.twitter.com']) | |
| ('199.59.148.139', ['userstream.twitter.com', u'userstream.twitter.com']) | |
| ('199.59.148.22', ['*.twitter.com', 'twitter.com', u'*.twitter.com']) | |
| ('199.59.148.145', ['partnerstream1.twitter.com', 'partnerstream2.twitter.com', 'stream.twitter.com', u'stream.twitter.com']) | |
| ('199.59.149.232', ['api.twitter.com', u'api.twitter.com']) | |
| ('199.59.148.91', ['ms1.twitter.com', 'ms2.twitter.com', 'ms3.twitter.com', 'ms4.twitter.com', 'ms5.twitter.com', u'ms1.twitter.com']) | |
| ('199.59.150.46', ['syndication.twitter.com', 'cdn.syndication.twimg.com', 'cdn.syndication.twitter.com', 'syndication-o.twitter.com', 'syndication.twimg.com', u'syndication.twitter.com']) | |
| ('199.59.149.135', ['partnerdata.twttr.com', u'partnerdata.twttr.com']) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| resolver 8.8.8.8; | |
| location /video/ { | |
| if ($request_uri ~ "^/video/(.+?)/.+") { | |
| set $upstream_host $1.googlevideo.com; | |
| add_header Content-Disposition "attachment; filename=video.mp4;"; | |
| } | |
| rewrite /video/.+?/(.+)$ /$1 break; | |
| proxy_buffering off; | |
| proxy_pass https://$upstream_host; | |
| proxy_set_header Host $upstream_host; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # ASIA | |
| _ = '173.194.36.%s' # del 印度 新德里 | |
| SG3 = '173.194.38.%s' # 新加坡 | |
| TW3 = '173.194.72.%s' | |
| SG4 = '173.194.117.%s' | |
| JP2 = '173.194.120.%s' | |
| _ = '173.194.123.%s' | |
| JP1 = '173.194.126.%s' | |
| HK1 = '173.194.127.%s' | |
| TW1 = '74.125.23.%s' |