コード例 #1
0
def remove_flag_17():
    common.rm(common.get_script_path(17))
    common.rm(common.FLAG_FILE_17_INPUT_FILE)
コード例 #2
0
def remove_flag_14():
    common.rm(common.get_script_path(14))
コード例 #3
0
def remove_flag_16():
    common.rm(common.get_script_path(16))
コード例 #4
0
def remove_flag_12():
    common.rm(common.get_script_path(12))
    common.rmdir(common.FLAG_12_DIRECTORY)
コード例 #5
0
def remove_flag_13():
    common.rm(common.get_script_path(13))
    common.rm(common.FLAG_13_THING_1)
    common.rm(common.FLAG_13_THING_2)
コード例 #6
0
def remove_flag_10():
    common.rm(common.FLAG_FILE_10_ORIGINAL_PATH)
    common.rm(common.FLAG_FILE_10_DESIRED_PATH)
    common.rm(common.get_script_path(10))
    common.rmdir(common.FLAG_10_DIRECTORY)
コード例 #7
0
def remove_flag_11():
    common.rm(common.get_script_path(11))
    common.rm(common.FLAG_11_BOULDER)
コード例 #8
0
def remove_flag_23():
    common.rm(common.get_script_path(23))
コード例 #9
0
def remove_flag_24():
    common.rm(common.get_script_path(24))
コード例 #10
0
def stage_flag_17():
    common.create_script(common.get_script_path(17), obfuscate_shell_script(generate_flag_17_script_contents()))
    common.write_to_file(common.FLAG_FILE_17_INPUT_FILE, "Here is the 'typo'.\nPlease remove it to get to the flag.")
コード例 #11
0
def stage_flag_24():
    # Deliberately only obfuscate part of this script
    common.create_script(common.get_script_path(24), generate_flag_24_script_contents())
コード例 #12
0
def stage_flag_16():
    # Note: we are deliberately writting to the file without execute permissions (since getting the script to execute is the goal of the exercise)
    common.write_to_file(common.get_script_path(16), obfuscate_shell_script(generate_flag_16_script_contents()))
コード例 #13
0
def stage_flag_13():
    common.write_to_file(common.FLAG_13_THING_1, "This is a Thing")
    common.create_script(common.get_script_path(13), obfuscate_shell_script(generate_flag_13_script_contents()))
コード例 #14
0
def stage_flag_12():
    common.mkdir(common.FLAG_12_DIRECTORY)
    common.create_script(common.get_script_path(12), obfuscate_shell_script(generate_flag_12_script_contents()))
コード例 #15
0
def stage_flag_11():
    common.write_to_file(common.FLAG_11_BOULDER, "This is a boulder")
    common.create_script(common.get_script_path(11), obfuscate_shell_script(generate_flag_11_script_contents()))
コード例 #16
0
def stage_flag_10():
    common.mkdir(common.FLAG_10_DIRECTORY)
    common.write_to_file(common.FLAG_FILE_10_ORIGINAL_PATH, get_hint_for_flag(10))
    common.create_script(common.get_script_path(10), obfuscate_shell_script(generate_flag_10_script_contents()))