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 -*- | |
from socket import * | |
if __name__ == "__main__": | |
s = socket(AF_INET, SOCK_STREAM) | |
s.connect(('127.0.0.1', 9000)) | |
s.send('Sock Client Send\n') | |
s.close() |
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 -*- | |
from socket import * | |
if __name__ == "__main__": | |
s = socket(AF_INET, SOCK_STREAM) | |
s.bind(("127.0.0.1", 9000)) | |
s.listen(1) | |
conn, addr = s.accept() | |
recv_data = conn.recv(1024) | |
print 'Received Data : ' + recv_data |
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 -*- | |
import hashlib | |
if __name__ == "__main__": | |
m = hashlib.md5("hello".encode("UTF-8")) | |
data = (m.hexdigest()) | |
print data |
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 itertools import product | |
chars = '0123456789QWERTYUIOPASDFGHJKLZXCVBNMqwertyuiopasdfghjklzxcvbnm' # Chars Dictionary | |
for length in range(1, 5): # length 1 to 4 | |
to_attempt = product(chars, repeat=length) | |
for attempt in to_attempt: | |
brute = ''.join(attempt) | |
print brute |
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 -*- | |
import sys, collections | |
if __name__ == "__main__": | |
f = open(sys.argv[1], "rb") | |
text = f.read() | |
count = collections.Counter(text) | |
print count |
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 -*- | |
import sys | |
def decode(alphabet,ciphertext,key): | |
dic={} | |
for i in range(0,len(key)): | |
dic[key[i]]=alphabet[i] | |
plaintext="" | |
for l in ciphertext: |
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 -*- | |
if __name__ == "__main__": | |
data = "test" | |
encode_string = data.encode('base64') # Base64 Encoding | |
print "encode string :", encode_string | |
decode_string = encode_string.decode('base64') # Base64 Decoding | |
print "decode string :", decode_string |
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 -*- | |
from pytesser import * | |
if __name__ == "__main__": | |
print image_file_to_string("fonts_test.png") |
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
#define _WIN32_WINNT 0x0501 | |
#include <windows.h> | |
#include <stdio.h> | |
BOOL anti_debug() | |
{ | |
return IsDebuggerPresent(); | |
} |
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
#define _WIN32_WINNT 0x0501 | |
#include <windows.h> | |
#include <stdio.h> | |
BOOL anti_debug() | |
{ | |
BOOL result; | |
CheckRemoteDebuggerPresent(GetCurrentProcess(), &result); | |
return result; | |
} |
OlderNewer