Skip to content

Instantly share code, notes, and snippets.

Alan Grow acg

Block or report user

Report or block acg

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View poop-sierpinksi.html
<html>
<head>
<style lang="text/css">
body {
margin: 0;
padding: 0;
}
@acg
acg / spam.js
Created Apr 27, 2016
Obfuscated Javascript Spam
View spam.js
var slothful = 0;
String.prototype.hotels = function () {
return this.replace("U","S").replace(":",".");
};
var tatata = "S";
String.prototype.hotels2 = function () {
return this.replace("R","c").replace("+","t").replace("3","veX");
};
var lll = +!![];
View keybase.md

Keybase proof

I hereby claim:

  • I am acg on github.
  • I am acg (https://keybase.io/acg) on keybase.
  • I have a public key ASDACiSbpawajMuFGCDc4pEUrKZlmefyKLfRtsZ7XmZp7wo

To claim this, I am signing this object:

View netcat-poop.txt
$ grep -iHn poop netcat.c
netcat.c:94:struct host_poop {
netcat.c:99:#define HINF struct host_poop
netcat.c:101:struct port_poop {
netcat.c:106:#define PINF struct port_poop
netcat.c:143:HINF ** gates = NULL; /* LSRR hop hostpoop */
netcat.c:149:PINF * portpoop = NULL; /* for getportpoop / getservby* */
netcat.c:299: cross-check the host_poop we have so far against new gethostby*() info,
netcat.c:303:int comparehosts (poop, hp)
@acg
acg / unixlisten
Created Dec 18, 2013
Factoring out the listen(2) half of an ucspi unixserver.
View unixlisten
#!/usr/bin/env python
'''
Like unixserver(1), but just listen and exec the subordinate program
with the listening socket as stdin. The subordinate program still needs
to call accept(2) on stdin.
'''
import sys
import os
import socket
@acg
acg / flask-stdio
Last active Dec 19, 2015
Exercise a flask app on stdio instead of a socket.
View flask-stdio
#!/usr/bin/env python
'''
Most flask examples use a socket.
This flask example reads HTTP from stdin and writes HTTP to stdout.
A single HTTP request is processed.
Usage:
printf "GET / HTTP/1.1\r\nHost: localhost\r\n\r\n" | ./flask-stdio
Note: not working yet under tcpserver, wants to read until EOF.
@acg
acg / tsv2csv
Last active Jan 10, 2019
Convert tsv to csv with optional unescaping.
View tsv2csv
#!/usr/bin/env perl
use Text::CSV;
use Getopt::Long qw/ GetOptionsFromArray :config pass_through /;
use warnings;
use strict;
my $usage = "usage: $0 [-e] < file.tsv\n";
exit main( @ARGV );
@acg
acg / csv2tsv
Created Apr 4, 2013
Convert csv to tsv with optional escaping.
View csv2tsv
#!/usr/bin/env perl
use Text::CSV;
use Getopt::Long qw/ GetOptionsFromArray :config pass_through /;
use warnings;
use strict;
my $usage = "usage: $0 [-e] < file.csv\n";
exit main( @ARGV );
@acg
acg / tcplisten
Created Dec 5, 2012
Factoring out the listen(2) half of djb's tcpserver.
View tcplisten
#!/usr/bin/env python
import sys
import os
import socket
port = sys.argv.pop(0)
host = sys.argv.pop(0)
port = int(sys.argv.pop(0))
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
You can’t perform that action at this time.