mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2025-05-16 21:53:45 +03:00
more fixes
This commit is contained in:
parent
1d15c595a4
commit
8a8dc73980
|
@ -1,7 +1,7 @@
|
||||||
#!/usr/bin/env python
|
#!/usr/bin/env python
|
||||||
|
|
||||||
"""
|
"""
|
||||||
$Id: $
|
$Id$
|
||||||
|
|
||||||
This file is part of the sqlmap project, http://sqlmap.sourceforge.net.
|
This file is part of the sqlmap project, http://sqlmap.sourceforge.net.
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
#!/usr/bin/env python
|
#!/usr/bin/env python
|
||||||
|
|
||||||
"""
|
"""
|
||||||
cloak.py - Simple file encryption and/or compression utility
|
cloak.py - Simple file encryption/compression utility
|
||||||
Copyright (C) 2010 Miroslav Stampar, Bernardo Damele A. G.
|
Copyright (C) 2010 Miroslav Stampar, Bernardo Damele A. G.
|
||||||
email(s): miroslav.stampar@gmail.com, bernardo.damele@gmail.com
|
email(s): miroslav.stampar@gmail.com, bernardo.damele@gmail.com
|
||||||
|
|
||||||
|
@ -20,9 +20,9 @@ License along with this library; if not, write to the Free Software
|
||||||
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
import bz2
|
||||||
import os
|
import os
|
||||||
import sys
|
import sys
|
||||||
import bz2
|
|
||||||
|
|
||||||
from optparse import OptionError
|
from optparse import OptionError
|
||||||
from optparse import OptionParser
|
from optparse import OptionParser
|
||||||
|
@ -38,25 +38,17 @@ def hideAscii(data):
|
||||||
return retVal
|
return retVal
|
||||||
|
|
||||||
def cloak(inputFile):
|
def cloak(inputFile):
|
||||||
retVal = ""
|
|
||||||
|
|
||||||
f = open(inputFile, 'rb')
|
f = open(inputFile, 'rb')
|
||||||
original = f.read()
|
data = bz2.compress(f.read())
|
||||||
f.close()
|
f.close()
|
||||||
|
|
||||||
data = bz2.compress(original)
|
|
||||||
|
|
||||||
return hideAscii(data)
|
return hideAscii(data)
|
||||||
|
|
||||||
def decloak(inputFile):
|
def decloak(inputFile):
|
||||||
retVal = ""
|
|
||||||
|
|
||||||
f = open(inputFile, 'rb')
|
f = open(inputFile, 'rb')
|
||||||
original = f.read()
|
data = bz2.decompress(hideAscii(f.read()))
|
||||||
f.close()
|
f.close()
|
||||||
|
|
||||||
data = bz2.decompress(hideAscii(original))
|
|
||||||
|
|
||||||
return data
|
return data
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
|
@ -76,9 +68,7 @@ def main():
|
||||||
except (OptionError, TypeError), e:
|
except (OptionError, TypeError), e:
|
||||||
parser.error(e)
|
parser.error(e)
|
||||||
|
|
||||||
if args.inputFile == '*':
|
if not os.path.isfile(args.inputFile):
|
||||||
pass
|
|
||||||
elif not os.path.isfile(args.inputFile):
|
|
||||||
print 'ERROR: the provided input file \'%s\' is not a regular file' % args.inputFile
|
print 'ERROR: the provided input file \'%s\' is not a regular file' % args.inputFile
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user