Skip to content

Instantly share code, notes, and snippets.

@ryancbutler
Created January 11, 2020 16:04
Show Gist options
  • Save ryancbutler/ab837d61163b4a8613fd8aafe21ceb85 to your computer and use it in GitHub Desktop.
Save ryancbutler/ab837d61163b4a8613fd8aafe21ceb85 to your computer and use it in GitHub Desktop.
#!/usr/bin/bash
nscli -U 127.0.0.1:nsroot:nsroot enable ns feature responder
nscli -U 127.0.0.1:nsroot:nsroot add responder action respondwith403 respondwith '"\"HTTP/1.1 403 Forbidden\r\n\r\n\""'
nscli -U 127.0.0.1:nsroot:nsroot add responder policy ctx267027 '"HTTP.REQ.URL.DECODE_USING_TEXT_MODE.CONTAINS(\"/vpns/\") && (!CLIENT.SSLVPN.IS_SSLVPN || HTTP.REQ.URL.DECODE_USING_TEXT_MODE.CONTAINS(\"/../\"))"' respondwith403
nscli -U 127.0.0.1:nsroot:nsroot bind responder global ctx267027 1 END -type REQ_OVERRIDE
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment