hva314 / WhiteHat_Challenge_3

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

WhiteHat_Challenge_3

Cryto003

=]] :') :0 =) _._! :'( ;]   =) :~) ;]   -_- :)) :') ~_~   ( =]] =) -_- )   <3 :/   :')   :/ :0 ;] =]] <3 :') :))   ^_^ <3 =)) ;))   (-_-) -_-   <3 =)) -_- (-_-) :'( *_* :') =) <3 (-_-) =))   :/ ;] =]] _._! :'( <3 =) :)   =]] (-_-) *_* :0 ;] =) <3 =) <3 (-_-) =)) :/ .   =) :~) ;] :'( ;]   :') :'( ;]   =) :~) :'( ;] ;]   =]] (-_-) *_* *_* (-_-) =))   =) :) :0 ;] :/   (-_-) -_-   =]] =) -_- :/ :   -.- ;] (-_-) :0 :') :'( ;)) :) ,   :') =) =) :') =]] ^_^ - ;)) ;] -_- ;] =)) =]] ;]   :') =)) ;))   *_* <3 :> ;] ;)) . 
-.- ;] (-_-) :0 :') :'( ;)) :) - :/ =) :) :)) ;]   =]] =) -_- :/   :~) :') :/   :')   =]] (-_-) _._! :0 :)) ;]   (-_-) -_-   :() _._! ;] :/ =) <3 (-_-) =)) :/   ( =) :') :/ ^_^ :/ )   <3 =))   :'( :') =)) ~_~ ;]   (-_-) -_-   =]] :') =) ;] ~_~ (-_-) :'( <3 ;] :/ .   -_- (-_-) :'(   ;] :> :') *_* :0 :)) ;] ,   ^^ ;] @@ ,   -_- (-_-) :'( ;] =)) :/ <3 =]] ,   =]] :'( :) :0 =) (-_-) ,   @@ <3 =)) :') :'( :)   (-_-) :'(   :/ (-_-) *_* ;] =) :~) <3 =)) ~_~   ;] :)) :/ ;] .   =) ;] :') *_*   =]] :') =))   ~_~ :') <3 =))   :/ (-_-) *_* ;]   :0 (-_-) <3 =)) =) :/   -_- (-_-) :'(   ;] ;) ;] :'( :)   :/ (-_-) :)) ;) ;] ;))   =) :') :/ ^_^ .   *_* (-_-) :'( ;]   :0 (-_-) <3 =)) =) :/   -_- (-_-) :'(   *_* (-_-) :'( ;]   =]] (-_-) *_* :0 :)) <3 =]] :') =) ;] ;))   =) :') :/ ^_^ :/   _._! :/ _._! :') :)) :)) :) .   =) :~) ;]   =)) ;] :> =)   =) :') :/ ^_^   <3 =))   =]] :~) :') <3 =))   =]] :') =))   @@ ;]   (-_-) :0 ;] =)) ;] ;))   (-_-) =)) :)) :)   :') -_- =) ;] :'(   :/ (-_-) *_* ;]   =) ;] :') *_*   :/ (-_-) :)) ;) ;]   :0 :'( ;] ;) <3 (-_-) _._! :/   =) :') :/ ^_^ .   =) :~) ;] =))   =) :~) ;]   ~_~ :') *_* ;]   =) <3 *_* ;]   <3 :/   (-_-) ;) ;] :'(   :/ _._! *_*   (-_-) -_-   :0 (-_-) <3 =)) =) :/   :/ :~) (-_-) ^^ :/   :) (-_-) _._!   :')   =]] =) -_-   ^^ <3 =)) ;] :'( .   -_- :') *_* (-_-) _._! :/   ;] :> :') *_* :0 :)) ;]   (-_-) -_-   :/ _._! =]] :~)   =]] =) -_-   <3 :/   ;)) ;] -_- =]] (-_-) =))   =]] =) -_-   :() _._! :') :)) :/ . 
^^ ;] :)) :)) ,   :') =) =) :') =]] ^_^ - ;)) ;] -_- ;] =)) =]] ;]   <3 :/   :') =)) (-_-) =) :~) ;] :'(   <3 =)) =) ;] :'( ;] :/ =) <3 =)) ~_~   ^_^ <3 =)) ;))   (-_-) -_-   =]] (-_-) *_* :0 ;] =) <3 =) <3 (-_-) =)) :/ .   :~) ;] :'( ;]   ;] ;) ;] :'( :)   =) ;] :') *_*   :~) :') :/   (-_-) ^^ =))   =)) ;] =) ^^ (-_-) :'( ^_^ ( (-_-) :'(   (-_-) =)) :)) :)   (-_-) =)) ;]   :~) (-_-) :/ =) )   ^^ <3 =) :~)   ;) _._! :)) =)) :') :'( :') @@ :)) ;]   :/ ;] :'( ;) <3 =]] ;] :/ .   :) (-_-) _._! :'(   =) ;] :') *_*   :~) :') :/   =) <3 *_* ;]   -_- (-_-) :'(   :0 :') =) =]] :~) <3 =)) ~_~   :) (-_-) _._! :'(   :/ ;] :'( ;) <3 =]] ;] :/   :') =)) ;))   ;)) ;] ;) ;] :)) (-_-) :0 <3 =)) ~_~   ;] :> :0 :)) (-_-) <3 =) :/   _._! :/ _._! :') :)) :)) :) .   :/ (-_-) ,   =) :~) ;] =))   (-_-) :'( ~_~ :') =)) <3 :v ;] :'( :/   =]] (-_-) =)) =)) ;] =]] =) :/   :0 :') :'( =) <3 =]] <3 :0 :') =)) =) :/   (-_-) -_-   =]] (-_-) *_* :0 ;] =) <3 =) <3 (-_-) =))   :') =)) ;))   =) :~) ;]   ^^ :') :'( ~_~ :') *_* ;]   :/ =) :') :'( =) :/ !   :) (-_-) _._!   :/ :~) (-_-) _._! :)) ;))   :0 :'( (-_-) =) ;] =]] =)   (-_-) ^^ =))   :/ ;] :'( ;) <3 =]] ;] :/   -_- (-_-) :'(   ;)) ;] -_- ;] =)) =]] ;]   :0 (-_-) <3 =)) =) :/   :') =)) ;))   :~) :') =]] ^_^   (-_-) :0 :0 (-_-) =)) ;] =)) =) :/   -_- (-_-) :'(   :') =) =) :') =]] ^_^   :0 (-_-) <3 =)) =) :/ .   :~) <3 :/ =) (-_-) :'( <3 =]] :') :)) :)) :)   =) :~) <3 :/   <3 :/   :')   -_- <3 :'( :/ =)   =) :) :0 ;]   (-_-) -_-   =]] =) -_- :/ ,   ;] ;) ;] :'( :) @@ (-_-) ;)) :)   ^_^ =)) (-_-) ^^ :/   :') @@ (-_-) _._! =)   ;)) ;] -_-   =]] (-_-) =))   =]] =) -_-   -   :/ (-_-) *_* ;] =) :~) <3 =)) ~_~   :)) <3 ^_^ ;]   :')   ^^ (-_-) :'( :)) ;))   =]] _._! :0   (-_-) -_-   :') :)) :))   (-_-) =) :~) ;] :'(   =]] (-_-) *_* :0 ;] =) <3 =) <3 (-_-) =)) :/ . 
*_* <3 :> ;] ;))   =]] (-_-) *_* :0 ;] =) <3 =) <3 (-_-) =)) :/   *_* :') :)   ;) :') :'( :)   :0 (-_-) :/ :/ <3 @@ :)) ;]   -_- (-_-) :'( *_* :') =) :/ .   <3 =)   *_* :') :)   @@ ;]   :/ (-_-) *_* ;] =) :~) <3 =)) ~_~   :)) <3 ^_^ ;]   ^^ :') :'( ~_~ :') *_* ;]   ^^ <3 =) :~)   :/ :0 ;] =]] <3 :') :))   =) <3 *_* ;]   -_- (-_-) :'(   =) :') :/ ^_^ - @@ :') :/ ;] ;))   ;] :)) ;] *_* ;] =)) =) :/   ( :)) <3 ^_^ ;]   _._! =]] :/ @@   <3 =]] =) -_- ) . 
=]] =) -_-   ~_~ :') *_* ;] :/   (-_-) -_- =) ;] =))   =) (-_-) _._! =]] :~)   (-_-) =))   *_* :') =)) :)   (-_-) =) :~) ;] :'(   :') :/ :0 ;] =]] =) :/   (-_-) -_-   <3 =)) -_- (-_-) :'( *_* :') =) <3 (-_-) =))   :/ ;] =]] _._! :'( <3 =) :) :   =]] :'( :) :0 =) (-_-) ~_~ :'( :') :0 :~) :) ,   :/ =) ;] ~_~ (-_-) ,   @@ <3 =)) :') :'( :)   :') =)) :') :)) :) :/ <3 :/ ,   :'( ;] ;) ;] :'( :/ ;]   ;] =)) ~_~ ;] =)) ;] ;] :'( <3 =)) ~_~ ,   *_* (-_-) @@ <3 :)) ;]   :/ ;] =]] _._! :'( <3 =) :)   :') =)) ;))   (-_-) =) :~) ;] :'( :/ .   ~_~ (-_-) (-_-) ;))   =) ;] :') *_* :/   ~_~ ;] =)) ;] :'( :') :)) :)) :)   :~) :') ;) ;]   :/ =) :'( (-_-) =)) ~_~   :/ ^_^ <3 :)) :)) :/   :') =)) ;))   ;] :> :0 ;] :'( <3 ;] =)) =]] ;]   <3 =))   :') :)) :))   =) :~) ;] :/ ;]   <3 :/ :/ _._! ;] :/ . 
:~) ;] :'( ;]   <3 -_-   :) (-_-) _._! :'(   -_- :)) :') ~_~   -_- :)) 4 ~_~ _ =]] =) -_- _ <3 :/ _ =)) <3 ~_~ :~) =) *_* :') :'( ;] 

