Home Auto Base64 decode script
Post
Cancel

Auto Base64 decode script

Here’s a really hack-y method of decoding multiple encoded Base64 strings. Useful for some very basic CTFs.

1
2
3
4
5
6
7
8
9
10
11
12
#!/usr/bin/env python3

import base64
from itertools import repeat

base64_string = input("Enter Base64 String: ")
decode_times = int(input("Enter number of times to decode: "))

for x in repeat(None, decode_times):
    base64_string = base64.b64decode(base64_string)

print (base64_string)

Your mileage may vary.

This post is licensed under CC BY 4.0 by the author.