X-Git-Url: http://git.rot13.org/?p=goodfet;a=blobdiff_plain;f=client%2Fgoodfet.maxusbhost;h=feba1e134f53b16c770974a9e09cca3b5c5693d7;hp=4cfaece7643f96dc2e38b02d92114e37345f1083;hb=0c1cae929512565296940bf6322087a73b2cecd0;hpb=4d946fbe1f007d6d44960ed38784593ae64d603d diff --git a/client/goodfet.maxusbhost b/client/goodfet.maxusbhost index 4cfaece..feba1e1 100755 --- a/client/goodfet.maxusbhost +++ b/client/goodfet.maxusbhost @@ -7,9 +7,16 @@ import sys; import binascii; import array; import time; +import warnings from GoodFETMAXUSB import GoodFETMAXUSBHost; +warnings.warn( +"""The libraries upon which this program depends will soon be deprecated in +favor of the USB*.py libraries. The new libraries do not yet support host +mode, but an example will be written and documented when they do.""" +) + if(len(sys.argv)==1): print "Usage: %s verb [objects]\n" % sys.argv[0]; print "%s info" % sys.argv[0]; @@ -25,6 +32,7 @@ client.serInit() client.MAXUSBsetup(); client.hostinit(); +client.usbverbose=False; if(sys.argv[1]=="info"): client.hostrun(); @@ -34,8 +42,9 @@ if(sys.argv[1]=="allstrings"): client.detect_device(); time.sleep(0.2); client.enumerate_device(); - for foo in range(1,40): + for foo in range(1,255): print "Grabbing string at index=%i" % foo; string=client.getDescriptorString(foo); - print "Strings[%i]=%s" % (foo,string); + if string!=None: + print "Strings[%i]=%s" % (foo,string); sys.stdout.flush();