Advertisement
dhruvag2000

dataBaseWriter.py

Mar 23rd, 2022
116
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 1.42 KB | None | 0 0
  1. """
  2. This program just helps store the RFID Cards data into a binary file which will not be normally readable to a user using basic text editors.
  3. Written by- Dhruva for BP
  4. """
  5.  
  6. some_bytes = bytearray(b'\xb3\xad\xc0\xa3')
  7. file = open("rfidBinDatabase", "ab")
  8. # Write bytes to file
  9. # some_bytes = bytearray(byte_arr)
  10. immutable_bytes = bytes(some_bytes)
  11. # file.seek(file.tell() + 4)
  12. file.write(immutable_bytes)
  13. file.close()
  14.  
  15. # byte_arr = bytearray(b'\x83i\xbe\xa3')
  16. # file = open("rfidBinDatabase", "ab")
  17. # # Write bytes to file
  18. # some_bytes = bytearray(byte_arr)
  19. # immutable_bytes = bytes(some_bytes)
  20. # # file.seek(file.tell() + 4)
  21. # file.write(immutable_bytes)
  22. # file.close()
  23.  
  24. some_bytes = bytearray(b'\x03U\xd5\xa3')
  25. file = open("rfidBinDatabase", "ab")
  26. # Write bytes to file
  27. # some_bytes = bytearray(some_bytes)
  28. immutable_bytes = bytes(some_bytes)
  29. # file.seek(file.tell() + 4)
  30. file.write(immutable_bytes)
  31. file.close()
  32.  
  33. some_bytes = bytearray(b'\x03\x83\xb7\xa3')
  34. file = open("rfidBinDatabase", "ab")
  35. # Write bytes to file
  36. # some_bytes = bytearray(some_bytes)
  37. immutable_bytes = bytes(some_bytes)
  38. # file.seek(file.tell() + 4)
  39. file.write(immutable_bytes)
  40. file.close()
  41.  
  42. some_bytes = bytearray(b'3\x17\xc2\xa3')
  43. file = open("rfidBinDatabase", "ab")
  44. # Write bytes to file
  45. # some_bytes = bytearray(some_bytes)
  46. immutable_bytes = bytes(some_bytes)
  47. # file.seek(file.tell() + 4)
  48. file.write(immutable_bytes)
  49. file.close()
  50.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement