Skip to content

Instantly share code, notes, and snippets.

View fhightower's full-sized avatar
🎯
Focusing

Floyd fhightower

🎯
Focusing
View GitHub Profile
@fhightower
fhightower / twitter.txt
Last active August 24, 2018 11:58
twitter
illegalFawn
Honeypylog
phishingalert
---
JAMESWT_MHT - low
VK_Intel - low
c0d3inj3cT - low
ScumBots
@fhightower
fhightower / defang.py
Last active October 10, 2017 01:01
Simple Indicator defanging using https://github.com/ioc-fang/defanging-dataset
import json
import requests
url = "https://ioc-fang.github.io/defanging-dataset/defang.json"
r = requests.get(url)
defangings = json.loads(r.text)
@fhightower
fhightower / print_json_paths.py
Last active September 26, 2017 15:15
Print the paths of json
def print_keys(dictionary, parent_key):
if len(dictionary.keys()) > 0:
for key in dictionary.keys():
if isinstance(dictionary[key], dict):
print_keys(dictionary[key], parent_key + ":" + key)
elif isinstance(dictionary[key], list):
if isinstance(dictionary[key][0], dict):
print_keys(dictionary[key][0], parent_key + ":" + key + "[x]")
else:
print(parent_key + ":" + key)
@fhightower
fhightower / python_tcex_packaging_setup.sh
Last active August 22, 2017 18:40
Vagrant Setup Scripts
# Install python3.5
sudo -H apt-get install -y build-essential checkinstall
sudo -H apt-get install -y libreadline-gplv2-dev libncursesw5-dev libssl-dev libsqlite3-dev tk-dev libgdbm-dev libc6-dev libbz2-dev
cd /usr/src
sudo wget https://www.python.org/ftp/python/3.5.2/Python-3.5.2.tgz
sudo -H tar xzf Python-3.5.2.tgz
cd Python-3.5.2
@fhightower
fhightower / keybase.md
Created July 18, 2017 00:45
Just getting started

Keybase proof

I hereby claim:

  • I am fhightower on github.
  • I am fhightower (https://keybase.io/fhightower) on keybase.
  • I have a public key whose fingerprint is A29F E24F 5B7B CAA3 14DD FBDB 01C4 EF9F F37A 155E

To claim this, I am signing this object:

@fhightower
fhightower / .travis.yml
Last active June 30, 2017 00:56
Simple .travis.yml
language: python
python: 3.5
branches:
only:
- master
# before_install:
install:
- pip install requests
- pip install pytest
- pip install pytest-cov
import bs4
import requests
r = requests.get("https://www.blackhat.com/us-17/training/index.html")
s = bs4.BeautifulSoup(r.text, 'lxml')
# find all <h2> elements (the headings that contain the headings for the trainings)
h2 = s.find_all('h2')
@fhightower
fhightower / gfork.sh
Last active June 15, 2017 04:27
Clone github fork and set upstream
function gfork() {
# Clone a repo that is a fork ($1) and set an upstream repo ($2)
# clone the given repo
git clone $1;
# get the name of the cloned repo
REPO=$(echo $1 | grep -o "[^/]*\.git$")
# go into the directory of the cloned repo
cd ${REPO:0:(${#REPO} - 4)}
# set upstream
git remote add upstream https://github.com/$2.git
@fhightower
fhightower / tql_queries.md
Last active May 16, 2020 02:01
List of helpful TQL (ThreatConnect Query Language) Queries and Browse Screen Views for ThreatConnect

View tasks assigned to me that are not completed or deferred:

typeName in ("Task") and taskAssignee = me and taskStatus != "Completed" and taskStatus != "Deferred"

View internationalized domains:

typeName in ("Host", "URL") and summary contains "xn--"

View over 50 security blogs in ThreatConnect:

@fhightower
fhightower / emphasize_lines_increment
Created May 15, 2017 15:07
Increment :emphasize-lines: numbers
import os
import re
# read a file or define a variable that is a string here...
# this defines how much you would like to add to the values (can be a negative number)
delta = 2
matches = re.findall(':emphasize-lines: (.*)', file_text)