-
Notifications
You must be signed in to change notification settings - Fork 0
/
EzSolve.py
34 lines (29 loc) · 997 Bytes
/
EzSolve.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#! /usr/bin/python
# -*- coding: utf-8 -*-
# vim:fenc=utf-8
#
# Copyright © 2018 howpwn <finn79426@gmail.com>
#
# Distributed under terms of the MIT license.
from argparse import ArgumentParser
from Algorithm import CrackEveryEncode
if __name__ == "__main__":
# argument processing
parser = ArgumentParser()
parser.add_argument("-k", "--key", dest="key",
type=str, help="Specify FLAG header")
parser.add_argument("cipher")
parser.add_argument("-l", help="Enable lone FLAG header list support", action='store_true') # Store Longlist flag
args = parser.parse_args()
cipher = args.cipher
# Processing the FLAG Header(key)
if args.l:
# Longlist mode ON
with open("./FLAGList.txt") as fp:
for oneline in fp:
key = oneline.strip("\n")
CrackEveryEncode(cipher, key)
else:
# Just catch given key argument
key = args.key
CrackEveryEncode(cipher, key)