Given this file, replace each "face" with a character:

letter = "qwertyuiopasdfghjklzxcvbnm"
faces = ["=]]",":')",":0","_._!", ":'(",";]","=))","=)",":~)","(-_-)","-_-",":))","~_~","<3",":/","^_^",";))","*_*",":)","-.-","^^",":()",";)","@@",":>",":v"]

with open("faces.txt", "r") as file:
    data = file.read()
for i in range(len(faces)):
    print letter[i], faces[i]
    data = data.replace(faces[i], letter[i])

print len(letter), len(faces)
print data

Here is the ouptut:

q =]]
w :')
e :0
r _._!
t :'(
y ;]
u =))
i =)
o :~)
p (-_-)
a -_-
s :))
d ~_~
f <3
g :/
h ^_^
j ;))
k *_*
l :)
z -.-
x ^^
c :()
v ;)
b @@
n :>
m :v
26 26
q w e i r t y   i o y   a s w d   ( q i a )   f g   w   g e y q f w s   h f u j   p a   f u a p t k w i f p u   g y q r t f i l   q p k e y i f i f p u g .   i o y t y   w t y   i o t y y   q p k k p u   i l e y g   p a   q i a g :   z y p e w t j l ,   w i i w q h - j y a y u q y   w u j   k f n y j . 
z y p e w t j l - g i l s y   q i a g   o w g   w   q p r e s y   p a   c r y g i f p u g   ( i w g h g )   f u   t w u d y   p a   q w i y d p t f y g .   a p t   y n w k e s y ,   x y b ,   a p t y u g f q ,   q t l e i p ,   b f u w t l   p t   g p k y i o f u d   y s g y .   i y w k   q w u   d w f u   g p k y   e p f u i g   a p t   y v y t l   g p s v y j   i w g h .   k p t y   e p f u i g   a p t   k p t y   q p k e s f q w i y j   i w g h g   r g r w s s l .   i o y   u y n i   i w g h   f u   q o w f u   q w u   b y   p e y u y j   p u s l   w a i y t   g p k y   i y w k   g p s v y   e t y v f p r g   i w g h .   i o y u   i o y   d w k y   i f k y   f g   p v y t   g r k   p a   e p f u i g   g o p x g   l p r   w   q i a   x f u y t .   a w k p r g   y n w k e s y   p a   g r q o   q i a   f g   j y a q p u   q i a   c r w s g . 
x y s s ,   w i i w q h - j y a y u q y   f g   w u p i o y t   f u i y t y g i f u d   h f u j   p a   q p k e y i f i f p u g .   o y t y   y v y t l   i y w k   o w g   p x u   u y i x p t h ( p t   p u s l   p u y   o p g i )   x f i o   v r s u w t w b s y   g y t v f q y g .   l p r t   i y w k   o w g   i f k y   a p t   e w i q o f u d   l p r t   g y t v f q y g   w u j   j y v y s p e f u d   y n e s p f i g   r g r w s s l .   g p ,   i o y u   p t d w u f m y t g   q p u u y q i g   e w t i f q f e w u i g   p a   q p k e y i f i f p u   w u j   i o y   x w t d w k y   g i w t i g !   l p r   g o p r s j   e t p i y q i   p x u   g y t v f q y g   a p t   j y a y u q y   e p f u i g   w u j   o w q h   p e e p u y u i g   a p t   w i i w q h   e p f u i g .   o f g i p t f q w s s l   i o f g   f g   w   a f t g i   i l e y   p a   q i a g ,   y v y t l b p j l   h u p x g   w b p r i   j y a   q p u   q i a   -   g p k y i o f u d   s f h y   w   x p t s j   q r e   p a   w s s   p i o y t   q p k e y i f i f p u g . 
k f n y j   q p k e y i f i f p u g   k w l   v w t l   e p g g f b s y   a p t k w i g .   f i   k w l   b y   g p k y i o f u d   s f h y   x w t d w k y   x f i o   g e y q f w s   i f k y   a p t   i w g h - b w g y j   y s y k y u i g   ( s f h y   r q g b   f q i a ) . 
q i a   d w k y g   p a i y u   i p r q o   p u   k w u l   p i o y t   w g e y q i g   p a   f u a p t k w i f p u   g y q r t f i l :   q t l e i p d t w e o l ,   g i y d p ,   b f u w t l   w u w s l g f g ,   t y v y t g y   y u d y u y y t f u d ,   k p b f s y   g y q r t f i l   w u j   p i o y t g .   d p p j   i y w k g   d y u y t w s s l   o w v y   g i t p u d   g h f s s g   w u j   y n e y t f y u q y   f u   w s s   i o y g y   f g g r y g . 
o y t y   f a   l p r t   a s w d   a s 4 d _ q i a _ f g _ u f d o i k w t y 

