Skip to content

Commit

Permalink
fix: [keys module] fix tags
Browse files Browse the repository at this point in the history
  • Loading branch information
Terrtia committed Jan 8, 2024
1 parent ba6f45d commit d7c8262
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions bin/modules/Keys.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,95 +71,95 @@ def compute(self, message):
# find = True

if KeyEnum.PGP_PUBLIC_KEY_BLOCK.value in content:
tag = f'infoleak:automatic-detection="pgp-public-key-block";{item.get_id()}'
tag = 'infoleak:automatic-detection="pgp-public-key-block"'
self.add_message_to_queue(message=tag, queue='Tags')
get_pgp_content = True

if KeyEnum.PGP_SIGNATURE.value in content:
tag = f'infoleak:automatic-detection="pgp-signature";{item.get_id()}'
tag = 'infoleak:automatic-detection="pgp-signature"'
self.add_message_to_queue(message=tag, queue='Tags')
get_pgp_content = True

if KeyEnum.PGP_PRIVATE_KEY_BLOCK.value in content:
self.redis_logger.warning(f'{item.get_basename()} has a pgp private key block message')

tag = f'infoleak:automatic-detection="pgp-private-key";{item.get_id()}'
tag = 'infoleak:automatic-detection="pgp-private-key"'
self.add_message_to_queue(message=tag, queue='Tags')
get_pgp_content = True

if KeyEnum.CERTIFICATE.value in content:
self.redis_logger.warning(f'{item.get_basename()} has a certificate message')

tag = f'infoleak:automatic-detection="certificate";{item.get_id()}'
tag = 'infoleak:automatic-detection="certificate"'
self.add_message_to_queue(message=tag, queue='Tags')
# find = True

if KeyEnum.RSA_PRIVATE_KEY.value in content:
self.redis_logger.warning(f'{item.get_basename()} has a RSA private key message')
print('rsa private key message found')

tag = f'infoleak:automatic-detection="rsa-private-key";{item.get_id()}'
tag = 'infoleak:automatic-detection="rsa-private-key"'
self.add_message_to_queue(message=tag, queue='Tags')
# find = True

if KeyEnum.PRIVATE_KEY.value in content:
self.redis_logger.warning(f'{item.get_basename()} has a private key message')
print('private key message found')

tag = f'infoleak:automatic-detection="private-key";{item.get_id()}'
tag = 'infoleak:automatic-detection="private-key"'
self.add_message_to_queue(message=tag, queue='Tags')
# find = True

if KeyEnum.ENCRYPTED_PRIVATE_KEY.value in content:
self.redis_logger.warning(f'{item.get_basename()} has an encrypted private key message')
print('encrypted private key message found')

tag = f'infoleak:automatic-detection="encrypted-private-key";{item.get_id()}'
tag = 'infoleak:automatic-detection="encrypted-private-key"'
self.add_message_to_queue(message=tag, queue='Tags')
# find = True

if KeyEnum.OPENSSH_PRIVATE_KEY.value in content:
self.redis_logger.warning(f'{item.get_basename()} has an openssh private key message')
print('openssh private key message found')

tag = f'infoleak:automatic-detection="private-ssh-key";{item.get_id()}'
tag = 'infoleak:automatic-detection="private-ssh-key"'
self.add_message_to_queue(message=tag, queue='Tags')
# find = True

if KeyEnum.SSH2_ENCRYPTED_PRIVATE_KEY.value in content:
self.redis_logger.warning(f'{item.get_basename()} has an ssh2 private key message')
print('SSH2 private key message found')

tag = f'infoleak:automatic-detection="private-ssh-key";{item.get_id()}'
tag = 'infoleak:automatic-detection="private-ssh-key"'
self.add_message_to_queue(message=tag, queue='Tags')
# find = True

if KeyEnum.OPENVPN_STATIC_KEY_V1.value in content:
self.redis_logger.warning(f'{item.get_basename()} has an openssh private key message')
print('OpenVPN Static key message found')

tag = f'infoleak:automatic-detection="vpn-static-key";{item.get_id()}'
tag = 'infoleak:automatic-detection="vpn-static-key"'
self.add_message_to_queue(message=tag, queue='Tags')
# find = True

if KeyEnum.DSA_PRIVATE_KEY.value in content:
self.redis_logger.warning(f'{item.get_basename()} has a dsa private key message')

tag = f'infoleak:automatic-detection="dsa-private-key";{item.get_id()}'
tag = 'infoleak:automatic-detection="dsa-private-key"'
self.add_message_to_queue(message=tag, queue='Tags')
# find = True

if KeyEnum.EC_PRIVATE_KEY.value in content:
self.redis_logger.warning(f'{item.get_basename()} has an ec private key message')

tag = f'infoleak:automatic-detection="ec-private-key";{item.get_id()}'
tag = 'infoleak:automatic-detection="ec-private-key"'
self.add_message_to_queue(message=tag, queue='Tags')
# find = True

if KeyEnum.PUBLIC_KEY.value in content:
self.redis_logger.warning(f'{item.get_basename()} has a public key message')

tag = f'infoleak:automatic-detection="public-key";{item.get_id()}'
tag = 'infoleak:automatic-detection="public-key"'
self.add_message_to_queue(message=tag, queue='Tags')
# find = True

Expand Down

0 comments on commit d7c8262

Please sign in to comment.