Corrected spelling of 'disset' for the CCSPI/scapy stuff.
authortravisutk <travisutk@12e2690d-a6be-4b82-a7b7-67c4a43b65c8>
Wed, 23 Feb 2011 18:35:26 +0000 (18:35 +0000)
committertravisutk <travisutk@12e2690d-a6be-4b82-a7b7-67c4a43b65c8>
Wed, 23 Feb 2011 18:35:26 +0000 (18:35 +0000)
git-svn-id: https://svn.code.sf.net/p/goodfet/code/trunk@942 12e2690d-a6be-4b82-a7b7-67c4a43b65c8

client/GoodFETCCSPI.py
client/goodfet.ccspi

index fbf944f..df53dac 100644 (file)
@@ -272,11 +272,14 @@ class GoodFETCCSPI(GoodFET):
         for foo in packet:
             s="%s %02x" % (s,ord(foo));
         print "#%s" % s;
-    def printdisect(self,packet):
+    def printdissect(self,packet):
         try:
             from scapy.all import Dot15d4
         except ImportError:
             print "To use packet disection, Scapy must be installed and have the Dot15d4 extension present."
         self.printpacket(packet)
-        scapyd = Dot15d4(packet)
-        print scapyd.show()
+        try:
+            scapyd = Dot15d4(packet)
+            print scapyd.show()
+        except:
+            pass;
index 2c1590c..9d1cb87 100755 (executable)
@@ -23,7 +23,7 @@ if(len(sys.argv)==1):
     
     print "\n%s rssi" % sys.argv[0];
     print "%s sniff" % sys.argv[0];
-    print "%s sniffdisect" % sys.argv[0];
+    print "%s sniffdissect" % sys.argv[0];
     
     sys.exit();
 
@@ -84,7 +84,7 @@ if(sys.argv[1]=="rssi"):
         for foo in range(0,rssi>>2):
             string=("%s."%string);
         print "%02x %04i %s" % (rssi,rssi, string); 
-if(sys.argv[1]=="sniff" or sys.argv[1]=="sniffdisect"):
+if(sys.argv[1]=="sniff" or sys.argv[1]=="sniffdissect"):
     #Promiscuous mode.
     client.RF_promiscuity(1);
     
@@ -102,8 +102,8 @@ if(sys.argv[1]=="sniff" or sys.argv[1]=="sniffdisect"):
         packet=None;
         while packet==None:
             packet=client.RF_rxpacket();
-        if sys.argv[1]=="sniffdisect":
-            client.printdisect(packet);
+        if sys.argv[1]=="sniffdissect":
+            client.printdissect(packet);
         else:
             client.printpacket(packet);
         sys.stdout.flush();