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
_ = ( | |
255, | |
lambda | |
V ,B,c | |
:c and Y(V*V+B,B, c | |
-1)if(abs(V)<6)else | |
( 2+c-4*abs(V)**-0.4)/i | |
) ;v, x=1500,1000;C=range(v*x | |
);import struct;P=struct.pack;M,\ | |
j ='<QIIHHHH',open('M.bmp','wb').write |
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
from socket import * | |
import os | |
import struct | |
ADDR = ('59.78.41.61',5006)#你的IP,端口随意 | |
BUFSIZE = 1024 | |
filename = 'sort-collection.py'#文件名,把这个文件跟要传的文件放一个目录里 | |
FILEINFO_SIZE=struct.calcsize('128s32sI8s') | |
sendSock = socket(AF_INET,SOCK_STREAM) |
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
# -*- coding: utf-8 -*- | |
""" | |
legit.scm | |
~~~~~~~~~ | |
This module provides the main interface to Git. | |
""" | |
import os |
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
from pcapy import open_offline | |
def filter_HTTPGET(packet): | |
if packet[0x33] == '\x06' and packet[0x52:0x56] == "GET ":#tcp and tcp[20:4] = 0x47455420 | |
return True | |
return False | |
def get_source_IP(packet): | |
#return '.'.join(str(ord(i)) for i in packet[0x36:0x3A]) | |
return tuple(ord(i) for i in packet[0x36:0x3A]) |
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 os | |
import re | |
import socket | |
import struct | |
def dns_resolve(host, dnsserver): | |
assert isinstance(host, basestring) and isinstance(dnsserver, basestring) | |
index = os.urandom(2) | |
hoststr = ''.join(chr(len(x))+x for x in host.split('.')) | |
data = '%s\x01\x00\x00\x01\x00\x00\x00\x00\x00\x00%s\x00\x00\x01\x00\x01' % (index, hoststr) |
NewerOlder