mirror of
https://github.com/jokob-sk/NetAlertX.git
synced 2025-12-07 09:36:05 -08:00
Events, CurrentScan, pluginsState, ENABLE_PLUGINS work
This commit is contained in:
@@ -74,10 +74,12 @@ def print_log (pText):
|
||||
# textchars = bytearray({7,8,9,10,12,13,27} | set(range(0x20, 0x100)) - {0x7f})
|
||||
# is_binary_string = lambda bytes: bool(bytes.translate(None, textchars))
|
||||
|
||||
def append_file_binary (pPath, input):
|
||||
file = open (pPath, 'ab')
|
||||
file.write (input)
|
||||
file.close()
|
||||
def append_file_binary(file_path, input_data):
|
||||
with open(file_path, 'ab') as file:
|
||||
if isinstance(input_data, str):
|
||||
input_data = input_data.encode('utf-8') # Encode string as bytes
|
||||
file.write(input_data)
|
||||
|
||||
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user