''' * Author : see AUTHORS * Licence: MIT, see LICENSE ''' from flask_restplus import reqparse, inputs from settings import SECONDS_PER_JOB from src.api.apiConfig import api from src.api.fitcrack.argumentsParser import pagination packageList_parser = pagination.copy() packageList_parser.add_argument('name', type=str, required=False, help='filtrovanie balíkov podľa názvu') packageList_parser.add_argument('status', type=str, required=False, help='filtrovanie podľa stavu package', choices=[ 'ready', 'finished', 'exhausted', 'malformed', 'timeout', 'running', 'validating', 'finishing' ]) packageList_parser.add_argument('attack_mode', type=str, required=False, help='filtrovanie podľa typu útoku') packageList_parser.add_argument( 'order_by',
''' * Author : see AUTHORS * Licence: MIT, see LICENSE ''' from flask_restplus import reqparse from src.api.fitcrack.argumentsParser import pagination updateRule_parser = reqparse.RequestParser() updateRule_parser.add_argument('newRule', type=str, required=True) rule_parser = pagination.copy() rule_parser.add_argument('search', type=str, required=False)
''' * Author : see AUTHORS * Licence: MIT, see LICENSE ''' from flask_restplus import inputs from src.api.fitcrack.argumentsParser import pagination hashes_parser = pagination.copy() hashes_parser.add_argument('search', type=str, required=False, help='Filter hashes according to password or hash') hashes_parser.add_argument('order_by', type=str, required=False, help='Ordering of results', choices=['result', 'hash_type', 'hash', 'added']) hashes_parser.add_argument('descending', type=inputs.boolean, required=False)
''' * Author : see AUTHORS * Licence: MIT, see LICENSE ''' from src.api.fitcrack.argumentsParser import pagination notifications_parser = pagination.copy() notifications_parser.add_argument('seen', type=bool, help='mark notifications as seen', required=False, default=True)
''' * Author : see AUTHORS * Licence: MIT, see LICENSE ''' from src.api.fitcrack.argumentsParser import pagination from flask_restplus import reqparse dictionary_parser = pagination.copy() dictionary_parser.add_argument('search', type=str, required=False) dictionaryFromFile_parser = reqparse.RequestParser() dictionaryFromFile_parser.add_argument('files', type=list, required=True, location='json') dictionaryFromFile_parser.add_argument('sort', type=bool, location='json')
''' * Author : see AUTHORS * Licence: MIT, see LICENSE ''' from flask_restplus import reqparse, inputs from settings import SECONDS_PER_JOB from src.api.apiConfig import api from src.api.fitcrack.argumentsParser import pagination jobList_parser = pagination.copy() jobList_parser.add_argument('name', type=str, required=False, help='filter by name') jobList_parser.add_argument('status', type=str, required=False, help='filter by state', choices=['ready', 'finished', 'exhausted', 'malformed', 'timeout', 'running', 'finishing']) jobList_parser.add_argument('attack_mode', type=str, required=False, help='filter by attack type') jobList_parser.add_argument('order_by', type=str, required=False, help='result ordering', choices=['name', 'time', 'progress', 'attack_mode', 'status']) jobList_parser.add_argument('descending', type=inputs.boolean, required=False) jobList_parser.add_argument('showDeleted', type=inputs.boolean, required=False, default=False) jobList_parser.add_argument('bin', type=int, required=False, default=None) jobList_parser.add_argument('batch', type=int, required=False, default=None) jobWorkunit_parser = pagination.copy() verifyHash_argument = reqparse.RequestParser() verifyHash_argument.add_argument('hashes', type=str, required=True, help='hash to verify', default='79c2b46ce2594ecbcb5b73e928345492') verifyHash_argument.add_argument('hashtype', type=str, required=True, default='0', help='hash code from /hashcat/hashTypes')
''' * Author : see AUTHORS * Licence: MIT, see LICENSE ''' from flask_restplus import reqparse, inputs from src.api.apiConfig import api from src.api.fitcrack.argumentsParser import pagination batch_list = pagination.copy() batch_definition = api.schema_model( 'batch_definition', { 'properties': { 'id': { 'type': 'integer' }, 'name': { 'type': 'string', 'required': True }, 'jobs': { 'type': 'array', 'items': { 'type': 'integer' }, 'required': True }, } })
''' * Author : see AUTHORS * Licence: MIT, see LICENSE ''' from flask_restplus import inputs from src.api.fitcrack.argumentsParser import pagination packageHost_parser = pagination.copy() packageHost_parser.add_argument('name', type=str, required=False, help='filtrovanie uzlov podľa názvu') packageHost_parser.add_argument( 'order_by', type=str, required=False, help='zoradenie výsledkov', choices=['domain_name', 'os_name', 'p_model', 'time', 'status']) packageHost_parser.add_argument('descending', type=inputs.boolean, required=False) packageHost_parser.add_argument('showDeleted', type=inputs.boolean, required=False, default=False) packageHost_parser.add_argument('all', type=inputs.boolean, required=False,
''' * Author : see AUTHORS * Licence: MIT, see LICENSE ''' from flask_restplus import inputs from src.api.fitcrack.argumentsParser import pagination jobHost_parser = pagination.copy() jobHost_parser.add_argument('name', type=str, required=False, help='Filter according to name') jobHost_parser.add_argument( 'order_by', type=str, required=False, help='Ordering of the results', choices=['domain_name', 'os_name', 'p_model', 'time', 'status']) jobHost_parser.add_argument('descending', type=inputs.boolean, required=False) jobHost_parser.add_argument('showDeleted', type=inputs.boolean, required=False, default=False) jobHost_parser.add_argument('all', type=inputs.boolean, required=False, default=False)