示例#1
0
def interpreter():
    while True:
        state, connection = get_state()

        points = ciu.ciu_points()

        print_cmd_prompts(state, connection, points)

        try:
            input = raw_input
        except NameError:
            pass

        cmd = input("command?: ")

        index = int_value(cmd)

        if index:
            password = ""
            if points[index-1]['security'] == 'encrypted':
                password = getpass('password: '******'ssid'], password)
        elif cmd == 'm':
            ssid = input("ssid?: ")
            password = getpass('password (if required)?: ')
            do_connect(ssid, password)
        else:
            try:
                commands[cmd].fn(connection)
            except KeyError:
                print("\nInvalid command\n")
示例#2
0
def interpreter():
    while True:
        state, connection = get_state()

        points = ciu.ciu_points()

        print_cmd_prompts(state, connection, points)

        cmd = raw_input("command?: ")

        index = int_value(cmd)

        if index:
            password = ""
            if points[index-1]['security'] == 'encrypted':
                password = getpass('password: '******'ssid'], password)
        elif cmd == 'm':
            ssid = raw_input("ssid?: ")
            password = getpass('password (if required)?: ')
            do_connect(ssid, password)
        else:
            ciu.ciu_activity()
            try:
                commands[cmd].fn(connection)
            except KeyError:
                print("\nInvalid command\n")
示例#3
0
def interpreter():
    while True:
        state, connection = get_state()

        points = ciu.ciu_points()

        print_cmd_prompts(state, connection, points)

        cmd = raw_input("command?: ")

        index = int_value(cmd)

        if index:
            password = ""
            if points[index - 1]['security'] == 'encrypted':
                password = getpass('password: '******'ssid'], password)
        else:
            ciu.ciu_activity()
            try:
                commands[cmd].fn(connection)
            except KeyError:
                print "\nInvalid command\n"
示例#4
0
def index():
    points = ciu.ciu_points()
    for point in points:
        point['ssid_encoded'] = urllib.quote_plus(point['ssid'])
    return render_template("index.html", points=points)
示例#5
0
def index():
    points = ciu.ciu_points()
    return render_template("index.html", points=points)
示例#6
0
    def index(self):
        tmpl = env.get_template('index.html')

        points = ciu.ciu_points()

        return tmpl.render(points=points)