Skip to content

Instantly share code, notes, and snippets.

View isdrupter's full-sized avatar

Shellz isdrupter

  • Your Router
View GitHub Profile
@isdrupter
isdrupter / ftpserver.py
Created July 1, 2017 19:56 — forked from scturtle/ftpserver.py
simple ftp server by python
#!/usr/bin/env python2
# coding: utf-8
import os,socket,threading,time
#import traceback
allow_delete = False
local_ip = socket.gethostbyname(socket.gethostname())
local_port = 8888
currdir=os.path.abspath('.')
@isdrupter
isdrupter / sshd_config
Created April 3, 2017 16:04
more secure sshd_config
# Package generated configuration file
# See the sshd_config(5) manpage for details
# What ports, IPs and protocols we listen for
Port 22
# Use these options to restrict which interfaces/protocols sshd will bind to
#ListenAddress ::
#ListenAddress 0.0.0.0
Protocol 2
# HostKeys for protocol version 2
@isdrupter
isdrupter / base64.sh
Created February 2, 2017 13:06 — forked from markusfisch/base64.sh
base64 fallback implementation in bash
#!/bin/bash
# Fallback base64 en-/decoder for systems that lack a native implementation
#
# @param ... - flags
which base64 &>/dev/null || {
# if even od is missing
which od &>/dev/null || od()
{
local C O=0 W=16
@isdrupter
isdrupter / cfwall-debian.sh
Created December 24, 2016 06:16
Cloudflare Iptables config
#!/bin/bash
ufw reset
ufw allow ssh
cfips="103.21.244.0/22 \
103.22.200.0/22 \
103.31.4.0/22 \
104.16.0.0/12 \
108.162.192.0/18 \
@isdrupter
isdrupter / greips.bash
Created July 19, 2016 02:50
Grep IP Addresses (bash)
#!/bin/bash
###########
file=$1
case $1 in
*)
grep -oP "([0-9]{1,3}\.){3}[0-9]{1,3}" $file
;;
@isdrupter
isdrupter / genrandom.c
Created July 14, 2016 22:57
Generate random data in c
#include <time.h>
#include <stdlib.h>
#include <stdio.h>
char string[];
int string_length;
int main(void){
srand(time(NULL));
int string_length = rand() % 20 + 1;
srand(time(NULL));
#!/bin/sh
paste=https://ghostbin.com/paste/rfwno/raw
targets=domains.lst
final=isisips
curl $paste > targets.tmp
sed '1,24d' targets.tmp > $targets
# grab domain names from a paste
cat targets.tmp | perl -n -e '/\b\S+\.(com|org|edu)\b/ && print $&,"\n"; ' > $targets
# resolve each domain; append to a list
touch $final.lst