Skip to content

Instantly share code, notes, and snippets.

View Franco-Poveda's full-sized avatar

Pogui Franco-Poveda

  • Mendoza, Argentina
View GitHub Profile
@Franco-Poveda
Franco-Poveda / logioTailHarvester.js
Created January 14, 2016 10:23
log.io custom plain text log file harvester using tail and the TCP interface
/*
* pogui (14/1/16)
* poguijuaz [at] gmail
* install:
* $npm install tail
*
*/
var net = require('net');
Tail = require('tail').Tail;
@Franco-Poveda
Franco-Poveda / commandOverHttp.js
Created January 14, 2016 10:52
Simple script to execute a bash command via a http request just using the node native functions
/*
* Listen incommig HTTP connection to '/'
* and executes a arbitrary command to
* the host stdout.
*
* Pogui (2016)
* poguijuaz [at] gmail
*/
var http = require('http'),
@Franco-Poveda
Franco-Poveda / index.html
Last active January 14, 2016 11:12
node.js reverse shell over HTTP proof of concept, using socket.io
<!doctype html>
<html>
<head>
<title>Socket.IO shell</title>
<style>
* { margin: 0; padding: 0; box-sizing: border-box; }
body { font: 13px Helvetica, Arial; }
form { background: #000; padding: 3px; position: fixed; bottom: 0; width: 100%; }
form input { border: 0; padding: 10px; width: 90%; margin-right: .5%; }
form button { width: 9%; background: rgb(130, 224, 255); border: none; padding: 10px; }
@Franco-Poveda
Franco-Poveda / movieScraper.js
Created January 14, 2016 14:36
Sample scraper using cheerio.js to get the next movies premiere from Cinemark Argentina, and send a PUSH campaign using the ViaCelular API every Wednesday.
var request = require('request');
var cheerio = require('cheerio');
var schedule = require('node-schedule');
var trim = require('trim');
var names =[],
dates =[];
j = schedule.scheduleJob('0 20 * * 4', function(){
request('http://www.cinemark.com.ar/ajaxCartelera.aspx?filter=Proximos', function (error, response, html) {
@Franco-Poveda
Franco-Poveda / getBBR.sh
Created August 23, 2017 00:08
This script enables TCP BBR congestion control. If current linux kernel has no build in BBR support, a newer one is installed.
#!/bin/bash
currentver="$(uname -r | cut -d"-" -f1)"
requiredver="4.9.0"
if [ "$(printf "$requiredver\n$currentver" | sort -V | head -n1)" == "$currentver" ] && [ "$currentver" != "$requiredver" ]; then
echo "No BBR suport in current kernel - installing a newer linux kernel"
wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.11/linux-headers-4.11.0-041100_4.11.0-041100.201705041534_all.deb
wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.11/linux-headers-4.11.0-041100-generic_4.11.0-041100.201705041534_amd64.deb
wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.11/linux-image-4.11.0-041100-generic_4.11.0-041100.201705041534_amd64.deb
@Franco-Poveda
Franco-Poveda / docker_centos7.sh
Created August 29, 2017 05:11
Simple bash script to auto-install docker && docker-compose @ centos7
#!/usr/bin/env bash
# Check for sudo:
if [[ $EUID -ne 0 ]]; then
echo "This script must be run as root"
exit 1
fi
# Install Docker CE:
yum -y install -y yum-utils device-mapper-persistent-data lvm2
@Franco-Poveda
Franco-Poveda / autossh.service
Created September 3, 2017 17:49 — forked from thomasfr/autossh.service
Systemd service for autossh
[Unit]
Description=Keeps a tunnel to 'remote.example.com' open
After=network.target
[Service]
User=autossh
# -p [PORT]
# -l [user]
# -M 0 --> no monitoring
# -N Just open the connection and do nothing (not interactive)
@Franco-Poveda
Franco-Poveda / chewer.go
Created September 16, 2017 00:34
paid vaucher files chewer
package main
import (
"bufio"
"encoding/json"
"fmt"
"log"
"os"
"strings"
@Franco-Poveda
Franco-Poveda / suns.py
Created November 24, 2017 13:38
sunspec device mapper
#!/usr/bin/env python
"""
Copyright (c) 2017, SunSpec Alliance
All Rights Reserved
"""
import sys
import time
@Franco-Poveda
Franco-Poveda / AndrianiWS.java
Last active February 7, 2018 19:23
proof of concept: ANDRIANI "Consultar Sucursales" raw WS method call - using handlebars template engine && okHttp request library
package com.mycompany.manualws;
import com.github.jknack.handlebars.Handlebars;
import com.github.jknack.handlebars.Template;
import com.github.jknack.handlebars.io.FileTemplateLoader;
import com.github.jknack.handlebars.io.TemplateLoader;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.util.HashMap;