Skip to content

Instantly share code, notes, and snippets.

View cliffordwhansen's full-sized avatar

Clifford W. Hansen cliffordwhansen

View GitHub Profile
@leomos
leomos / connect-to-fortigate.sh
Created May 10, 2016 18:43
Fortigate firewall connection
#!/bin/bash
USER="user"
PASSWORD="password"
SEP="+++++"
TMP=`curl -s -D - www.google.it | grep Location`
echo "Header with magic: "$TMP
MAGIC=`echo $TMP | grep -o '[[:alnum:]]\{16\}' | tr -d '\r\n'`
echo "Magic extracted from header: "$MAGIC