This file contains 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 | |
# Uncomment the following line to debug the script: | |
#set -x | |
##################################################################################### | |
# fuckForticlient.sh | |
# | |
# Script to authenticate against Fortinet SAML servers using Firefox and | |
# openfortivpn. This replaces Forticlient for GNU/Linux completely. | |
# Because openfortivpn does not support SAML login (yet), this script uses Firefox | |
# to authenticate, grabs SVPNCOOKIE and then calls openfortivpn to setup |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains 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
isexpr(x::Expr, ts...) = x.head in ts | |
isexpr{T}(x::T, ts...) = T in ts | |
macro with(exprs...) | |
exprs = collect(exprs) | |
target = nothing | |
if length(exprs) > 1 && !isexpr(exprs[end], :(::)) | |
target = esc(exprs[end]) | |
pop!(exprs) | |
end |