Exemplo n.º 1
0
def pblack(text, send='\n'):
    print("\033[38;2;{};{};{}m{} \033[38;2;255;255;255m".format(
        21, 25, 244, text),
          end=send)
    flog(text)
    olog(text)
Exemplo n.º 2
0
def pgreen(text, send='\n'):
    print("\033[38;2;{};{};{}m{} \033[38;2;255;255;255m".format(
        11, 110, 110, text),
          end=send)
    olog(text)
    flog(text)
Exemplo n.º 3
0
			id = re.sub('[^a-z0-9A-Z]', '_', desc).replace('__', '_') + '_' + str_id_generator(size=6)
			id_clean = re.sub('[^a-z0-9A-Z]', '_', desc)
			if signs.get(id_clean, None) is None:
				signs[id_clean] = 0
			signs[id_clean] += 1
			sign = '{' + re.sub(r'[^A-F0-9 \?]', '', sign).replace('  ', '') + '}'
			bad = sign_length % 2

			print(f'{id}: {desc} {len(sign) / 2:.0f} bytes [{bad}] from [{initial_sign}]')

			if bad:
				print(f'bad sign')
				continue

			filename = id + '_x' + repr(signs[id_clean])
			olog(f'id: {filename}')
			try:
				include_file.write(f'include "peid_rules/{filename}.rule"' + "\n")
			except Exception as e:
				print(f'write error: {e}')

			with open(f'peid_rules/{filename}.rule', 'w') as file:
				file.write(f'rule _{id}\n'
				           '{\r\n'
				           '\tmeta:\n'
				           f'\t\tdescription = "{desc}"\r\n'
				           '\tstrings:\n'
				           f'\t\t$a = {sign}\r\n'
				           '\tcondition:\n'
				           '\t\t$a in (entrypoint..entrypoint + 11111110)\r\n'
				           '}' + '\r\n')
Exemplo n.º 4
0
def pred(text):
    print("\033[38;2;{};{};{}m{} \033[38;2;255;255;255m".format(
        255, 0, 0, text))
    olog(text)
    flog(text)
Exemplo n.º 5
0
def pblack(text):
	print("\033[38;2;{};{};{}m{} \033[38;2;255;255;255m".format(21, 25, 244, text))
	flog(text)
	olog(text)