This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Level 1. Make a nasa.gov URL display a text of My Choice | |
Level 2. debfKNH1AvtBo deGH9Aq./kiSY denjFRfA8kzL2 | |
Level 3. Recognize | |
Level 4. IP address is 72.14.221.104. What contains artvЂ â € ™ That Points to IT? | |
Level 5. Password is the owlvЂ ™ s Name | |
Level 6. LetvЂ ™ s See you do some Easy SQL ninjitsu | |
Level 7. snifflog.txt â € "ngrep format | |
Level 8. Password is on a Picture: not available from Anywhere | |
Level 9. Elementary Maths | |
Level 10. A poem |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
packets = [] | |
f = open('packets', 'rb') | |
data = f.readlines() | |
f.close() | |
for line in data: | |
line = line.strip() | |
packets.append({'index': line.split('\t')[0], 'data': line.split('\t')[1]}) | |
packets = sorted(packets, key=lambda packet: packet['index']) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <algorithm> | |
#include <bitset> | |
#include <cassert> | |
#include <cfloat> | |
#include <climits> | |
#include <cmath> | |
#include <complex> | |
#include <cstddef> | |
#include <cstdio> | |
#include <cstdlib> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
First off, logAdd() takes two arguments of type double in log space, logX and logY. | |
It returns a double value which closely approximates log(X + Y). Consequently, the inputs and output are in log space, and we need not convert in and out of log space to complete this operation. | |
*/ | |
public static double logAdd(double logX, double logY) { | |
// 1. make X the max | |
if (logY > logX) { | |
double temp = logX; | |
logX = logY; | |
logY = temp; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <unistd.h> | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <fcntl.h> | |
#include <sys/types.h> | |
#include <sys/event.h> | |
#include <sys/time.h> | |
#include <errno.h> | |
#include <string.h> | |
#include <inttypes.h> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
""" | |
===================================== | |
PEP 20 (The Zen of Python) by example | |
===================================== | |
Usage: %prog | |
:Author: Hunter Blanks, hblanks@artifex.org / hblanks@monetate.com |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// Created by Michael Petrov on 12-02-23. | |
// Copyright (c) 2012 TenthBit Inc. All rights reserved. | |
// http://michaelpetrov.com ([email protected]) | |
// | |
// | |
// This solution performs a timing attack on the fork system call. By monitoring the process closely | |
// it is possible to discover where the fork likely happened. With some basic heuristics, it's possible | |
// to infer where the wrong character is. With very minor brute force searching it becomes very easy | |
// to find the password one letter at a time. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Stripe CTF - Work Notes | |
mpetrov ([email protected]) | |
These notes are very rough. They should give a general idea of how each level was solved. | |
---- LEVEL 01 (login: e9gx26YEb2) ----- | |
Solution: modifying PATH env variable | |
Password: kxlVXUvzv | |
date.c |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
if [ ! -t 0 ]; then | |
echo >&2 'STDIN is not a terminal' | |
exit 1 | |
fi | |
clear | |
cd "$(mktemp -d)" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include <algorithm> | |
#include <vector> | |
#include <stdio.h> | |
#include <string.h> | |
using namespace std; | |
#define REP(i, a, b) for(int i=int(a); i<int(b); i++) | |
typedef long long ll; | |
const int MAXS=10001, MAXQ=100001, MAXM=100001; |