Clearly the flag is at the end, since we use random character for each face -> substition cipher:

capture the flag (ctf) is a special kind of information security competitions. there are three common types of ctfs: jeopardy, attack-defence and mixed. jeopardy-style ctfs has a couple of questions (tasks) in range of categories. for example, web, forensic, crypto, binary or something else. team can gain some points for every solved task. more points for more complicated tasks usually. the next task in chain can be opened only after some team solve previous task. then the game time is over sum of points shows you a ctf winer. famous example of such ctf is defcon ctf quals. well, attack-defence is another interesting kind of competitions. here every team has own network(or only one host) with vulnarable services. your team has time for patching your services and developing exploits usually. so, then organi:vers connects participants of competition and the wargame starts! you should protect own services for defence points and hack opponents for attack points. historically this is a first type of ctfs, everybody knows about def con ctf - something like a world cup of all other competitions. mixed competitions may vary possible formats. it may be something like wargame with special time for task-based elements (like ucsb ictf). ctf games often touch on many other aspects of information security: cryptography, stego, binary analysis, reverse engeneering, mobile security and others. good teams generally have strong skills and experience in all these issues. here if your flag fl4g_ctf_is_nightmare

Add some spaces to it and we get the flag

f l 4 g _ c t f _ i s _ n i g h t m a r e

About