I am trying to write a script to test a Suricata network signature. To do this I need to simulate the same user agent as the malware. I tried the following.
$.ajaxSetup({
beforeSend: function(request) {
request.setRequestHeader("User-Agent","XAgent/1.");
}
});
$.ajax({
url: "localhost",
type: "GET"
});
But I got the error Refused to set unsafe header "User-Agent"
.
I have also tried WebSocket
and socket.io.js
but each of those do not allow me to actually send a raw HTTP request.
What I want is a tool like telnet
in the browser so I can just send the raw HTTP request and define all the fields, but this seems not possible. Is there any way I can do this?