Skip to content

Instantly share code, notes, and snippets.

View gerardo-junior's full-sized avatar
👨‍💻
trying to do some xss around here

Gerardo Junior gerardo-junior

👨‍💻
trying to do some xss around here
View GitHub Profile
var Imap = require('imap'),
inspect = require('util').inspect;
var imap = new Imap({
user: 'USERNAME',
password: 'PASSWORD',
host: 'IMAP_HOST',
port: 993, // Default port is 993
tls: true,
tlsOptions: {rejectUnauthorized: false}
@gerardo-junior
gerardo-junior / ngrok-daemon.sh
Last active August 28, 2020 16:34
Ngrok as a unix daemon
#!/bin/bash
# /etc/init.d/ngrok
# Thanks Marcos Lin for generic deamon
ngrok_bin="/opt/ngrok/ngrok"
ngrok_config_file="$ngrok_bin.yml"
ngrok_region="sa"
process_name="$ngrok_bin"
@gerardo-junior
gerardo-junior / termux-send-sms
Last active August 2, 2021 06:19
fixed termux-send-sms script after removing the sms feature
#!/data/data/com.termux/files/usr/bin/sh
set -e -u
# Frist install https://f-droid.org/en/packages/com.android.shellms/ and give sms permission manually
SCRIPTNAME=termux-sms-send
show_usage () {
echo "Usage: $SCRIPTNAME -n number[,number2,number3,...] [text]"
echo "Send a SMS message to the specified recipient number(s). The text to send is either supplied as arguments or read from stdin if no arguments are given."
echo " -n number(s) recipient number(s) - separate multiple numbers by commas"
@gerardo-junior
gerardo-junior / sshsrv-proxy-command.sh
Last active September 3, 2020 14:08
Add suport DNS srv record type to ssh client (https://www.ietf.org/rfc/rfc2782.txt)
#!/bin/bash
target_host=$1
if [ ! -z "$2" ];then
target_port=$2
else
target_port="22"
fi
@gerardo-junior
gerardo-junior / macspoof@.service
Created October 5, 2021 03:41
/etc/systemd/system/macspoof@.service
[Unit]
Description=macchanger on %I
Wants=network-pre.target
Before=network-pre.target
BindsTo=sys-subsystem-net-devices-%i.device
After=sys-subsystem-net-devices-%i.device
[Service]
ExecStart=/usr/bin/macchanger -r %I
Type=oneshot
# /etc/NetworkManager/conf.d/30-mac-randomization.conf
[device-mac-randomization]
# "yes" is already the default for scanning
wifi.scan-rand-mac-address=yes
[connection-mac-randomization]
ethernet.cloned-mac-address=stable
wifi.cloned-mac-address=stable
@gerardo-junior
gerardo-junior / hue.conf
Last active August 29, 2023 13:07
Reverse proxy config for diyhue works with alexa running on the same host with multiple services on port 80/443 after pairing
set $upstream_app diyhue;
set $upstream_port 80;
set $upstream_proto http;
include /config/nginx/proxy.conf;
include /config/nginx/resolver.conf;
# allow controlling lights
location ~ ^/api/(.*)/lights/(.*)/state[/]*$
{