Skip to content

Instantly share code, notes, and snippets.

View guanix's full-sized avatar

Guan Yang guanix

  • 44FE 23DB 362F 611C 0CC3 116B D49B 113D 48DC 370E
  • New York
View GitHub Profile
@guanix
guanix / gist:1529261
Created December 28, 2011 19:21
NYT spam, analysis
Last login: Wed Dec 28 14:19:53 on ttys000
Guans-MacBook-Air:~ guan$ host dmx1.bfi0.com.
dmx1.bfi0.com has address 208.70.143.4
dmx1.bfi0.com mail is handled by 10 dmx1.bfi0.com.
Guans-MacBook-Air:~ guan$ host dmailer0121.dmx1.bfi0.com.
dmailer0121.dmx1.bfi0.com has address 208.70.142.121
Guans-MacBook-Air:~ guan$ nslookup 208.70.142.121
Server: 8.8.8.8
Address: 8.8.8.8#53
@guanix
guanix / gist:1529231
Created December 28, 2011 19:12
NYT spam
Delivered-To: guan@unicast.org
Received: by 10.220.155.201 with SMTP id t9cs190052vcw;
Wed, 28 Dec 2011 10:38:46 -0800 (PST)
Received: by 10.101.111.11 with SMTP id o11mr5634655anm.40.1325097524828;
Wed, 28 Dec 2011 10:38:44 -0800 (PST)
Return-Path: <1c6df7f9blayfovciab7saeiaaaaaazy4ddqqoseiuiyaaaaa@email.newyorktimes.com>
Received: from dmx1.bfi0.com (dmailer0121.dmx1.bfi0.com. [208.70.142.121])
by mx.google.com with ESMTP id d50si29937960yhh.16.2011.12.28.10.38.44;
Wed, 28 Dec 2011 10:38:44 -0800 (PST)
Received-SPF: pass (google.com: domain of 1c6df7f9blayfovciab7saeiaaaaaazy4ddqqoseiuiyaaaaa@email.newyorktimes.com designates 208.70.142.121 as permitted sender) client-ip=208.70.142.121;
#!/usr/bin/env ruby
require "socket"
require "openssl"
require "thread"
listeningPort = 443
server = TCPServer.new(listeningPort)
sslContext = OpenSSL::SSL::SSLContext.new
#!/bin/sh
prev=0
limit=100
for this in `cat $1`; do
if [ $prev -eq 0 ]; then
prev=$this
continue
fi
#!/bin/sh
# FACTCHECK: Double-check you got your stuff right.
# This is the filename of the new hotlist for users you need to re-download.
# Run it in the script directory, it'll go down and smash the furniture properly.
echo "" > missing-hotlist.txt
cd videos
for each in *
#!/bin/sh
#
# GRAPEFRUIT: Given a user, downloads all that user's videos.
#
USER=$1
PAGE=$2
PYTHON=`which python`
if [ ! -d videos ]
#!/bin/sh
#
# GRAPEFRUIT: Given a user, downloads all that user's videos.
# THIS IS THE AXEL version. BEWARE IT WILL EAT ALL OF YOUR BANDWITH LIKE COOKIE MONSTER, BUT BETTER
USER=$1
PAGE=$2
#Path to axel
AXEL="$(which aria2c)"
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# Author: Ricardo Garcia Gonzalez
# Author: Danny Colligan
# Author: Benjamin Johnson
# Author: Vasyl' Vavrychuk
# Author: Witold Baryluk
# Author: Paweł Paprota
# Author: Guan Yang
# Author: David Triendl
#!/bin/sh
# FACTCHECK: Double-check you got your stuff right.
# This is the filename of the new hotlist for users you need to re-download.
# Run it in the script directory, it'll go down and smash the furniture properly.
echo "" > missing-hotlist.txt
cd videos
for each in *
#!/bin/sh
#
# GRAPEFRUIT: Given a user, downloads all that user's videos.
#
USER=$1
PAGE=$2
if [ ! -d videos ]
then