#!/usr/bin/env python # # Convert Verisure node Name to node ID # By Jerome Nokin (http://funoverip.net / @funoverip) # import sys, os sys.path.append(os.path.join(os.path.dirname(__file__), "..", "lib")) from securitas_name_convert import id2name, name2id if __name__ == "__main__": if len(sys.argv) != 2: print "Usage: %s <name>" % sys.argv[0] print "Ex: %s '262E 9BV7'" % sys.argv[0] sys.exit(0) nodename = sys.argv[1] nodeid = name2id(nodename) print "Name: %s" % nodename print "Id : %08x" % nodeid
vbox_id_as_str='' vbox_id=0 vbox_name='' if not (args.nodename or args.nodeid) or (args.nodename and args.nodeid): print "Error. You must provide the name (-n) OR the id (-i) of your Vbox" sys.exit(0) if args.nodeid: vbox_id_as_str = unhexlify(args.nodeid) vbox_id_as_str = vbox_id_as_str[3] + vbox_id_as_str[2] + vbox_id_as_str[1] + vbox_id_as_str[0] vbox_id = long(args.nodeid, 16) vbox_name = id2name(vbox_id) if args.nodename: vbox_name = args.nodename vbox_id = name2id(vbox_name) vbox_id_as_str = name2id_as_str(vbox_name) vbox_id_as_str = vbox_id_as_str[3] + vbox_id_as_str[2] + vbox_id_as_str[1] + vbox_id_as_str[0] # Testing dumpfile arg dumpfile = args.file try: dumpfile_size = os.path.getsize(dumpfile) except: print "ERROR while opening %s" % dumpfile sys.exit(0) print "[*] Provided arguments:" print " Dumpfile : %s" % dumpfile
#!/usr/bin/env python # # Convert Verisure node Name to node ID # By Jerome Nokin (http://funoverip.net / @funoverip) # import sys, os sys.path.append(os.path.join(os.path.dirname(__file__), '..', 'lib')) from securitas_name_convert import id2name, name2id if __name__ == '__main__': if len(sys.argv) != 2: print "Usage: %s <name>" % sys.argv[0] print "Ex: %s '262E 9BV7'" % sys.argv[0] sys.exit(0) nodename = sys.argv[1] nodeid = name2id(nodename) print "Name: %s" % nodename print "Id : %08x" % nodeid