def run_cmd(self): print " " print " Modems Availables" print " -----------------" mm = ModemManager() try: modems = mm.EnumerateDevices() except: print "Are you sure that MManager is running ??" sys.exit(0) if len(modems) == 0: print " No modems availables" if self.options.verbose == False: for m in modems: print " * %s" % m else: for m in modems: print " * %s" % m for prop in [ "Device", "Driver", "Type", "UnlockRequired", "UnLockRetries" ]: print " - %s -> %s" % (prop, m[prop]) print " - Imsi -> %s" % m.iface["gsm.card"].GetImsi() print " - Imei -> %s" % m.iface["gsm.card"].GetImei() print "" print ""
def run_cmd(self): mm = ModemManager() if len(self.args) == 2 : c = mm.EnumerateDevices()[self.options.modem].iface["gsm.card"] if c != None: c.SendPin(self.args[1]) sys.exit(0) self.parser.print_usage()
def run_cmd(self): mm = ModemManager() if len(self.args) == 3 : c = mm.EnumerateDevices()[self.options.modem].iface["gsm.sms"] if c != None: c.Send({ "number" : self.args[1], "text" : self.args[2] }) sys.exit(0) self.parser.print_usage()
def run_cmd(self): mm = ModemManager() if len(self.args) == 2 : c = mm.EnumerateDevices()[self.options.modem].iface["gsm.sms"] if c != None: from pprint import pprint list = c.Delete(int(self.args[1])) sys.exit(0) self.parser.print_usage()
def run_cmd(self): mm = ModemManager() if len(self.args) == 1: c = mm.EnumerateDevices()[self.options.modem].iface["gsm.sms"] if c != None: from pprint import pprint list = c.List() for msg in list: print "%s: (from:%s) '%s'" % (msg["index"], msg["number"], msg["text"]) sys.exit(0) self.parser.print_usage()
def run_cmd(self): mm = ModemManager() if len(self.args) == 1: c = mm.EnumerateDevices()[self.options.modem].iface["gsm.network"] if c != None: list = [] from pprint import pprint print "Please wait ...." list = c.Scan(timeout=20000) for item in list: print "[%s]" % item["operator-num"] for x in item.keys(): print " %s: %s" % (x, item[x]) sys.exit(0) self.parser.print_usage()