10 def bladecode(filename):
11 with open(filename, 'rb') as csvfile:
12 spamreader = csv.reader(csvfile, delimiter=',', quotechar='"')
18 for row in spamreader:
26 #print row[0]+"-"+row[10]
27 #print str(int((float(row[1])-float(last[1]))*10))+"-"+str(int(row[10])-int(last[10]))
28 #print " "+str(unichr(int(row[10])-int(last[10])+ord('A'))),
29 va = str(int((float(row[1])-float(last[1]))*10))
30 if va not in ["0","1"]:
31 #print "error: "+va+row[0]+"-"+row[10]
40 # print "dec: "+binascii.unhexlify('%x' % n)
41 print " "+binascii.unhexlify('%x' % n),
47 if __name__ == "__main__":
48 def signal_handler(signal, frame):
49 print('SIG received. exitting!')
51 signal.signal(signal.SIGINT, signal_handler)
53 bladecode("dump_selected_udp_single_src_port_dehexed.csv")