summaryrefslogtreecommitdiff
path: root/logical_operators/or.py
diff options
context:
space:
mode:
Diffstat (limited to 'logical_operators/or.py')
-rw-r--r--logical_operators/or.py18
1 files changed, 0 insertions, 18 deletions
diff --git a/logical_operators/or.py b/logical_operators/or.py
deleted file mode 100644
index acc8c62..0000000
--- a/logical_operators/or.py
+++ /dev/null
@@ -1,18 +0,0 @@
-from sys import argv
-
-# Read two files as byte arrays
-file1_b = bytearray(open(argv[1], 'rb').read())
-file2_b = bytearray(open(argv[2], 'rb').read())
-
-# Set the length to be the smaller one
-size = len(file1_b) if len(file1_b) < len(file2_b) else len(file2_b)
-ord_byte_array = bytearray(size)
-
-# OR between the files
-for i in range(size):
- ord_byte_array[i] = file1_b[i] | file2_b[i]
-
-# Write the ANDd bytes to the output file
-open(argv[3], 'wb').write(ord_byte_array)
-
-print (f"[*] {argv[1]} OR {argv[2]}\n[*] Saved to \033[1;33m{argv[3]}\033[1;m.")