How to make virus using javascript? | Sololearn: Learn to code for FREE!

-13

How to make virus using javascript?

10/26/2016 9:20:06 AM

Rohit Yadav

13 Answers

New Answer

+11

There is no such a thing as a JS virus. But, you still can run some scripts to collect some data. The most widespread example is to use JS to get like on FB etc. it's simple and nothing like virus, however it's a trick and you can try on your system. Hint: you can use CharCode() to trick non computer guys. There is a sample CharCode in my profile, take a look to get the basic idea.

+7

@Zen because it's one of the main parts of the programming and if you want to know how to secure your stuff you better know how to do it by yourself. BTW it's not a advanced thing and he should still use his skills to done it. We are here to learn and hack(in a good way) so I prefer to share my knowledge and learn new things including bad stuff.

+6

console.log("I am a virus, you are infected, be afraid")

+4

@zen - I agree with Aar0n on this. Although I agree hacking is genreally seen as "the bad hacking" these days, thats only because most people don't fully understand hacking and so don't realise that there are the white hats or ethical hackers and the black -hats. Knowledge is a free thing. None of us here have the right to tell people what they are and aren't allowed to learn. It's a legitimate question. If @Rohit Yadav decides that he wants to use what he learns for nefarious purposes, then he does so of his own back. No one here is responsible for his actions, only himself.

+2

not a good questions . but FYI viruses are created for some specific destructive purposes also it have capability to recreate itself. so here you can access data of an application if it has security breaches. testing these kind of stuffs are good for making secure applications .there are lot of application scanner s in market which tell u vulnerabilities and resolutions. still you have to learn it itself nobody is going to teach

+2

you can't because browsers will block even a slightest thing logging it as access denied. js can only change dom and nothing else more. thanks to it it provides security it has no access to os. it cannot even change the browser system. I think browser should complete remove such malicious commands from their engine instead of blocking

+1

what do you need it for ;)

+1

javascript have no access to OS environment

0

@Aar0n: Why the heck would you encourage that kind of behavior?

0

I get it and like what is said.

0

krijg de corona ik wil gekke virussen

0

Well, JavaScript is a wide term these days. You can program executables, that use JavaScript in some sense, as you do with electron (Discord, Visual Studio Code). But if you mean JavaScript in the webbrowser, I need to disappoint you. Webbrowsers would never allow JavaScript to leave the webpage environment because if they would, any webpage could access your computer.

0

virus code: while(true){ alert("you got a virus") }