Module Import alias Import alias Import alias Import alias Import alias ImportFrom alias TryExcept body Import alias identifier handlers ExceptHandler type NameLoad body Import alias Assign NameStore ListLoad TryExcept body ImportFrom alias Expr Call AttributeLoad NameLoad attr Str handlers ExceptHandler type NameLoad body Pass TryExcept body ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias Expr Call AttributeLoad NameLoad attr Str handlers ExceptHandler type NameLoad body Pass TryExcept body ImportFrom alias Expr Call AttributeLoad NameLoad attr Str handlers ExceptHandler type NameLoad body Pass TryExcept body Import alias Expr Call AttributeLoad NameLoad attr Str handlers ExceptHandler type NameLoad body Pass Import alias ImportFrom alias ClassDef bases NameLoad body Assign NameStore Dict Assign NameStore Dict FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam NameParam defaults NameLoad Str NameLoad Str Str NameLoad body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad If CompareIs NameLoad NameLoad body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Str Expr Call AttributeLoad NameLoad attr NameLoad Assign AttributeStore NameLoad attr Call NameLoad NameLoad Assign AttributeStore NameLoad attr NameLoad If NameLoad body Assign AttributeStore NameLoad attr NameLoad orelse Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr NameLoad Assign AttributeStore NameLoad attr BinOpAdd Str NameLoad Assign NameStore BinOpAdd Str NameLoad TryExcept body Assign AttributeStore NameLoad attr Call NameLoad NameLoad NameLoad handlers ExceptHandler type NameLoad body Assign NameStore BinOpMod Str NameLoad Raise Call NameLoad NameLoad Assign AttributeStore NameLoad attr NameLoad If CompareEq NameLoad Str body If CompareNotIn NameLoad NameLoad body Assign NameStore BinOpMod Str NameLoad Raise Call NameLoad NameLoad orelse If CompareEq NameLoad Str body If CompareNotIn Str NameLoad body Assign NameStore Str Raise Call NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr With Call NameLoad NameLoad NameStore body Expr Call AttributeLoad NameLoad attr NameLoad For NameStore Call AttributeLoad NameLoad attr body TryExcept body Assign NameStore Call AttributeLoad NameLoad attr NameLoad Str handlers ExceptHandler body Continue If NameLoad body Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign SubscriptStore AttributeLoad NameLoad attr Index NameLoad NameLoad TryExcept body Assign NameStore Call AttributeLoad NameLoad attr NameLoad Str handlers ExceptHandler body Continue If NameLoad body Assign SubscriptStore AttributeLoad NameLoad attr Index NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body TryExcept body For NameStore SubscriptLoad AttributeLoad NameLoad attr Index NameLoad body If Call AttributeLoad NameLoad attr NameLoad body Return NameLoad handlers ExceptHandler type NameLoad name NameStore body Pass Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults body For TupleStore NameStore NameStore Call AttributeLoad AttributeLoad NameLoad attr attr body Assign NameStore Call AttributeLoad NameLoad attr NameLoad For NameStore NameLoad body If Call NameLoad NameLoad NameLoad body Assign NameStore SubscriptLoad NameLoad Index Num If Call AttributeLoad NameLoad attr NameLoad NameLoad body Continue If CompareIn NameLoad AttributeLoad NameLoad attr body Assign NameStore Call AttributeLoad NameLoad attr Str Str NameLoad If AttributeLoad NameLoad attr body If CompareIn TupleLoad NameLoad NameLoad AttributeLoad NameLoad attr body Continue Expr Call AttributeLoad AttributeLoad NameLoad attr attr TupleLoad NameLoad NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body TryExcept body Assign NameStore Call NameLoad NameLoad keyword NameLoad If AttributeLoad NameLoad attr body Assign AttributeStore NameLoad attr Call NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Assign NameStore Num For NameStore AttributeLoad NameLoad attr body AugAssignAdd NameStore Num Assign NameStore Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad handlers ExceptHandler type TupleLoad NameLoad NameLoad body Raise ExceptHandler type NameLoad name NameStore body Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body TryExcept body Assign NameStore Call NameLoad Assign AttributeStore NameLoad attr NameLoad Assign NameStore Call NameLoad Assign NameStore Call NameLoad If AttributeLoad NameLoad attr body Assign AttributeStore NameLoad attr Call NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Assign NameStore Num For NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad keyword NameLoad body AugAssignAdd NameStore Num Assign NameStore Call NameLoad Assign NameStore Call NameLoad NameLoad NameLoad keyword NameLoad Assign NameStore Call NameLoad NameLoad NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad handlers ExceptHandler type TupleLoad NameLoad NameLoad body Raise ExceptHandler type NameLoad name NameStore body Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Assign NameStore BinOpAdd Str AttributeLoad NameLoad attr TryExcept body Assign AttributeStore NameLoad attr Call NameLoad NameLoad NameLoad handlers ExceptHandler type NameLoad body Assign NameStore BinOpMod Str AttributeLoad NameLoad attr Raise Call NameLoad NameLoad Expr Call AttributeLoad NameLoad attr NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body TryExcept body If AttributeLoad NameLoad attr body Assign AttributeStore NameLoad attr Call NameLoad Assign NameStore Call AttributeLoad NameLoad attr Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Expr Call AttributeLoad NameLoad attr NameLoad NameLoad Num Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad handlers ExceptHandler type TupleLoad NameLoad NameLoad body Raise ExceptHandler type NameLoad name NameStore body Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body TryExcept body If AttributeLoad NameLoad attr body Assign AttributeStore NameLoad attr Call NameLoad Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore Call NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr keyword NameLoad Assign NameStore Str For NameStore NameLoad body If CompareIn AttributeLoad AttributeLoad NameLoad attr attr ListLoad Str Str Str Str Str body Continue orelse If Call AttributeLoad NameLoad attr Str Call NameLoad NameLoad body Continue orelse AugAssignAdd NameStore Call NameLoad NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Expr Call AttributeLoad NameLoad attr NameLoad NameLoad Num Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad handlers ExceptHandler type TupleLoad NameLoad NameLoad body Raise ExceptHandler type NameLoad name NameStore body Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body TryExcept body If BoolOpOr Call AttributeLoad NameLoad attr Str Call AttributeLoad NameLoad attr Str body If CompareNotIn Str NameLoad body Assign NameStore Str Raise Call NameLoad NameLoad Assign NameStore Dict Str Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad keyword NameLoad Expr Call AttributeLoad NameLoad attr Assign NameStore Call NameLoad AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr NameLoad NameLoad Return orelse If Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad body With Call NameLoad NameLoad Str NameStore body Expr Call AttributeLoad NameLoad attr NameLoad NameLoad Return orelse If Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad body For TupleStore NameStore NameStore NameStore Call AttributeLoad NameLoad attr NameLoad body For NameStore Call AttributeLoad NameLoad attr NameLoad AttributeLoad NameLoad attr body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad With Call NameLoad NameLoad Str NameStore body Expr Call AttributeLoad NameLoad attr NameLoad NameLoad Return Assign NameStore BinOpMod Str NameLoad Raise Call NameLoad NameLoad handlers ExceptHandler type TupleLoad NameLoad NameLoad body Raise ExceptHandler type NameLoad name NameStore body Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad decorator_list decorator_list If CompareEq NameLoad Str body Assign NameStore Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Str keyword Str keyword Str Expr Call AttributeLoad NameLoad attr Str keyword Str keyword NameLoad keyword Str Expr Call AttributeLoad NameLoad attr Str keyword Str keyword Str keyword Str Expr Call AttributeLoad NameLoad attr Str keyword Str keyword Str keyword Str Expr Call AttributeLoad NameLoad attr Str keyword Str keyword Str keyword NameLoad keyword Str Expr Call AttributeLoad NameLoad attr Str keyword Str keyword Str keyword Str Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore Call NameLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr
N/A N/A os N/A sys N/A fnmatch N/A argparse N/A re StringIO StringIO N/A N/A N/A configparser ConfigParser N/A N/A N/A ImportError N/A N/A ConfigParser N/A IMPORTS N/A N/A N/A PyPDF2 PdfFileReader N/A N/A N/A IMPORTS append pypdf2 N/A N/A N/A ImportError N/A N/A N/A N/A pdfminer.pdfpage PDFPage pdfminer.pdfinterp PDFResourceManager pdfminer.converter TextConverter pdfminer.pdfinterp PDFPageInterpreter pdfminer.layout LAParams N/A N/A N/A IMPORTS append pdfminer N/A N/A N/A ImportError N/A N/A N/A N/A bs4 BeautifulSoup N/A N/A N/A IMPORTS append beautifulsoup N/A N/A N/A ImportError N/A N/A N/A N/A N/A requests N/A N/A N/A IMPORTS append requests N/A N/A N/A ImportError N/A N/A N/A output whitelist WhiteList IOC_Parser N/A object N/A N/A patterns N/A N/A defang N/A __init__ N/A N/A self patterns_ini input_format dedup library output_format output_handler N/A None pdf False pdfminer csv None N/A N/A basedir N/A N/A N/A os path dirname N/A N/A N/A os path abspath __file__ N/A N/A patterns_ini None N/A N/A patterns_ini N/A N/A N/A os path join basedir patterns.ini N/A N/A N/A self load_patterns patterns_ini N/A N/A self whitelist N/A WhiteList basedir N/A N/A self dedup dedup N/A output_handler N/A N/A N/A self handler output_handler N/A N/A N/A self handler N/A N/A output getHandler output_format N/A N/A self ext_filter N/A *. input_format N/A parser_format N/A parse_ input_format N/A N/A N/A N/A self parser_func N/A getattr self parser_format N/A N/A N/A AttributeError N/A N/A e N/A Selected parser format is not supported: %s input_format N/A N/A NotImplementedError e N/A N/A self library library N/A N/A input_format pdf N/A N/A N/A library IMPORTS N/A N/A e N/A Selected PDF parser library not found: %s library N/A N/A ImportError e N/A N/A N/A input_format html N/A N/A N/A beautifulsoup IMPORTS N/A N/A e HTML parser library not found: BeautifulSoup N/A N/A ImportError e N/A load_patterns N/A N/A self fpath N/A N/A N/A config N/A N/A ConfigParser ConfigParser N/A N/A open fpath f N/A N/A N/A N/A config readfp f N/A ind_type N/A N/A config sections N/A N/A N/A N/A ind_pattern N/A N/A config get ind_type pattern N/A N/A N/A N/A N/A ind_pattern N/A N/A ind_regex N/A N/A re compile ind_pattern N/A N/A N/A self patterns N/A ind_type ind_regex N/A N/A N/A ind_defang N/A N/A config get ind_type defang N/A N/A N/A N/A N/A ind_defang N/A N/A N/A N/A self defang N/A ind_type True N/A is_whitelisted N/A N/A self ind_match ind_type N/A N/A N/A N/A N/A w N/A N/A self whitelist N/A ind_type N/A N/A N/A N/A w findall ind_match N/A N/A True N/A N/A N/A KeyError N/A e N/A N/A N/A False N/A parse_page N/A N/A self fpath data page_num N/A N/A N/A N/A ind_type ind_regex N/A N/A N/A self patterns items N/A N/A matches N/A N/A ind_regex findall data N/A ind_match matches N/A N/A N/A isinstance ind_match tuple N/A N/A ind_match N/A ind_match N/A 0 N/A N/A N/A self is_whitelisted ind_match ind_type N/A N/A N/A N/A ind_type N/A self defang N/A N/A ind_match N/A N/A re sub \[\.\] . ind_match N/A N/A self dedup N/A N/A N/A N/A ind_type ind_match N/A self dedup_store N/A N/A N/A N/A N/A N/A self dedup_store add N/A ind_type ind_match N/A N/A N/A N/A self handler print_match fpath page_num ind_type ind_match N/A parse_pdf_pypdf2 N/A N/A self f fpath N/A N/A N/A N/A N/A pdf N/A PdfFileReader f strict False N/A N/A self dedup N/A N/A N/A self dedup_store N/A set N/A N/A N/A N/A self handler print_header fpath N/A page_num 0 N/A page N/A pdf pages N/A N/A page_num 1 N/A data N/A N/A page extractText N/A N/A N/A self parse_page fpath data page_num N/A N/A N/A N/A self handler print_footer fpath N/A N/A N/A N/A KeyboardInterrupt SystemExit N/A N/A N/A N/A Exception N/A e N/A N/A N/A N/A N/A self handler print_error fpath e N/A parse_pdf_pdfminer N/A N/A self f fpath N/A N/A N/A N/A N/A laparams N/A LAParams N/A N/A laparams all_texts True N/A rsrcmgr N/A PDFResourceManager N/A pagenos N/A set N/A N/A self dedup N/A N/A N/A self dedup_store N/A set N/A N/A N/A N/A self handler print_header fpath N/A page_num 0 N/A page N/A N/A PDFPage get_pages f pagenos check_extractable True N/A N/A page_num 1 N/A retstr N/A StringIO N/A device N/A TextConverter rsrcmgr retstr laparams laparams N/A interpreter N/A PDFPageInterpreter rsrcmgr device N/A N/A N/A interpreter process_page page N/A data N/A N/A retstr getvalue N/A N/A N/A retstr close N/A N/A N/A self parse_page fpath data page_num N/A N/A N/A N/A self handler print_footer fpath N/A N/A N/A N/A KeyboardInterrupt SystemExit N/A N/A N/A N/A Exception N/A e N/A N/A N/A N/A N/A self handler print_error fpath e N/A parse_pdf N/A N/A self f fpath N/A N/A N/A parser_format N/A parse_pdf_ N/A self library N/A N/A N/A N/A self parser_func N/A getattr self parser_format N/A N/A N/A AttributeError N/A N/A e N/A Selected PDF parser library is not supported: %s N/A self library N/A N/A NotImplementedError e N/A N/A N/A self parser_func f fpath N/A parse_txt N/A N/A self f fpath N/A N/A N/A N/A N/A N/A self dedup N/A N/A N/A self dedup_store N/A set N/A data N/A N/A f read N/A N/A N/A N/A self handler print_header fpath N/A N/A N/A self parse_page fpath data 1 N/A N/A N/A N/A self handler print_footer fpath N/A N/A N/A N/A KeyboardInterrupt SystemExit N/A N/A N/A N/A Exception N/A e N/A N/A N/A N/A N/A self handler print_error fpath e N/A parse_html N/A N/A self f fpath N/A N/A N/A N/A N/A N/A self dedup N/A N/A N/A self dedup_store N/A set N/A data N/A N/A f read N/A soup N/A BeautifulSoup data N/A html N/A N/A soup findAll text True N/A text N/A elem html N/A N/A N/A N/A N/A elem parent name N/A style script [document] head title N/A N/A N/A N/A N/A N/A re match <!--.*--> N/A unicode elem N/A N/A N/A N/A text N/A unicode elem N/A N/A N/A N/A self handler print_header fpath N/A N/A N/A self parse_page fpath text 1 N/A N/A N/A N/A self handler print_footer fpath N/A N/A N/A N/A KeyboardInterrupt SystemExit N/A N/A N/A N/A Exception N/A e N/A N/A N/A N/A N/A self handler print_error fpath e N/A parse N/A N/A self path N/A N/A N/A N/A N/A N/A N/A N/A path startswith http:// N/A N/A path startswith https:// N/A N/A N/A requests IMPORTS N/A N/A e HTTP library not found: requests N/A N/A ImportError e N/A headers N/A User-Agent Mozilla/5.0 Gecko Firefox N/A r N/A N/A requests get path headers headers N/A N/A N/A r raise_for_status N/A f N/A StringIO N/A r content N/A N/A N/A self parser_func f path N/A N/A N/A N/A N/A N/A os path isfile path N/A N/A N/A open path rb f N/A N/A N/A N/A self parser_func f path N/A N/A N/A N/A N/A N/A os path isdir path N/A N/A N/A walk_root walk_dirs walk_files N/A N/A os walk path N/A N/A walk_file N/A N/A fnmatch filter walk_files N/A self ext_filter N/A N/A fpath N/A N/A N/A os path join walk_root walk_file N/A N/A open fpath rb f N/A N/A N/A N/A self parser_func f fpath N/A N/A e N/A File path is not a file, directory or URL: %s path N/A N/A IOError e N/A N/A N/A N/A KeyboardInterrupt SystemExit N/A N/A N/A N/A Exception N/A e N/A N/A N/A N/A N/A self handler print_error path e N/A N/A N/A N/A __name__ __main__ N/A N/A argparser N/A N/A argparse ArgumentParser N/A N/A N/A argparser add_argument PATH action store help File/directory/URL to report(s) N/A N/A N/A argparser add_argument -p dest INI default None help Pattern file N/A N/A N/A argparser add_argument -i dest INPUT_FORMAT default pdf help Input format (pdf/txt/html) N/A N/A N/A argparser add_argument -o dest OUTPUT_FORMAT default csv help Output format (csv/json/yara/netflow) N/A N/A N/A argparser add_argument -d dest DEDUP action store_true default False help Deduplicate matches N/A N/A N/A argparser add_argument -l dest LIB default pdfminer help PDF parsing library (pypdf2/pdfminer) N/A args N/A N/A argparser parse_args N/A parser N/A IOC_Parser N/A args INI N/A args INPUT_FORMAT N/A args DEDUP N/A args LIB N/A args OUTPUT_FORMAT N/A N/A N/A parser parse N/A args PATH