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
| #!/usr/bin/python | |
| import base64 | |
| a = "fx1uagMGQQMWOWhyFBxnBUdzN35NPWYHUBQHRmozeEY=" | |
| pw = "My_S3cr3t_P@$$W0rD\0" | |
| out = "" | |
| msg = base64.b64decode(a) | |
| print len(msg) |
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 random import randint, choice | |
| from string import ascii_uppercase | |
| from hashlib import md5 | |
| from secret import msg, key | |
| assert (len(key) == 5) and key.isalpha() and key.isupper() | |
| # "msg" is a meaningful English sentence. | |
| assert all(x.isalpha() or x.isspace() for x in msg) | |
| assert "SharifCTF" in msg |
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 random import randint, choice | |
| from string import ascii_uppercase | |
| from hashlib import md5 | |
| # from secret import msg, key | |
| # assert (len(key) == 5) and key.isalpha() and key.isupper() | |
| # "msg" is a meaningful English sentence. | |
| # assert all(x.isalpha() or x.isspace() for x in msg) | |
| # assert "SharifCTF" in msg |
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
| #!/usr/bin/python | |
| import pwn | |
| import sys | |
| def constructPayload(instr): | |
| cPlLen = len(instr) | |
| cPlTotal = instr + "+" * (99 - cPlLen) | |
| return cPlTotal |
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
| #!/usr/bin/python | |
| import angr | |
| import simuvex | |
| class hooked_ptrace(simuvex.SimProcedure): | |
| def run(self,a,b,c,d,e): | |
| return self.state.se.Extract(31,0,e) | |
| p = angr.Project('yolomolo_patch2') |
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
| #!/usr/bin/python | |
| print "1" | |
| print "test" | |
| print "test" | |
| print "123" | |
| print "456" | |
| print "3" | |
| print "test" | |
| print "test" |
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 angr | |
| p = angr.Project('FUck_binary') | |
| pg = p.factory.path_group() | |
| pg.explore(find=lambda p: "Your flag is " in p.state.posix.dumps(1)) | |
| s = pg.found[0].state | |
| f = open("fuck","wb") | |
| f.write(s.posix.dumps(0)) |
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
| #!/usr/bin/python | |
| import pwn | |
| import copy | |
| d = open("data.bin") | |
| data = d.read() | |
| d.close() | |
| for i in range(0,len(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
| #!/usr/bin/python | |
| import pwn | |
| # print "\xE6\xD9\xF6\x38\x2A\x02\xFD\x3A\xC3" | |
| p = pwn.remote("challenges.hackover.h4q.it",4747) | |
| p.send("\xE6\xD9\xF6\x38\x2A\x02\xFD\x3A\xC3") | |
| print p.recv() |
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
| #!/usr/bin/env python3 | |
| import os, binascii, struct | |
| import socket | |
| from Crypto.Cipher import AES | |
| import sys | |
| s = socket.socket(socket.AF_INET,socket.SOCK_STREAM) | |
| s.connect( ("104.198.243.170",2501) ) |