This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Run this in an elevated PowerShell prompt | |
<# This script worked on a fresh Windows Server 2012 VM in Azure and the following were the latest versions of each package at the time: | |
* Chocolatey 0.9.8.27 | |
* java.jdk 7.0.60.1 | |
* apache.ant 1.8.4 | |
* android-sdk 22.6.2 | |
* cordova 3.5.0-0.2.6 | |
* nodejs.install 0.10.29 | |
#> | |
# Note: there is one bit that requires user input (accepting the Android SDK license terms) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
# Simple Image Resizing API | |
# | |
# A simple HTTP API for resizing an image (given by the URL). | |
# This small and dirty ad hoc web application is entirely written in | |
# PHP 5.3+ with GD. The source code is distributed under Public License. | |
function is_url($string, $scheme = null) { | |
$url = parse_url($string); | |
if (!isset($url['scheme'])) return false; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
. /usr/local/knock/library | |
#Lista de portas na ordem da sequencia | |
ports=(34 1032 43231 456) | |
#Porta a Ser desbloqueada | |
safePort=29 | |
#Comando tshark (wireshark para console) | |
#customizado para exibir apenas | |
#ip de origem e porta de destino | |
tshark -n -l -f "tcp and dst 177.70.2.30 and tcp[tcpflags] & (tcp-syn) != 0 and tcp[tcpflags] & (tcp-ack) = 0" -E separator=":" -Tfields -e ip.src -e tcp.dstport | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
IP=^^ | |
if who --ips | grep " "${IP}$ >/dev/null | |
then | |
###Reagendar | |
echo reagendar | |
cat /usr/local/bin/knock-agenda | | |
sed 's/\^\^/'${IP}'/' | | |
at `date --date="+2 hours" "+%H:%M %m/%d/%Y"` | |
else |
NewerOlder