This file contains 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 <stdio.h> | |
#include <stdlib.h> | |
#include <sys/types.h> | |
#include <unistd.h> | |
int main(int argc, char *argv[]) | |
{ | |
setuid(0); | |
system(argv[1]); |
This file contains 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/bash | |
# Get files last modified less than $days ago | |
# Inspired by some scripts at http://goo.gl/QDY1BO | |
# - 0xBADCA7 | |
# Login credentials | |
user='anonymous' #Do not forget to enclose inside single or double quotes | |
pass='anon@ymo.us' | |
directory='/usr' |
This file contains 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
# Invoke as: | |
# > cat sites.txt | python stats.py | |
# | |
#!/usr/bin/env python3 | |
import fileinput, re | |
clean, superclean, blacklisted, malware = 0, 0, 0, 0 |
This file contains 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
Latency Comparison Numbers | |
-------------------------- | |
L1 cache reference 0.5 ns | |
Branch mispredict 5 ns | |
L2 cache reference 7 ns 14x L1 cache | |
Mutex lock/unlock 25 ns | |
Main memory reference 100 ns 20x L2 cache, 200x L1 cache | |
Compress 1K bytes with Zippy 3,000 ns | |
Send 1K bytes over 1 Gbps network 10,000 ns 0.01 ms | |
Read 4K randomly from SSD* 150,000 ns 0.15 ms |
This file contains 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 | |
''' | |
0xBADCA7 | |
Vodka goes down the throat better with pickle. | |
This script generates pickled object representation. Good for CTFs. | |
Params: [1] function, [2] parameter, [3] pickle type | |
Sample run: |
This file contains 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
#define _GNU_SOURCE | |
#include <errno.h> | |
#include <stdlib.h> | |
#include <stdio.h> | |
#include <fcntl.h> | |
#include <unistd.h> | |
#include <sys/types.h> | |
#include <sys/stat.h> |
This file contains 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
HTTP/1.1 200 OK | |
Server: MSLC | |
Date: Sun, 28 Dec 2015 08:50:04 GMT | |
Content-Type: text/html; charset=utf-8 | |
Connection: keep-alive | |
Vary: Accept-Encoding | |
Status: 200 OK | |
Cache-Control: no-cache | |
Access-Control-Allow-Origin: * | |
Access-Control-Allow-Headers: Origin, X-Requested-With, Content-Type, Accept |
This file contains 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
<?php | |
$stream_context = array ( | |
'http' => array ( | |
'follow_location' => FALSE | |
) ); | |
Class VISUALIZER{ | |
public $url; | |
public $context; | |
public $host; |
This file contains 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
#you can copy this into IRB or just run it as a file | |
require "net/http" | |
require "uri" | |
# require "net/https" # for testing ssl | |
url = "http://localhost:3000/login" | |
yaml = %{ --- !ruby/object:Time {} } | |
xml = %{<?xml version="1.0" encoding="UTF-8"?><foo type="yaml">#{yaml}</foo>}.strip |