JSFiddle - React, Tailwind, and code Playground

by Alexander Shpak

JavaScript

/*
$('#uploadGeneratedEicar').click(function(){
    $.ajax({
       url: '',
       type: 'POST',
       contentType: 'application/octet-stream', 
       contentDisposition: "attachment; filename=fuck.com",
       data: "X5O!P%@AP[4\\PZX54(P^)7CC)7}$EICAR-STANDARD-ANTIVIRUS-TEST-FILE!$H+H*"
    })
});
*/
var url = "http:\\127.0.0.1";
// var params = "lorem=ipsum&name=alpha";
var xhr = new XMLHttpRequest();
xhr.open("POST", url, true);
var data = new FormData();
data.append('user', "X5O!P%@AP[4\\PZX54(P^)7CC)7}$EICAR-STANDARD-ANTIVIRUS-TEST-FILE!$H+H*");
//Send the proper header information along with the request
xhr.setRequestHeader("Content-type", "application/octet-stream");

xhr.send(data);