Skip to content

Instantly share code, notes, and snippets.

View viniciusdaniel's full-sized avatar

Vinicius Daniel Antunes Oliveira viniciusdaniel

View GitHub Profile

How To Route Web Traffic Securely Without a VPN Using a SOCKS Tunnel

PostedJanuary 8, 2016495.7kviewsSECURITYUBUNTU

  • [

    2bead7b7d80a88d147750a6839177311eae3cda7

    Michael Holley

@viniciusdaniel
viniciusdaniel / fileBrowserHandler.htm
Created October 22, 2018 17:33 — forked from greenido/fileBrowserHandler.htm
Simple test to FileSystem APIs (HTML5)
<!DOCTYPE html>
<html>
<head>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>
<meta charset=utf-8 />
<title>Chrome File API tester</title>
<script>
window.requestFileSystem = window.requestFileSystem || window.webkitRequestFileSystem;
@viniciusdaniel
viniciusdaniel / scp_tar.sh
Created October 28, 2018 20:25
Best way to copy file across SSH
$ tar czf - <files> | ssh user@host "cd /wherever && tar xvzf -"
@viniciusdaniel
viniciusdaniel / webserver.pl
Created November 8, 2018 17:37
Small webserver just responding HTTP 200
#!/usr/bin/perl
use strict;
use IO::Socket;
my $server = IO::Socket::INET->new(
LocalPort => 80,
Type => SOCK_STREAM,
Reuse => 1,
Listen => 20

Bash tips: Colors and formatting (ANSI/VT100 Control sequences)

The ANSI/VT100 terminals and terminal emulators are not just able to display black and white text ; they can display colors and formatted texts thanks to escape sequences. Those sequences are composed of the Escape character (often represented by “^[” or “<Esc>”) followed by some other characters: “<Esc>[FormatCodem”.

In Bash, the <Esc> character can be obtained with the following syntaxes:

  • `\e`
@viniciusdaniel
viniciusdaniel / proxy_start.sh
Created April 12, 2019 17:00
proxy http over proxy socks
#!/bin/bash
logFlogPath=/tmp/polipo.log;
cachePath=/tmp/polipo_cache;
socksPort=8123;
httpPort=8124;
proxyHost=127.0.0.1;
gatewayServer=10.0.0.1;
# Catch ctrl + c and close all stuff
@viniciusdaniel
viniciusdaniel / bcm57765or57785fix
Created October 26, 2019 17:47 — forked from samgooi4189/bcm57765or57785fix
Fixing Broadcom Corporation BCM57765/57785 SDXC/MMC Card Reader
Follow the WORKAROUND:
1. Add a comand to /etc/rc.local, add the following line above "exit 0":
setpci -s 00:1c.2 0x50.B=0x41
2. Add the same comand to /etc/apm/resume.d/21aspm (which does not exist yet):
setpci -s 00:1c.2 0x50.B=0x41
3. Add the following to /etc/modprobe.d/sdhci.conf:
options sdhci debug_quirks2=4
4. Re-generate initrd:
sudo update-initramfs -u -k all
5. Reboot or reload sdhci module:
@viniciusdaniel
viniciusdaniel / GoogleHackMasterList.txt
Created December 4, 2019 15:58 — forked from xiaoxiaoleo/GoogleHackMasterList.txt
The definitive super list for "Google Hacking".
admin account info" filetype:log
!Host=*.* intext:enc_UserPassword=* ext:pcf
"# -FrontPage-" ext:pwd inurl:(service | authors | administrators | users) "# -FrontPage-" inurl:service.pwd
"AutoCreate=TRUE password=*"
"http://*:*@www&#8221; domainname
"index of/" "ws_ftp.ini" "parent directory"
"liveice configuration file" ext:cfg -site:sourceforge.net
"parent directory" +proftpdpasswd
Duclassified" -site:duware.com "DUware All Rights reserved"
duclassmate" -site:duware.com
@viniciusdaniel
viniciusdaniel / google-hacking-techniques.md
Last active August 20, 2024 21:20
COPY - Exploring Google Hacking Techniques
@viniciusdaniel
viniciusdaniel / cnpj_validator.php
Last active May 6, 2021 23:26 — forked from guisehn/gist:3276302
Validar CNPJ (PHP)
<?php
function validar_cnpj($cnpj)
{
// Limpa caracteres e mantem apenas dígitos
$cnpj = preg_replace('/[^0-9]/', '', (string) $cnpj);
// Valida tamanho
if (strlen($cnpj) != 14)
return false;