-i -F 315000000
CovertError opened this issue · comments
I had issues with this option whenever I press on the remote button it would crash and give me
Traceback (most recent call last):
File "RFCrack.py", line 201, in
attacks.replayLiveCapture(d, args.rolling_code, rf_settings)
File "/opt/RFCrack/src/attacks.py", line 44, in replayLiveCapture
replay_capture, signal_strength = tools.capturePayload(d,rolling_code, rf_settings)
File "/opt/RFCrack/src/RFFunctions.py", line 21, in capturePayload
signal_strength= 0 - ord(str(d.getRSSI()))
File "/usr/lib/python2.7/dist-packages/future/types/newstr.py", line 102, in new
return super(newstr, cls).new(cls, value)
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc7 in position 0: ordinal not in range(128)
Yea looks like its getting something it can't parse.. That would come down to viewing that data thats coming back and maybe adding some layer of error handling or something at that point in the code to pass it through.. But as of right now this project is on hold waiting for Python3 libraries to come out so I can update it. Right now there are only python2 libraries available.
signal_strength= 0 - ord(str(d.getRSSI()))
looks like it might be in this line
maybe comment that line out if its not being used in anything.. or put a try catch around it
Hunted down where this is used and I think i know what the issue is.. Please try replacing the code in RFFunctions at line 17 like the following and let me know if it works.. If it does fix the issue I will fix it in the code base!! use proper indentation from the image attached.. when I save this it takes away the indentation apparently.. So make sure its proper indentation for python.
From:
while True:
try:
y, z = d.RFrecv()
capture = y.encode('hex')
signal_strength= 0 - ord(str(d.getRSSI()))
except ChipconUsbTimeoutException:
pass
To:
while True:
try:
y, z = d.RFrecv()
capture = y.encode('hex')
try:
signal_strength= 0 - ord(str(d.getRSSI()))
except:
signal_strength = 0
pass
except ChipconUsbTimeoutException:
pass
Let me know if that fixes the issue.. Essentially you just adding error checking around the setting of signal strength and if it gets something funny it just accepts the error and sets the signal to 0 rather then crashing.