rendered paste body#! /usr/bin/env pythonimport subprocessimport time################## Hop Config ##################hopcfg = [1, 6, 11, 2, 7, 3, 8, 4, 9, 5, 10] #channel hopping planchs = 0 # channel hop starting postionS = 1 # time to sleep between channel hopsstop_hop = 0 #change to 1 to disable channel hoppingiface_name = '%s' % ("ath0")################# Main #################hopcfg = list(hopcfg) # change hopcfg to a listwhile stop_hop == 0: # continues the hopping loop cn = '%s' % (hopcfg[chs]) subprocess.Popen(["iwconfig", iface_name, "channel", cn]) time.sleep(S) print chs # for debugging only print "channel", cn # for debugging only if chs >= 10: chs = 0 else: chs = chs + 1