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 | |
# Based on | |
# Authentication https://github.com/d3suu/ZTE_MF971V_CurlAuth/blob/master/zte_login_pin.sh | |
# SMS parsing https://gist.github.com/mariodian/65641792700d237d30f3f47d24c746e0 | |
# Cookie things https://stackoverflow.com/questions/15995919/how-to-use-curl-to-send-cookies | |
URL=http://192.168.1.1 | |
PASSWORD="XXXX" |
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
static function OnBeforeRequest(oSession: Session) { | |
if (oSession.RequestMethod == 'GET' && oSession.PathAndQuery.IndexOf('part_of_your_url') > 0) { | |
oSession.utilCreateResponseAndBypassServer(); | |
oSession.oResponse.headers.HTTPResponseCode = 401; | |
oSession.oResponse.headers.HTTPResponseStatus = '401 Not Authorized'; | |
oSession.oResponse.headers['Access-Control-Allow-Origin'] = '*'; | |
oSession.utilSetResponseBody('response_body'); | |
} | |
} |
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
@echo off | |
fltmc >nul 2>&1 || ( | |
echo This batch script requires administrator privileges. Right-click on | |
echo the script and select "Run as administrator". | |
goto :die | |
) | |
rem Change this path if you are using Community or Professional editions | |
set "VS_INSTALL_DIR=%ProgramFiles(x86)%\Microsoft Visual Studio\2019\Enterprise" |