This file contains 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 gmpy2 import mpz, invert | |
import hashlib | |
def hash(data): | |
return hashlib.sha1(data).hexdigest() | |
def recover_k(p, h1, h2, r, s1, s2): | |
h = int(h1, 16) - int(h2, 16) | |
s = s1 - s2 | |
k = ((h * invert(s, p-1)) % (p - 1)) |
This file contains 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
5178416544031690165845022236333913379644656355100034764044486334987809565683609021702601575779688934586761302716638309236782067258376606092039939961816977 |
This file contains 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
def KSA(key): | |
key_len = len(key) | |
S = range(256) | |
j = 0 | |
for i in xrange(256): | |
j = (j + S[i] + key[i % key_len]) % 256 | |
S[i], S[j] = S[j], S[i] |
This file contains 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
def mitm(): | |
A = {} | |
k1 = '13abcf8a0d6cbb61fd3f7bc3a4ee'.decode("hex") | |
for i in range(0xff): | |
for j in range(0xff): | |
key1 = k1 + chr(i) + chr(j) | |
A.update({enc(key1, "Somehow I lost 2 bytes of each key"): key1}) | |
k2 = 'a6d43c9d371f67a984acf3c94a91'.decode('hex') | |
for i in range(0xff): |
This file contains 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 socket | |
import sys | |
HOST = '52.198.217.117' | |
PORT = 6666 | |
p = socket.socket(socket.AF_INET, socket.SOCK_STREAM) | |
p.connect((HOST, PORT)) | |
evil = [] |
This file contains 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
#!/usr/bin/env ruby | |
require 'openssl' | |
require 'timeout' | |
$stdout.sync = true | |
Dir.chdir(File.dirname(__FILE__)) | |
class String | |
def enhex | |
self.unpack('H*')[0] |
This file contains 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
msg = "3ed2e01c1d1248125c67ac637384a22d997d9369c74c82abba4cc3b1bfc65f026c957ff0feef61b161cfe3373c2d9b905639aa3688659566d9acc93bb72080f7e5ebd643808a0e50e1fc3d16246afcf688dfedf02ad4ae84fd92c5c53bbd98f08b21d838a3261874c4ee3ce8fbcb96628d5706499dd985ec0c13573eeee03766f7010a867edfed92c33233b17a9730eb4a82a6db51fa6124bfc48ef99d669e21740d12656f597e691bbcbaa67abe1a09f02afc37140b167533c7536ab2ecd4ed37572fc9154d23aa7d8c92b84b774702632ed2737a569e4dfbe01338fcbb2a77ddd6990ce169bb4f48e1ca96d30eced23b6fe5b875ca6481056848be0fbc26bcbffdfe966da4221103408f459ec1ef12c72068bc1b96df045d3fa12cc2a9dcd162ffdf876b3bc3a3ed2373559bcbe3f470a8c695bf54796bfe471cd34b463e9876212df912deef882b657954d7dada47" | |
bs = 32 | |
block = [] | |
for i in range(0, len(msg), bs): | |
block.append(msg[i:i+bs]) | |
bytes =[ | |
["00", "d9", "ef", "07", "07", "d8", "07", "3b", "6f", "32", "60", "63", "72", "ce", "b3", "67"], | |
["6f", "3e", "a4", "c9", "db", "e5", "2c", "dc", "cb", "ec", "23", "aa", "14", "bd", "13", "a9"], |
This file contains 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
// | |
// This file was generated by the Retargetable Decompiler | |
// Website: https://retdec.com | |
// Copyright (c) 2016 Retargetable Decompiler <info@retdec.com> | |
// | |
#include <stdbool.h> | |
#include <stdint.h> | |
#include <stdio.h> | |
#include <stdlib.h> |
This file contains 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 requests | |
url = "http://128.199.226.92:31333/login/" | |
wanted = '{"user":"admin"}' | |
payload = "" | |
sig = "Expecting property name" | |
for i in range(15): | |
for j in range(0xff): | |
r = requests.get(url + payload.encode("hex") + "%02x" % j + (30-2*len(payload)) * "a") |
This file contains 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 signal, os,sys | |
def handler(signum, frame): | |
print 'Timeout' | |
sys.exit(-1) | |
# Set the signal handler and a 5-second alarm | |
signal.signal(signal.SIGALRM, handler) | |
signal.alarm(5) |
OlderNewer