Last active
August 15, 2022 03:45
-
-
Save ImaginaryBIT/f8958beabcc8be7f6020025c75a130ff 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
$id = get-random | |
$code = @“ | |
using System; | |
using System.Threading; | |
namespace HelloWorld | |
{ | |
public class Program$id | |
{ | |
[System.Runtime.InteropServices.DllImport(“user32.dll”)] | |
public static extern void mouse_event(int dwFlags, int dx, int dy, int cButtons, int dwExtraInfo); | |
public const int MOUSTVENTF_LEFTDOWN = 0x02; | |
public const int MOUSTVENTF_LEFTUP = 0x04; | |
public static void Main(){ | |
int hour = 2; | |
int round = 6; | |
int total = hour * round; | |
while(total >0) | |
{ | |
mouse_event(MOUSTVENTF_LEFTDOWN,640,360,0,0); | |
mouse_event(MOUSTVENTF_LEFTUP,640,360,0,0); | |
Thread.Sleep(300000); | |
mouse_event(MOUSTVENTF_LEFTDOWN,640,360,0,0); | |
mouse_event(MOUSTVENTF_LEFTUP,640,360,0,0); | |
Thread.Sleep(300000); | |
total--; | |
} | |
} | |
} | |
} | |
“@ | |
Add-Type -typeDefinition $code -Language CSharp | |
iex “[HelloWorld.Program$id]::Main()” |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment