Skip to content

Instantly share code, notes, and snippets.

View apolloclark's full-sized avatar
💭
automating the world

Apollo Clark apolloclark

💭
automating the world
View GitHub Profile
<VirtualHost *>
WSGIApplicationGroup %{GLOBAL}
# Setup Python for the App1
WSGIDaemonProcess app1 user=www-data group=www-data threads=5
WSGIScriptAlias /app1 /var/www/app1/app1.wsgi
<Directory /var/www/app1>
Order deny,allow
Allow from all
# list package version available
pip install --no-deps --no-install <package_name> -v
# required distro packages
sudo apt-get -y install nmap curl libcurl3-dev rbenv libyaml-dev libxml2-dev libxslt-dev ruby1.9.1-dev
# Install Gauntlt
sudo gem install gauntlt
# install XMLLint, tidy
# @see http://datascienceatthecommandline.com/
sudo apt-get install -y libxml2-utils tidy
@apolloclark
apolloclark / virtualbox cheatsheet
Last active February 19, 2016 15:50
Virtualbox Commands
# add video mode
VBoxManage setextradata "VM_NAME" "CustomVideoMode1" "1280x720x32"
# set video mode
VBoxManage controlvm "VM_NAME" setvideomodehint 1280 720 32
print all 255 ASCII characters in hex
for x in range(255): print hex(x),
diff --git a/ext/json/ext/fbuffer/fbuffer.h b/ext/json/ext/fbuffer/fbuffer.h
index af74187..9524fb1 100644
--- a/ext/json/ext/fbuffer/fbuffer.h
+++ b/ext/json/ext/fbuffer/fbuffer.h
@@ -172,7 +172,7 @@ static FBuffer *fbuffer_dup(FBuffer *fb)
static VALUE fbuffer_to_s(FBuffer *fb)
{
- VALUE result = rb_str_new(FBUFFER_PAIR(fb));
+ VALUE result = rb_str_new(FBUFFER_PTR(fb), FBUFFER_LEN(fb));
@apolloclark
apolloclark / Kali 2016.1, Railsgoat Install script
Last active July 20, 2016 13:39
Kali 2016.1, Railsgoat install
#!/bin/bash
# @see https://gorails.com/setup/ubuntu/15.10
# update, install git
export DEBIAN_FRONTEND="noninteractive"
sudo apt-get update
sudo apt-get install -y git-core build-essential libssl-dev libreadline-dev \
libyaml-dev libsqlite3-dev sqlite3 libxml2-dev libxslt1-dev \
libcurl4-openssl-dev python-software-properties libffi-dev zlib1g-dev
  • What are you trying to solve?
  • Are you asking the right question?
  • Where is this data coming from?
  • Is this data recent? When? Where? Who?
  • Has this data been changed? How? Who? When?
  • Are there any strings?
    • is it formatted for Windows, Mac, or Linux (newlines)
    • should it have any non-ASCII?
    • how should non-ASCII be handled?
  • What are in each of the columns?

Docker SSH

# run the Gruyere container
docker run -d -p 8008:8008 karthequian/gruyere

# list running containers
@apolloclark
apolloclark / enumerate_url.md
Last active April 1, 2017 19:51
Enumerate (id, username, etc.) against a URL, using parallel to parallelize it

Make sure you are running an HTTP proxy on 127.0.0.1:8080 I suggest Burpsuite, Free Edition: https://portswigger.net/burp/download.html

I wrote this in Bash, not because it was easy, but because it was fast. This script lets you max out your CPU and network resources far better than Burpsuite, or a stand-alone python script, by taking advantage of the parallel program, and the many decades of C code optimization that's gone into Bash and GnuUtils.

[enumerate_url.sh]

#!/bin/bash

curlJsonEnum(){