Ejemplo n.º 1
0
def set_tk_var():
    global dict_path_var
    dict_path_var = StringVar()
    dict_path = read_config("Dictionary", "Path", "str")
    if len(dict_path) == 0:
        dict_path = path.join(data_dir, 'pwd.txt')
    dict_path_var.set(dict_path)
    global dict_list
    dict_list = [
        dict_path,
    ]
Ejemplo n.º 2
0
def is_first_run():
    res = read_config('Run', 'first', 'boolean')
    write_config('Run', 'first', False)
    return res
Ejemplo n.º 3
0
 def __init__(self):
     self.url = str()
     self.target_obj = target.get()
     self.pro_state = state.get()
     self.req_type = read_config("Config", "Method", "str")
     self.server_type = read_config("Config", "Server", "str")
     self.shell_type = read_config("Config", "ShellType", "str")
     self.para_num = read_config("Config", "Parameter", "int")
     self.thread_num = read_config("Config", "ThreadNumber", "int")
     self.req_delay = read_config("Config", "RequestDelay", "float")
     self.time_out = read_config("Config", "RequestTimeout", "float")
     self.rand_ua = read_config("Config", "RandomUserAgent", "boolean")
     self.con_close = read_config("Config", "ConnectionClose", "boolean")
     self.keep_alive = read_config("Config", "KeepAlive0", "boolean")
     self.cus_hdr = read_config("Config", "CustomRequestHeader", "boolean")
     self.cus_hdr_data = read_config("Config", "CustomRequestHeaderData",
                                     "str")
     self.dict_path = read_config("Dictionary", "Path", "str")
     self.use_proxy = read_config("Proxy", "proxy", "boolean")
Ejemplo n.º 4
0
def set_tk_var():
    global method
    method = StringVar()
    method.set(read_config("Config", "Method", "str"))
    global server
    server = StringVar()
    server.set(read_config("Config", "Server", "str"))
    global shelltype
    shelltype = StringVar()
    shelltype.set(read_config("Config", "ShellType", "str"))
    global parameter
    parameter = StringVar()
    parameter.set(read_config("Config", "Parameter", "str"))
    global thread_num
    thread_num = IntVar()
    thread_num.set(read_config("Config", "ThreadNumber", "int"))
    global req_delay
    req_delay = DoubleVar()
    req_delay.set(read_config("Config", "RequestDelay", "float"))
    global time_out
    time_out = DoubleVar()
    time_out.set(read_config("Config", "RequestTimeout", "float"))
    global random_ua
    random_ua = BooleanVar()
    random_ua.set(read_config("Config", "RandomUserAgent", "boolean"))
    global con_close
    con_close = BooleanVar()
    con_close.set(read_config("Config", "ConnectionClose", "boolean"))
    global keep_alive
    keep_alive = BooleanVar()
    keep_alive.set(read_config("Config", "KeepAlive0", "boolean"))
    global custom_hdr
    custom_hdr = BooleanVar()
    custom_hdr.set(read_config("Config", "CustomRequestHeader", "boolean"))
    global custom_hdr_data
    custom_hdr_data = StringVar()
    custom_hdr_data.set(read_config("Config", "CustomRequestHeaderData", "str"))