Skip to content

Instantly share code, notes, and snippets.

@xxdesmus
xxdesmus / gist:72e9254963ebea33a0d2
Created November 28, 2015 23:14 — forked from sethkinast/gist:5914577
Tiny script to grab Tor exitnodes and ban them via CloudFlare's API
#!/bin/bash
SERVERS=(108.162.196.125 108.162.197.125)
for server in ${SERVERS[*]}
do
echo "Now processing $server"
wget --timeout=10 -t1 -O tor.txt https://check.torproject.org/cgi-bin/TorBulkExitList.py?ip=$server
for ip in `tail -n +4 tor.txt`
' =============================================================
' Insert Earned hours formula and
' calculate all earned hours on CPInutVolume
' =============================================================
xRef1 = Sheets("CPInputVolume").Cells(1, 6) - 19 'formula located in 1F that counts how many rows of data we have, used to loop through code below until end of our data
restartLoop: 'used down below after check for problem data (didn't complete all 3 questions)
Counter1 = 1 'used to match against xRef1 so we know when we reach the bottom of the data
@xxdesmus
xxdesmus / dyre-dga.py
Last active August 29, 2015 14:21 — forked from jedisct1/dyre-dga.py
#! /usr/bin/env python
# Dyre/Dyreza DGA
# Implementation by Talos
# From http://blogs.cisco.com/security/talos/threat-spotlight-dyre
# Another Python implementation was also posted back in December 2014 by moritz.kroll:
# https://www.virustotal.com/en/file/3716902c64afe40369e6ed67f9b9f7eea30f809348b3558adcff622965e80435/analysis/
from datetime import date
from hashlib import sha256
from socket import gethostbyname, gaierror
@xxdesmus
xxdesmus / keybase.md
Created January 25, 2015 23:16
keybase.md

Keybase proof

I hereby claim:

  • I am xxdesmus on github.
  • I am xxdesmus (https://keybase.io/xxdesmus) on keybase.
  • I have a public key whose fingerprint is BBAA 6BCE 3305 7FD6 6452 7115 57B6 0114 DE0B 314D

To claim this, I am signing this object:

@xxdesmus
xxdesmus / vpnsetup.sh
Last active August 29, 2015 14:13 — forked from hwdsl2/.MOVED.md
#!/bin/sh
#
# Amazon EC2 user-data file for automatic configuration of IPsec/L2TP VPN
# on a Ubuntu server instance. Tested with 14.04 (Trusty) AND 12.04 (Precise).
# With minor modifications, this script *can also be used* on dedicated servers
# or any KVM- or XEN-based Virtual Private Server (VPS) from other providers.
#
# DO NOT RUN THIS SCRIPT ON YOUR PC OR MAC! THIS IS MEANT TO BE RUN WHEN
# YOUR AMAZON EC2 INSTANCE STARTS!
#

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
mtr -r 75.98.93.66
Start: Mon Nov 3 19:23:53 2014
HOST: JustinMBA.local Loss% Snt Last Avg Best Wrst StDev
1.|-- 10.0.1.1 0.0% 10 1.4 1.5 1.3 2.5 0.0
2.|-- 71.198.40.1 0.0% 10 15.0 15.7 13.8 17.2 1.1
3.|-- te-0-7-0-9-sur03.oakland. 0.0% 10 15.5 20.0 14.6 29.2 5.3
4.|-- te-0-2-0-6-ar01.sfsutro.c 0.0% 10 16.6 18.4 15.6 27.1 3.4
5.|-- he-1-4-0-0-cr01.sanjose.c 0.0% 10 18.2 19.9 18.2 23.4 1.6
6.|-- he-0-13-0-0-pe03.11greato 0.0% 10 35.2 21.9 18.3 35.2 5.5
7.|-- xe-9-3-0.sjc10.ip4.tinet. 0.0% 10 18.3 19.3 17.4 21.3 1.0
###############################################################################
# The MIT License
#
# Copyright 2012-2014 Jakub Jirutka <jakub@jirutka.cz>.
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
@xxdesmus
xxdesmus / Mailbox Mac beta SSL error
Created August 25, 2014 18:54
Mailbox Mac beta SSL error
8/25/14 11:52:41.019 AM Mailbox (Beta)[1222]: Logger instance installed
8/25/14 11:52:41.019 AM Mailbox (Beta)[1222]: Logger instance installed
8/25/14 11:52:41.020 AM Mailbox (Beta)[1222]: Logger instance installed
8/25/14 11:53:11.635 AM Mailbox (Beta)[1222]: [ERROR] DropboxSDK: SSL Error. Cannot validate a certificate for the host: api.dropbox.com
8/25/14 11:53:11.636 AM Mailbox (Beta)[1222]: [WARNING] DropboxSDK: error making request to /1/login - (-1012) Error Domain=NSURLErrorDomain Code=-1012 "The operation couldn’t be completed. (NSURLErrorDomain error -1012.)"
8/25/14 11:53:11.636 AM Mailbox (Beta)[1222]: Login Error: Error Domain=NSURLErrorDomain Code=-1012 "The operation couldn’t be completed. (NSURLErrorDomain error -1012.)"
#!/bin/sh
# modified by jfro from http://www.cnysupport.com/index.php/linode-dynamic-dns-ddns-update-script
# Update: changed because the old IP-service wasn't working anymore
# Uses curl to be compatible with machines that don't have wget by default
# modified by Ross Hosman for use with cloudflare.
#
# Place at:
# /usr/local/bin/cf-ddns.sh
# if you're lazy (like me): curl https://gist.githubusercontent.com/larrybolt/6295160/raw/9efbc7850613e06db1b415bdf4fbdd8361209865/cf-ddns.sh > /usr/local/bin/cf-ddns.sh && chmod +x /usr/local/bin/cf-ddns.sh && vim /usr/local/bin/cf-ddns.sh
# run `crontab -e` and add next line: