Skip to content

Instantly share code, notes, and snippets.

View djeraseit's full-sized avatar
🎯
Focusing

Theodis Butler djeraseit

🎯
Focusing
View GitHub Profile
@djeraseit
djeraseit / GenerateSitemap.php
Created July 20, 2021 23:38 — forked from ekrist1/GenerateSitemap.php
Laravelium Sitemap Example
<?php
namespace App\Jobs;
use Illuminate\Bus\Queueable;
use Illuminate\Queue\SerializesModels;
use Illuminate\Queue\InteractsWithQueue;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Foundation\Bus\Dispatchable;
use App\Item;
@djeraseit
djeraseit / PassiveWiFiTracking.md
Created May 19, 2021 23:30 — forked from haccks/PassiveWiFiTracking.md
Passive WiFi Tracking

Passive WiFi Tracking Posted February 26, 2014 by Edward Borrowed from: http://edwardkeeble.com/2014/02/passive-wifi-tracking/

In the last year or so, there have been quite a few stories on the use of passive WiFi tracking by advertisers, retailers, and analytics startups. Most of these articles focus on the significant privacy and security concerns associated with this practice, but few of them get into the details of how the technology works. Having built a similar system for my project, Casual Encounters, I think I can explain some of the inner workings of these systems, how to avoid being tracked, and how, for research purposes or to determine their own level of exposure, someone could build such a system. I will state that I am by no means an expert on wireless networks, signal analysis, or anything of the sort, but I have conducted a fair bit of research and trial and error, and it works for me. Your mileage may vary; don’t try this at home; etc, etc.

Probe Requests

When a WiFi client (phone,

@djeraseit
djeraseit / dd-wrt-transparent-proxy.sh
Created May 18, 2021 16:47 — forked from mauron85/dd-wrt-transparent-proxy.sh
Transparent proxy for openwrt using tinyproxy & redsocks
#!/bin/sh
# https://crosp.net/blog/administration/routing-network-traffic-through-socks5-proxy-using-dd-wrt/
# https://serverfault.com/questions/200635/best-way-to-clear-all-iptables-rules
PROXIFYING_MACHINE=192.168.82.192
MACHINE_TO_PROXIFY=192.168.83.0/24
NETWORK=192.168.83.0/24
WAN_IP=192.168.81.1
iptables -I PREROUTING 1 -t mangle -s $MACHINE_TO_PROXIFY ! -d $NETWORK -p tcp -m multiport --dports 80,443 -j MARK --set-mark 3
@djeraseit
djeraseit / bindshell-unstable.c
Created May 18, 2021 00:23 — forked from 0x48piraj/bindshell-unstable.c
Bind shell network backdoor for embedded devices (tested on OpenWrt 18.06 firmware)
#include <sys/socket.h>
#include <netinet/in.h>
#include <stdlib.h>
#define BACKDOOR_PORT 4444
/* Author: Piyush Raj (0x48piraj)
* Bind Shell for OpenWrt 18.06 firmware, handles one connection per execution
* Arch : i486
* ./i486-openwrt-linux-musl-gcc bindshell-unstable.c -o bindshell
*/
# Remove index.php$
if ($request_uri ~* "^(.*/)index\.php$") {
    return 301 $1;
}

location / {
    try_files $uri $uri/ /index.php?$query_string;

    # Remove from everywhere index.php

if ($request_uri ~* "^(./)index.php(/?)(.)") {

@djeraseit
djeraseit / json2bash.inc
Created May 1, 2021 00:36 — forked from hilbix/json2bash.inc
Parse JSON into BASH variables, with onedimensional array support
#!/bin/bash
#
# A slightly more secure variant of this script.
# It should be secure against primitive attacks like:
json2bash <<<'{" ":{"; rm -rf /; ":1}}'
#
# However processing JSON from untrustworthy sources still can confuse your script!
# YOU HAVE BEEN WARNED!
# Following needs bash. Use like in:
@djeraseit
djeraseit / adding-tailscale-to-edgerouter.md
Created April 30, 2021 23:39 — forked from lg/adding-tailscale-to-edgerouter.md
Add tailscale to an EdgeRouter and surviving system upgrade

Adding tailscale to an EdgeRouter (and surviving system upgrades)

I suggest you run sudo bash on all of these so you're the root user.

Installing

  1. Download tailscale and put the files in /config/. Find the latest stable or unstable version for your EdgeRouter's processor (ex. ER4 is mips and ERX is mipself)
sudo bash    # if you havent already
@djeraseit
djeraseit / curl_custom_dns.sh
Created April 30, 2021 23:02 — forked from CMCDragonkai/curl_custom_dns.sh
cURL: Selecting a custom DNS server to resolve domain names
#!/usr/bin/env bash
# this can be useful when developing against a custom DNS server, or
# for example, if you made a change to the DNS settings of a domain, and you
# know the authoritative nameserver IP address for a domain, you could use this
# to bypass the intermediate DNS cache, and apply an HTTP request using the new
# DNS settings supplied by your specified (authoritative) nameserver
curl --dns-servers <dns.ip,dns.ip> url.com
@djeraseit
djeraseit / open-cloudflare_(firewalld).sh
Created April 29, 2021 23:15 — forked from rraallvv/open-cloudflare_(firewalld).sh
Open public ports to Cloudflare for Firewalld
#!/usr/bin/env bash
# Instructions:
#
# 1) Place this script in the /root/ directory, give it proper permissions.
# $ sudo chmod +x /root/open-cloudflare.sh
#
# 2) Open the cron job editor
# $ sudo crontab -e
#
@djeraseit
djeraseit / EncryptDecryptRDCMan.ps1
Created April 28, 2021 23:52 — forked from heiny/EncryptDecryptRDCMan.ps1
Powershell: Encrypt/Decrypt Remote Desktop Connection Manager Credentials
# There is no facility to replace passwords in RDCMan once they are stored. The only way is to create a new custom credential.
# If you open your *.rdg file in a text editor, locate the stored <password>, you can then decrypt it using this script.
# This script can also encrypt a plain text password in rdg format which can be used to overwrite an existing one in the xml.
Add-Type -AssemblyName System.Security;
Function EncryptPassword {
[CmdletBinding()]
param([String]$PlainText = $null)
# convert to RDCMan format: (null terminated chars)