Skip to content

Instantly share code, notes, and snippets.

View litra.ps1
# Sources:
# - https://ultracrepidarian.phfactor.net/category/computer-science/
# - https://www.reddit.com/r/LogitechG/comments/sacz2x/comment/hyfx2xo/?utm_source=share&utm_medium=web2x&context=3
param (
[Parameter(Mandatory = $true)]
[ValidateSet('On', 'Off')]
[String]$state,
[ValidateRange(1, 100)]
@gpailler
gpailler / opnsense_clientvpn_toggle.py
Last active Jan 31, 2021
Python script to retrieve OpenVPN clients states and enable/disable a specific connection
View opnsense_clientvpn_toggle.py
# usage:
# opnsense_clientvpn_toggle.py returns a Json object with log and selected connection state
# opnsense_clientvpn_toggle.py to retrieve all OpenVPN clients states
# opnsense_clientvpn_toggle.py [ID] to retrieve specific OpenVPN client state in an additional "connected" Json field
# opnsense_clientvpn_toggle.py [ID] [(true|false)] to toggle a OpenVPN client state
import requests
import re
import sys
import json
View keybase.md

Keybase proof

I hereby claim:

  • I am gpailler on github.
  • I am gpailler (https://keybase.io/gpailler) on keybase.
  • I have a public key whose fingerprint is 1DD6 32D9 F1E7 D2ED 9ACE 6591 2302 6FF3 2AAB 1450

To claim this, I am signing this object: