feat(wpcarro/scratch): Upload my solutions to picoCTF challenges
Just getting my feet wet... Change-Id: Ia1db0c69fe7d5ea5cb5585853d0688ef97f2680a Reviewed-on: https://cl.tvl.fyi/c/depot/+/4739 Reviewed-by: wpcarro <wpcarro@gmail.com> Autosubmit: wpcarro <wpcarro@gmail.com> Tested-by: BuildkiteCI
This commit is contained in:
parent
d3c20a44d3
commit
5c0ec720af
9 changed files with 107 additions and 0 deletions
11
users/wpcarro/scratch/picoctf/challenge_144.py
Normal file
11
users/wpcarro/scratch/picoctf/challenge_144.py
Normal file
|
@ -0,0 +1,11 @@
|
|||
def rotate_alpha(x, n):
|
||||
def rotate_char(c, n):
|
||||
offset = 'A' if c.isupper() else 'a'
|
||||
return chr((ord(c) - ord(offset) + n) % 26 + ord(offset))
|
||||
return "".join([rotate_char(c, n) if c.isalpha() else c for c in x])
|
||||
|
||||
xs = [
|
||||
"cvpbPGS{arkg_gvzr_V'yy_gel_2_ebhaqf_bs_ebg13_Ncualgvd}",
|
||||
]
|
||||
for x in xs:
|
||||
print(rotate_alpha(x, 13))
|
Loading…
Add table
Add a link
Reference in a new issue