Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix for decloaking #3

Open
wants to merge 13 commits into
base: master
Choose a base branch
from
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -99,3 +99,5 @@ Or of course: $ cat cloakedAndNoisy.txt | cut -d" " -f3- > cloakedNoiseStripped.
<img src=https://github.com/TryCatchHCF/Cloakify/blob/master/screenshots/pokemonGoExample.png></img>



* Updated to python3 by John Aho
70 changes: 70 additions & 0 deletions ciphers/ipsydaisy
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
lorem ipsum
dolor sit amet
consectetur adipiscing
elit sed do eiusmod
tempor incididunt
ut labore et
dolore magna
aliqua ut
enim ad
minim veniam quis
nostrud exercitation
ullamco
laboris nisi
ut aliquip
ex ea
commodo
consequat duis
aute
irure dolor
lorem ipsum ex dolor sit
amet consectetur duis
adipiscing aute elit
sed do eiusmod tempor incididunt
ut labore et dolore magna
aliqua
ut enim ad minim
veniam quis duis
nostrud exercitation ullamco laboris nisi
ut aliquip ex ea commodo consequat
duis aute irure dolor
in reprehenderit in
voluptate velit
esse cillum
dolore eu
fugiat nulla
pariatur excepteur
sint
occaecat cupidatat
non proident sunt in
culpa qui officia
deserunt mollit
anim id duis
est laborum
podex perfectus es
futue te ipsum
ede faecum
ascendo tuum
vescere bracis meis
faciem durum cacantis habes
fututus et mori in igni
recedite plebes gero rem imperialem
cillum ascendo
dolore laborum
lorem ipsum dolor sit
amet consectetur
adipiscing elit
sed do eiusmod qui incididunt
ut labore et dolore magna aliqua
ut enim ad minim veniam quis
nostrud ad exercitation ullamco laboris nisi
ut aliquip ex ea commodo et consequat
duis aute irure dolor in reprehenderit in
voluptate velit esse
cillum dolore eu fugiat nulla
pariatur excepteur sint
occaecat cupidatat non
proident sunt in culpa qui officia
deserunt mollit anim id est laborum
laborum faecum
faecum labore et
28 changes: 15 additions & 13 deletions cloakify.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#
# Filename: cloakify.py
#
# Version: 1.1.0
# Version: 1.1.1
#
# Author: Joe Gervais (TryCatchHCF)
#
Expand Down Expand Up @@ -39,6 +39,7 @@
#
# $ ./cloakify.py payload.txt ciphers/desserts > exfiltrate.txt
#
# Updated to Python3 by John Aho

import os, sys, getopt, base64

Expand All @@ -48,36 +49,37 @@ def Cloakify( arg1, arg2, arg3 ):

payloadFile = open( arg1, 'rb' )
payloadRaw = payloadFile.read()
payloadB64 = base64.encodestring( payloadRaw )
payloadB64 = base64.encodebytes( payloadRaw)

try:
with open( arg2 ) as file:
cipherArray = file.readlines()
except:
print ""
print "!!! Oh noes! Problem reading cipher '", arg2, "'"
print "!!! Verify the location of the cipher file"
print ""
print("")
print("!!! Oh noes! Problem reading cipher '", arg2, "'")
print("!!! Verify the location of the cipher file" )
print("")

if ( arg3 != "" ):
try:
with open( arg3, "w+" ) as outFile:
for char in payloadB64:
for char2 in payloadB64:
char = chr(char2)
if char != '\n':
outFile.write( cipherArray[ array64.index(char) ] )
except:
print ""
print "!!! Oh noes! Problem opening or writing to file '", arg3, "'"
print ""
except Exception as ex:
print("")
print("!!! Oh noes! Problem opening or writing to file '", arg3, "'", ex)
print("")
else:
for char in payloadB64:
if char != '\n':
print cipherArray[ array64.index(char) ],
print( cipherArray[ array64.index(char) ],)


if __name__ == "__main__":
if ( len(sys.argv) != 3 ):
print "usage: cloakify.py <payloadFilename> <cipherFilename>"
print("usage: cloakify.py <payloadFilename> <cipherFilename>")
exit

else:
Expand Down
Loading