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 / zero_strip.sh
Created August 28, 2021 22:33 — forked from W-Floyd/zero_strip.sh
A one-liner sed expression to nicely strip leading and trailing 0's from each line of piped input
################################################################################
# ... | __zero_strip
################################################################################
#
# Zero Strip
#
# A one-liner sed expression to nicely strip leading and trailing 0's from each
# line of piped input.
#
# For example:
@djeraseit
djeraseit / torrc
Created August 20, 2021 18:17 — forked from mort3za/torrc
Using tor with bridges, torrc example config (bit.ly/m3torrc)
# sudo apt-get install obfs4proxy obfsproxy tor
# sudo vi /etc/tor/torrc
UseBridges 1
ClientTransportPlugin obfs3 exec /usr/bin/obfsproxy managed
ClientTransportPlugin obfs4 exec /usr/bin/obfs4proxy managed
# send email to bridges@torproject.org with body `get transport obfs4` you can get new bridges.
bridge obfs4 195.154.49.15:44705 BACD07DACE996093DC7635F33A98C49... cert=xc/wtKNWADfJQf232xSXT0WpzsaINw6fgPvZBy5Rkw4.../ypaZPDug9L... iat-mode=0
@djeraseit
djeraseit / keybase.md
Created August 20, 2021 08:27
keybase.md

Keybase proof

I hereby claim:

  • I am djeraseit on github.
  • I am theodis (https://keybase.io/theodis) on keybase.
  • I have a public key ASDQa-w4iaEGjhF6AN8q8xrpJa9x7qVPw0zaVoTW0X8X2Qo

To claim this, I am signing this object:

@djeraseit
djeraseit / export existing ssh private key to opengpg card.md
Created August 20, 2021 06:21 — forked from artizirk/export existing ssh private key to opengpg card.md
Export existing private ssh key to OpenPGP card or Yubikey

Export existing private ssh key to OpenPGP card or Yubikey

Before you begin

This will only work with OpenPGP v2.0 or newer or with PIV cards. Your existing ssh key has to be in a format that is supported by your opengpg card. For example my the OpenPGP V2.1 Card from FLOSS Shop supports only 2048 bit RSA keys. RSA exponent should be 65537, Putty and old OpenSSH releases use different expnent that for example Yubikey does not support.

Required software

@djeraseit
djeraseit / gnupg_scdaemon.md
Created August 20, 2021 05:12 — forked from artizirk/gnupg_scdaemon.md
OpenPGP SSH access with Yubikey and GnuPG

OpenPGP SSH access with Yubikey and GnuPG

Yubikey, Smart Cards, OpenSC and GnuPG are pain in the ass to get working. Those snippets here sould help alleviate pain.

Yubikey Config under Ubuntu

To reset and disable not used modes on Yubikey you need the ykman program

You can install it using those commands

@djeraseit
djeraseit / gpg_test.py
Created August 17, 2021 19:28 — forked from ryantuck/gpg_test.py
working example of using gnupg in python
# install:
# pip3 install python-gnupg
# note - gpg needs to be installed first:
# brew install gpg
# apt install gpg
# you may need to also:
# export GPG_TTY=$(tty)
@djeraseit
djeraseit / gist:b18df26c06a72095feb4137b97045641
Last active July 28, 2021 02:58
How to enable FIDO U2F on Linux
STEP 1: Insert security key and cat /var/log/messages (or tail -f /var/log/messages and then insert security key)
Although some recent versions of Linux have built-in support for U2F security keys, many do not, and you may therefore have to make a minor system configuration change in order to allow the requesting web browser (such as Chrome) to communicate directly with your Key-ID U2F token via the USB port.
This is a system-wide configuration update that enables Key-ID U2F functionality on Linux for all users, and is entirely safe. It uses standard Linux udev rules, which allows you to identify and thus allow certain devices, based on their specific properties, such as its USB Vendor ID and Product ID.
The Feitian FIDO U2F token has a Vendor ID (VID) of 096e (hex) and a Product ID (PID) of 0854 (hex). To enable it on Linux, assuming you are running udev version 188 or later, simply create the file /etc/udev/rules.d/70-u2f.rules with the following contents:
@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