diff --git a/.gitignore b/.gitignore index 2462003..d6278f5 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ HCPBridge/.vscode Investigation/bussniffer/tools/opendooralert/opendooralert.py.bak +tools/opendooralert/opendooralert.py.bak diff --git a/Hardware/ RS485 Converter/UART TTL to RS485.pdf b/Hardware/ RS485 Converter/UART TTL to RS485.pdf new file mode 100644 index 0000000..54a80fb Binary files /dev/null and b/Hardware/ RS485 Converter/UART TTL to RS485.pdf differ diff --git a/Hardware/Relay Board/Board Connectors.PNG b/Hardware/Relay Board/Board Connectors.PNG new file mode 100644 index 0000000..2b4f91d Binary files /dev/null and b/Hardware/Relay Board/Board Connectors.PNG differ diff --git a/Hardware/Relay Board/komponenten.PNG b/Hardware/Relay Board/komponenten.PNG new file mode 100644 index 0000000..11fa545 Binary files /dev/null and b/Hardware/Relay Board/komponenten.PNG differ diff --git a/Hardware/Relay Board/wifi_relay_sch.jpg b/Hardware/Relay Board/wifi_relay_sch.jpg new file mode 100644 index 0000000..ba57ed2 Binary files /dev/null and b/Hardware/Relay Board/wifi_relay_sch.jpg differ diff --git a/Investigation/records/dump.zip b/Investigation/records/dump.zip new file mode 100644 index 0000000..26e8cd6 Binary files /dev/null and b/Investigation/records/dump.zip differ diff --git a/Investigation/tools/checkcrc.py b/Investigation/tools/checkcrc.py new file mode 100644 index 0000000..119f5f9 --- /dev/null +++ b/Investigation/tools/checkcrc.py @@ -0,0 +1,23 @@ +def calc_crc(data): + crc = 0xFFFF + for pos in data: + crc ^= pos + for i in range(8): + if ((crc & 1) != 0): + crc >>= 1 + crc ^= 0xA001 + else: + crc >>= 1 + return crc + +def checkLine(l): + data = bytearray.fromhex(l) + crc = calc_crc(data[:len(data)-2]) + return str(crc == int.from_bytes(data[-2:],byteorder='little', signed=False)) + #return "%04X %04X"%(crc,int.from_bytes(data[-2:],byteorder='little', signed=False)) + + +with open("scan.txt") as f: + for line in f: + if len(line.strip()) > 0: + print(line.strip() + "\t" + checkLine(line.strip())) \ No newline at end of file diff --git a/Investigation/tools/print.py b/Investigation/tools/print.py new file mode 100644 index 0000000..b707033 --- /dev/null +++ b/Investigation/tools/print.py @@ -0,0 +1,15 @@ +f=open("dump2.bin","rb") +def DataToHex(data): + res = "" + for c in data: + res+=("%02X " % c) + return res + +while True: + len = ord(f.read(1)) + timestamp1 = f.read(2) + timestamp2 = f.read(2) + data = f.read(len) + print("%d:%d:%04X: %s" % (timestamp1[0]<<8|timestamp1[1],timestamp2[0]<<8|timestamp2[1], len,DataToHex(data))) + +f.close() diff --git a/Investigation/bussniffer/tools/opendooralert/opendooralert.py b/tools/opendooralert/opendooralert.py similarity index 100% rename from Investigation/bussniffer/tools/opendooralert/opendooralert.py rename to tools/opendooralert/opendooralert.py diff --git a/Investigation/bussniffer/tools/opendooralert/pushnotifier/PushNotifier.py b/tools/opendooralert/pushnotifier/PushNotifier.py similarity index 100% rename from Investigation/bussniffer/tools/opendooralert/pushnotifier/PushNotifier.py rename to tools/opendooralert/pushnotifier/PushNotifier.py diff --git a/Investigation/bussniffer/tools/opendooralert/pushnotifier/__init__.py b/tools/opendooralert/pushnotifier/__init__.py similarity index 100% rename from Investigation/bussniffer/tools/opendooralert/pushnotifier/__init__.py rename to tools/opendooralert/pushnotifier/__init__.py diff --git a/Investigation/bussniffer/tools/opendooralert/pushnotifier/__pycache__/PushNotifier.cpython-37.pyc b/tools/opendooralert/pushnotifier/__pycache__/PushNotifier.cpython-37.pyc similarity index 100% rename from Investigation/bussniffer/tools/opendooralert/pushnotifier/__pycache__/PushNotifier.cpython-37.pyc rename to tools/opendooralert/pushnotifier/__pycache__/PushNotifier.cpython-37.pyc diff --git a/Investigation/bussniffer/tools/opendooralert/pushnotifier/__pycache__/__init__.cpython-37.pyc b/tools/opendooralert/pushnotifier/__pycache__/__init__.cpython-37.pyc similarity index 100% rename from Investigation/bussniffer/tools/opendooralert/pushnotifier/__pycache__/__init__.cpython-37.pyc rename to tools/opendooralert/pushnotifier/__pycache__/__init__.cpython-37.pyc diff --git a/Investigation/bussniffer/tools/opendooralert/pushnotifier/__pycache__/exceptions.cpython-37.pyc b/tools/opendooralert/pushnotifier/__pycache__/exceptions.cpython-37.pyc similarity index 100% rename from Investigation/bussniffer/tools/opendooralert/pushnotifier/__pycache__/exceptions.cpython-37.pyc rename to tools/opendooralert/pushnotifier/__pycache__/exceptions.cpython-37.pyc diff --git a/Investigation/bussniffer/tools/opendooralert/pushnotifier/exceptions.py b/tools/opendooralert/pushnotifier/exceptions.py similarity index 100% rename from Investigation/bussniffer/tools/opendooralert/pushnotifier/exceptions.py rename to tools/opendooralert/pushnotifier/exceptions.py diff --git a/Investigation/bussniffer/tools/opendooralert/readme.txt b/tools/opendooralert/readme.txt similarity index 100% rename from Investigation/bussniffer/tools/opendooralert/readme.txt rename to tools/opendooralert/readme.txt diff --git a/Investigation/bussniffer/tools/opendooralert/runme.sh b/tools/opendooralert/runme.sh similarity index 100% rename from Investigation/bussniffer/tools/opendooralert/runme.sh rename to tools/opendooralert/runme.sh