mirror of
https://github.com/ail-project/ail-framework.git
synced 2024-11-22 22:27:17 +00:00
chg: [tools] add reprocess title + CEDetector
This commit is contained in:
parent
1112615ec3
commit
3f78457dff
3 changed files with 24 additions and 9 deletions
|
@ -341,6 +341,8 @@ def obj_iterator(obj_type, filters):
|
|||
return Pgps.get_all_pgps_objects(filters=filters)
|
||||
elif obj_type == 'message':
|
||||
return chats_viewer.get_messages_iterator(filters=filters)
|
||||
elif obj_type == 'title':
|
||||
return Titles.Titles().get_iterator()
|
||||
|
||||
|
||||
def card_objs_iterators(filters):
|
||||
|
|
|
@ -111,18 +111,29 @@ def test_detection():
|
|||
if not is_detected:
|
||||
not_detected.add(domain)
|
||||
|
||||
print()
|
||||
print()
|
||||
print()
|
||||
print()
|
||||
for domain in not_detected:
|
||||
dom = Domain(domain)
|
||||
print('-----------', domain)
|
||||
# print('-----------', domain)
|
||||
for h in dom.get_correlation('title').get('title', []):
|
||||
print(Title(h[1:]).get_content().lower())
|
||||
c = Title(h[1:]).get_content().lower()
|
||||
if c == '404 not found':
|
||||
lt = []
|
||||
dom = Domain(domain)
|
||||
print('-----------', domain)
|
||||
for hi in dom.get_correlation('title').get('title', []):
|
||||
print(Title(hi[1:]).get_content().lower())
|
||||
ci = Title(hi[1:]).get_content().lower()
|
||||
if ci != '404 not found' and ci not in []:
|
||||
lt.append(ci)
|
||||
if lt:
|
||||
print('-----------', domain)
|
||||
for ti in lt:
|
||||
print(ti)
|
||||
print()
|
||||
print()
|
||||
|
||||
# Tag.delete_object_tag(tag, 'domain', domain)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
module = CEDetector()
|
||||
|
|
|
@ -29,11 +29,13 @@ from lib.objects import ail_objects
|
|||
# from modules.Onion import Onion
|
||||
# from modules.Telegram import Telegram
|
||||
|
||||
from modules.CEDetector import CEDetector
|
||||
from modules.Languages import Languages
|
||||
from modules.OcrExtractor import OcrExtractor
|
||||
from modules.QrCodeReader import QrCodeReader
|
||||
|
||||
MODULES = {
|
||||
'CEDetector': CEDetector,
|
||||
'Languages': Languages,
|
||||
'OcrExtractor': OcrExtractor,
|
||||
'QrCodeReader': QrCodeReader
|
||||
|
@ -70,7 +72,7 @@ if __name__ == "__main__":
|
|||
obj_type = args.type
|
||||
if not is_object_type(obj_type):
|
||||
raise Exception(f'Invalid Object Type: {obj_type}')
|
||||
if obj_type not in ['image', 'item', 'message', 'screenshot']:
|
||||
if obj_type not in ['image', 'item', 'message', 'screenshot', 'title']:
|
||||
raise Exception(f'Currently not supported Object Type: {obj_type}')
|
||||
|
||||
modulename = args.module
|
||||
|
|
Loading…
Reference in a new issue