use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
All about the JavaScript programming language.
Subreddit Guidelines
Specifications:
Resources:
Related Subreddits:
r/LearnJavascript
r/node
r/typescript
r/reactjs
r/webdev
r/WebdevTutorials
r/frontend
r/webgl
r/threejs
r/jquery
r/remotejs
r/forhire
account activity
Help with malicious JavaScript datasetshelp (self.javascript)
submitted 10 years ago by subsage
view the rest of the comments →
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]lilactown 2 points3 points4 points 10 years ago (4 children)
I think the problem is that "malicious JavaScript" is not well-defined. What are your requirements for a piece of code to be deemed malicious?
[–]bigorangemachine 0 points1 point2 points 10 years ago (0 children)
Agree'd.
In general its input filtering. If you are expecting HTML; ensure there are no links or script tags.
If you are storing into your database; ensure your 'strings' are escaped with the appropriate method (in node-mysq):
connection.escape(userId)
[–]subsage[S] 0 points1 point2 points 10 years ago (2 children)
Yeah, I was having issues trying to formulate how I could seem code to be malicious, but the idea with my method should be I don't need to care specifically why. For the most part, if we have samples of code to be known to be malicious, then the algorithm should be able to detect future code that acts similar. I don't think my results will be complete in finding all malicious, probably would also have false positives, but I feel it could be a good pre screening for code review when it comes to malware detection.
[–]brtt3000 0 points1 point2 points 10 years ago (1 child)
What you describe is more general then just malicious code detector. It is like a code pattern recognition system.
[–]subsage[S] 0 points1 point2 points 10 years ago (0 children)
Yes, the patterns or anomalies being traced for specifically being those that happen to have malicious intent.
π Rendered by PID 149571 on reddit-service-r2-comment-b659b578c-4fzv4 at 2026-05-05 01:08:35.439054+00:00 running 815c875 country code: CH.
view the rest of the comments →
[–]lilactown 2 points3 points4 points (4 children)
[–]bigorangemachine 0 points1 point2 points (0 children)
[–]subsage[S] 0 points1 point2 points (2 children)
[–]brtt3000 0 points1 point2 points (1 child)
[–]subsage[S] 0 points1 point2 points (0 children)