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
.text | |
.global _start | |
_start: # syscall is done by %rax(%rdi, %rsi, %rdx) | |
# read(fd, buf, count) | |
# we want read one char from stdin, so %rax = 1; %rdi = 1; %rsi = buffer; %rdx = 1 | |
movq $buffer, %rsi # pointer to buffer | |
movq $0, %rdi # STDIN_FILENO | |
movq $1, %rdx # one char | |
rchar: movq $0, %rax # syscall read number (as defined in asm/unistd.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
window.onload = function() { alert('XSS!'); } |
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
=== gen.py === | |
#!/usr/bin/python3 | |
def glob_format(s): | |
g = globals().copy() | |
if 'n' in g: | |
g['n_inc'] = (g['n'] + 1) % 256 | |
g['n_dec'] = (g['n'] - 1) % 256 | |
g['n_c'] = chr(g['n']) | |
if 'c' in g: |
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
This is a Brainfuck interpreter written in vim macros | |
To use it, copy the fourth line to `a' register (4G"ayy), | |
and run the macro (@a). | |
{macro} | |
/^{letterh} | |
$h"cyl/^{program} | |
j0"cx/^{code:c} | |
j"myy@m | |
Your program here: |
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 <arpa/inet.h> | |
#include <sys/ioctl.h> | |
#include <errno.h> | |
#include <netdb.h> | |
#include <poll.h> | |
#include <stdint.h> | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> | |
#include <sys/socket.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
#include <cerrno> | |
#include <cstring> // for strerror | |
#include <cctype> // for tolower | |
#include <fstream> | |
#include <iostream> | |
#include <map> | |
#include <queue> | |
#include <set> | |
#include <string> | |
#include <sstream> |
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 <unistd.h> | |
#define BUF_MAX (4 * 1024) | |
int read_char(void) { | |
static char buf[BUF_MAX]; | |
static unsigned int size = 0; | |
static unsigned int ptr = 0; | |
if (ptr == size) { | |
size = read(0, buf, BUF_MAX); | |
ptr = 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
#include <unistd.h> | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <sys/sendfile.h> | |
#include <vector> | |
#include <set> | |
#include <limits.h> | |
using namespace std; |
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 <err.h> | |
#include <fcntl.h> | |
#include <stdlib.h> | |
#include <string.h> | |
#include <sys/socket.h> | |
#include <sys/stat.h> | |
#include <sys/types.h> | |
#include <sys/uio.h> | |
#include <sys/un.h> | |
#include <unistd.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
RULES := $(file < input) | |
RULES := $(subst Step,,$(RULES)) | |
RULES := $(subst must be finished before step,,$(RULES)) | |
RULES := $(subst can begin.,,$(RULES)) | |
RULES := $(strip $(RULES)) | |
TARGETS := $(sort $(RULES)) | |
set_get = $(strip $(__set_$(1))) |
OlderNewer