Skip to content

Instantly share code, notes, and snippets.

Avatar
👨‍💻
trying to do some xss around here

Gerardo Junior gerardo-junior

👨‍💻
trying to do some xss around here
View GitHub Profile
@gerardo-junior
gerardo-junior / sshsrv-proxy-command.sh
Last active Sep 3, 2020
Add suport DNS srv record type to ssh client (https://www.ietf.org/rfc/rfc2782.txt)
View sshsrv-proxy-command.sh
#!/bin/bash
target_host=$1
if [ ! -z "$2" ];then
target_port=$2
else
target_port="22"
fi
@gerardo-junior
gerardo-junior / termux-send-sms
Last active Aug 25, 2020
fixed termux-send-sms script after removing the sms feature
View termux-send-sms
#!/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 / ngrok-daemon.sh
Last active Aug 28, 2020
Ngrok as a unix daemon
View ngrok-daemon.sh
#!/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"
View search-on-imap.js
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 / isValidCPF.js
Last active Jul 22, 2020
Function to validate a CPF
View isValidCPF.js
function isValidCPF (cpf) {
let sum = 0,
remainder
cpf = cpf.toString().replace(/^\D+/g, '')
if (cpf.length != 11 || new Set(cpf).size === 1) return false
for (let i = 1; i <= 9; i++) sum = sum + parseInt(cpf.substring(i - 1, i)) * (11 - i)
remainder = (sum * 10) % 11
View csvParser.js
// Author: Gerardo Junior <me@gerardo-junior.com
// Date: 10/14/2019, 8:53:55 PM
// URL: https://gist.github.com/gerardo-junior/2dfda6b7557e1334d1ef2ba495c4ad7c/
function csvParser(filename) {
const fs = require('fs')
, path = require('path')
, filePath = path.join(__dirname, filename);
return new Promise((resolve, reject) => {
View DateFomater.js
// Author: Gerardo Junior <me@gerardo-junior.com
// Date: 10/14/2019, 8:53:55 PM
// URL: https://gist.github.com/gerardo-junior/ba6ab5a121248328005c5e53d00e7bd7
class DateFomater {
constructor(datetime) {
if (typeof datetime !== 'string')
throw new Error('The class parameter must be a String')
View Keybase proof
### Keybase proof
I hereby claim:
* I am gerardo-junior on github.
* I am gerardojunior (https://keybase.io/gerardojunior) on keybase.
* I have a public key ASAo0sOcd-OqTxkLOCVtbJchBEewLr11xpSzRWbmXKkFMgo
To claim this, I am signing this object:
@gerardo-junior
gerardo-junior / README.md
Created May 21, 2018 — forked from MoOx/README.md
How to keep in sync your Git repos on GitHub, GitLab & Bitbucket easily
View README.md
title tags authors
How to keep in sync your Git repos on GitHub, GitLab & Bitbucket easily
git
github
gitlab
bitbucket
MoOx
@gerardo-junior
gerardo-junior / Dockerfile
Last active Apr 1, 2019
example of installing xdebug inside a docker container
View Dockerfile
FROM library/alpine:3.7
ARG DEBUG=false
ARG XDEBUG_VERSION=2.6.0
ARG XDEBUG_VERSION_SHA256=b5264cc03bf68fcbb04b97229f96dca505d7b87ec2fb3bd4249896783d29cbdc
ARG XDEBUG_SOURCE_URL=https://xdebug.org/files
# ( ... ) Install the php
# Compile, install and configure XDebug php extension