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 | |
Title Cloudflare DNS Auto Configurator | |
set first_server= "1.1.1.1" | |
set second_server= "1.0.0.1" | |
:checkPrivileges | |
NET FILE 1>NUL 2>NUL | |
if '%errorlevel%' == '0' ( goto gotPrivileges ) else ( goto getPrivileges ) |
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
const Vector3 = class { | |
x = 0; | |
y = 0; | |
z = 0; | |
constructor(x, y, z) { | |
this.x = x; | |
this.y = y; | |
this.z = z; |
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
if [ -z "$1" ]; | |
then echo "execute ./get_certificate.sh <domain_name>"; | |
else | |
openssl s_client -showcerts -connect ["$1"]:443 </dev/null | sed -n -e '/-.BEGIN/,/-.END/ p' > certifs.pem | |
xxd -i certifs.pem </dev/null | sed -e 's/unsigned char .* = {/const unsigned char cacert_pem[] = {/g' -e 's/unsigned int .* = .*;//g' > certificates.h | |
echo "unsigned int cacert_pem_len = sizeof(cacert_pem);" >> certificates.h | |
rm certifs.pem | |
echo "Done, check certificates.h!" | |
fi |