projects
/
goodfet
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
updated features for two different types of sniffing. fixed and scrolling. This can...
[goodfet]
/
client
/
GoodFETCCSPI.py
diff --git
a/client/GoodFETCCSPI.py
b/client/GoodFETCCSPI.py
index
d55af3c
..
518add3
100644
(file)
--- a/
client/GoodFETCCSPI.py
+++ b/
client/GoodFETCCSPI.py
@@
-136,6
+136,12
@@
class GoodFETCCSPI(GoodFET):
print "ERROR: Forgot to set the key.";
return;
print "ERROR: Forgot to set the key.";
return;
+ def RF_setnonce(self,key):
+ """Sets the first key for encryption to the given argument."""
+ print "ERROR: Forgot to set the nonce.";
+
+ return;
+
def RF_setfreq(self,frequency):
"""Set the frequency in Hz."""
mhz=frequency/1000000;
def RF_setfreq(self,frequency):
"""Set the frequency in Hz."""
mhz=frequency/1000000;
@@
-204,6
+210,13
@@
class GoodFETCCSPI(GoodFET):
return None;
return buffer;
return None;
return buffer;
+ def RF_rxpacketrepeat(self):
+ """Gets packets from the radio, ignoring all future requests so as
+ not to waste time. Call RF_rxpacket() after this."""
+
+ self.writecmd(self.CCSPIAPP,0x91,0,None);
+ return None;
+
def RF_rxpacketdec(self):
"""Get and decrypt a packet from the radio. Returns None if
none is waiting."""
def RF_rxpacketdec(self):
"""Get and decrypt a packet from the radio. Returns None if
none is waiting."""
@@
-351,11
+364,13
@@
class GoodFETCCSPI(GoodFET):
self.poke(0x03,choice);
self.maclen=len;
def printpacket(self,packet,prefix="#"):
self.poke(0x03,choice);
self.maclen=len;
def printpacket(self,packet,prefix="#"):
+ print self.packet2str(packet,prefix);
+ def packet2str(self,packet,prefix="#"):
s="";
i=0;
for foo in packet:
s="%s %02x" % (s,ord(foo));
s="";
i=0;
for foo in packet:
s="%s %02x" % (s,ord(foo));
-
print
"%s%s" % (prefix,s);
+
return
"%s%s" % (prefix,s);
def printdissect(self,packet):
try:
def printdissect(self,packet):
try: