ail-framework/bin/tests/Remove_longline_fp.py
Starow 1379ef705a Initial import of AIL framework - Analysis Information Leak framework
AIL is a modular framework to analyse potential information leak from unstructured data source like pastes from Past
ebin or similar services. AIL framework is flexible and can be extended to support other functionalities to mine sen
sitive information
2014-08-06 11:43:40 +02:00

57 lines
No EOL
1.4 KiB
Python
Executable file

#!/usr/bin/python2.7
# -*-coding:UTF-8 -*
from packages.lib_words import *
from packages.imported import *
def main():
"""Main Function"""
parser = argparse.ArgumentParser(
description = '''This script is a part of the Analysis Information Leak
framework. It removes the line which are in redis under
the "key" name argument''',
epilog = '''This script is usually usefull launched after using
./Classify_Paste_Token.py example: ./Remove_longline_fp.py mails_categ''')
parser.add_argument('-db',
type = int,
default = 0,
help = 'The name of the Redis DB (default 0)',
choices=[0, 1, 2, 3, 4],
action = 'store')
parser.add_argument('key',
type = str,
help = 'Name of the key to process in redis ("")',
action = 'store')
parser.add_argument('-d',
help = 'Delete the set of longline created?',
action = 'store_true')
parser.add_argument('-s',
help = 'Store the longline numbers inside a set?',
action = 'store_true')
parser.add_argument('-max',
type = int,
default = 500,
help = 'The limit between "short lines" and "long lines" (500)',
action = 'store')
args = parser.parse_args()
r = redis.StrictRedis(
host='localhost',
port=6379,
db=args.db)
p = r.pipeline(False)
#remove_longline_from_categ(r, args.key, args.d, args.s, args.max)
detect_longline_from_list(r,args.max)
if __name__ == "__main__":
main()