Cost: 0%
LastResort is part of the Warmup - PlanB - LastResort trilogy and it's conceptually similar to the previous challenges. At the beginning of the challenge we are provided with the firmware and the assembly
| # Dark 256 color solarized theme for the color GNU ls utility. | |
| # Used and tested with dircolors (GNU coreutils) 8.5 | |
| # | |
| # @author {@link http://sebastian.tramp.name Sebastian Tramp} | |
| # @license http://sam.zoy.org/wtfpl/ Do What The Fuck You Want To Public License (WTFPL) | |
| # | |
| # More Information at | |
| # https://github.com/seebi/dircolors-solarized |
| import requests | |
| import pprint | |
| API_BASE = 'https://www.censys.io/api/v1/{}' | |
| API_AUTH = ('API_ID', 'SECRET') | |
| def call(base, query): | |
| results = [] | |
| page_id = 1 |
| <!doctype html> | |
| <html lang="en"> | |
| <head> | |
| <title>cyberlympics</title> | |
| <meta name="generator" content="Etherpad"> | |
| <meta name="author" content="Etherpad"> | |
| <meta name="changedby" content="Etherpad"> | |
| <meta charset="utf-8"> | |
| <style> | |
| * { |
| import sys | |
| import os, stat | |
| import fileinput | |
| def fixperm(path): | |
| mode = os.stat(path)[stat.ST_MODE] | |
| perm = mode & stat.S_IRWXU & (~stat.S_IWUSR) | |
| mode |= mode & (~stat.S_IRWXG) | (perm >> 3) | |
| mode |= mode & (~stat.S_IRWXO) | (perm >> 6) | |
| print(oct(mode), path) |
| import java.util.Random; | |
| import java.util.Arrays; | |
| class FisherYates { | |
| public static <T> void shuffle(Random random, T[] array) { | |
| shufflePartial(random, array, 1.0f); | |
| } | |
| public static <T> void shufflePartial(Random random, T[] array, double fudge) { | |
| assert(fudge >= 0.0f && fudge <= 1.0f); |
| import subprocess | |
| import functools | |
| import itertools | |
| import pprint | |
| def transpose(table, fillvalue=None): | |
| return itertools.zip_longest(*table, fillvalue=fillvalue) | |
| def fwf_format(table): | |
| widths = [max([len(row) for row in col]) |
| \documentclass{standalone} | |
| \usepackage{pgf,pgffor} | |
| \newcommand{\nth}[2]{ | |
| \foreach \x [count=\k] in #1 { | |
| \ifnum\k=#2 | |
| \x | |
| \fi | |
| } | |
| } |
| from pykeyboard import PyKeyboard | |
| from inputs import get_gamepad | |
| import time, math | |
| import threading | |
| kbd = PyKeyboard() | |
| tmax = 0.1 | |
| tmin = 0.02 | |
| curr = 0 |
| #!/usr/bin/python | |
| from subprocess import check_output | |
| from time import sleep | |
| import click, sys | |
| def is_interface_up(iface): | |
| try: | |
| return b'state DOWN' not in check_output(["/usr/bin/ip", "link", "show", "dev", iface]) and \ | |
| b'inet' in check_output(["/usr/bin/ip", "addr", "show", "dev", iface]) |