Skip to content

Instantly share code, notes, and snippets.

View jatrost's full-sized avatar

Jason Trost jatrost

View GitHub Profile
@jaytaylor
jaytaylor / threatstream_intelligence_walker.py
Last active August 29, 2015 14:05
ThreatStream API Intelligence downloader, separates intel into different files based on i-type.
#!/usr/bin/env python
"""ThreatStream Raw Intelligence downloader. Puts into 1 file for each itype."""
__author__ = 'Jay Taylor [@jtaylor]'
import io, json, requests, os
################################################################################
# Begin configuration
@VorticonCmdr
VorticonCmdr / copyright
Created December 4, 2012 16:55
hyperloglog for elasticsearch script facet plugin (alpha code)
@eneldoserrata
eneldoserrata / gist:5a397f201ea90cc664544a717c310117
Created January 23, 2018 04:24
Superset serve on nginx with prefix
Hi.
Here is the content of my nginx config file :
location /analytics {
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Script-Name /analytics;
proxy_pass http://YOUR_SERVER_NAME:8088;
#YOUR_SERVER_NAME is localhost if both nginx and superset run on same server
@nma-io
nma-io / Security_Docker_101.md
Last active August 26, 2020 00:48
A quick guide to deploying some Security Docker Containers.

Install

Grab a copy of Docker for your platform here: https://www.docker.com/community-edition#/download Follow the installation guide and tune the docker system to run with as much memory and CPU as you're willing to feed to it.

Docker Containers I find useful for general security tasks:

Local Debian instance: debian:latest

Metasploit: remnux/metasploit

import requests, json, logging, sys
class PassiveTotal:
def __init__(self, apikey):
self.__apikey = apikey
self.__classifications = [ 'targeted', 'crime', 'benign', 'multiple' ]
self.__actions = [ 'add', 'remove' ]
@rjurney
rjurney / java_install.sh
Created July 15, 2014 23:54
How to automagically install Oracle JDK 1.8 on CentOS
# Install Java 1.8 in CentOS/RHEL 6.X
sudo yum remove -y java-1.6.0-openjdk
wget --no-cookies \
--no-check-certificate \
--header "Cookie: oraclelicense=accept-securebackup-cookie" \
"http://download.oracle.com/otn-pub/java/jdk/8-b132/jdk-8-linux-x64.rpm" \
-O jdk-8-linux-x64.rpm
sudo rpm -Uvh jdk-8-linux-x64.rpm
sudo alternatives --install /usr/bin/java java /usr/java/jdk1.8.0/jre/bin/java 20000
sudo alternatives --install /usr/bin/jar jar /usr/java/jdk1.8.0/bin/jar 20000
@jaytaylor
jaytaylor / camel_case_to_snake_case.py
Created September 6, 2012 21:41
Convert camel-case to snake-case in python.
#!/usr/bin/env python
"""
Convert camel-case to snake-case in python.
e.g.: CamelCase -> snake_case
Relevant StackOverflow question: http://stackoverflow.com/a/1176023/293064
"""
@gilrosenthal
gilrosenthal / Fast.ai install script
Created July 4, 2018 20:14
Fast.ai Install on Google Colab
!pip install fastai
!apt-get -qq install -y libsm6 libxext6 && pip install -q -U opencv-python
import cv2
from os import path
from wheel.pep425tags import get_abbr_impl, get_impl_ver, get_abi_tag
platform = '{}{}-{}'.format(get_abbr_impl(), get_impl_ver(), get_abi_tag())
accelerator = 'cu80' if path.exists('/opt/bin/nvidia-smi') else 'cpu'
!pip install -q http://download.pytorch.org/whl/{accelerator}/torch-0.3.0.post4-{platform}-linux_x86_64.whl torchvision
@neu5ron
neu5ron / dynamic-dns.txt
Last active September 10, 2022 10:08
This list has moved to the repo https://github.com/neu5ron/dynamic_dns_lists
3d-game.com #dtdns.com
4irc.com #dtdns.com
b0ne.com #dtdns.com
bbsindex.com #dtdns.com
chatnook.com #dtdns.com
darktech.org #dtdns.com
deaftone.com #dtdns.com
dtdns.net #dtdns.com
effers.com #dtdns.com
etowns.net #dtdns.com
@coffeetocode
coffeetocode / example_output.txt
Last active September 15, 2022 18:29
Example of bypasses for naive blacklists of 169.254.169.254 local metadata service. Useful for SSRF testing, among other things. See https://twitter.com/coffeetocode/status/912788650408026112
$ ./try_local_metadata.sh
Trying 169.254.169.254... found metadata
Trying 169.254.43518... found metadata
Trying 169.16689662... found metadata
Trying 2852039166... found metadata
Trying 0251.0376.0251.0376... found metadata
Trying 0251.0376.0124776... found metadata
Trying 251.0775248... -
Trying 25177524776... -
Trying 0xa9.0xfe.0xa9.0xfe... found metadata