1. 程式人生 > >南京郵電大學網路攻防訓練平臺-密碼學-mixed_base64

南京郵電大學網路攻防訓練平臺-密碼學-mixed_base64

在這裡插入圖片描述

import requests
import base64

url='http://ctf.nuptzj.cn/static/uploads/3e5c0c7045f2a81363a45d97d69911e3/code.txt'
def download(url):
	return requests.get(url).text
p=download(url)
n=''
while True:
	try:
		print "16"
		n=base64.b16decode(p)
		print "[+] %s" % (n)
		p=n
		continue
	except:
		pass

	try:
		print
"32" n=base64.b32decode(p) print "[+] %s" % (n) p=n continue except: pass try: print "64" n=base64.b64decode(p) print "[+] %s" % (n) p=n continue except: pass break print n

對python程式設計理解更深刻了,加油