Commit 728ff306 authored by Dominik Rosiek's avatar Dominik Rosiek

flags init

parent d74fbd2d
taiga_46:
- depend
- Kodowania base64, rot13, rot47 w jednym skrypcie
taiga_48:
- supereasy
- Zwykłe przekierowania w JS
from sys import argv
from _codecs import encode
from base64 import b64encode, b64decode
import sys
def a(string):
return encode(string, 'rot_13')
def c(s):
x = []
for i in xrange(len(s)):
j = ord(s[i])
if j >= 33 and j <= 126:
x.append(chr(33 + ((j + 14) % 94)))
else:
x.append(s[i])
return ''.join(x)
def b(string):
return b64encode(string)
def d(string):
return b64decode(string)
if len(argv) < 3:
print """Usage:
python taiga_46.py <type> <text>
type:
- b base64
- d base64_decode (for testing)
- a rot13
- c rot47
for example: python taiga46.py bbac test return rot47(rot13(base64(base64("test"))))
"""
exit(0)
text = " ".join(argv[2:])
result = text
for letter in argv[1]:
if letter == "a":
result = a(result)
elif letter == "b":
result = b(result)
elif letter == "c":
result = c(result)
elif letter == "d":
result = d(result)
print result
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Close all</title>
<script>
document.location.href="//google.pl";
flag = "AGH_{JuStGoogleIt}"
</script>
</head>
<body>
</body>
</html>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment