Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

96
Views
add decrypted javascript inside of javascript

I am trying to add decrypt javascript and it is not working

    var decrypedjs = "alert(\"test\")" //for example;
    function start() {
    decrypedjs
    };

and the html

<button onclick="start()">started</button>

i have looked at so many sources and what i am finding is not really helpful or not working.

var newScript = document.createElement("script");
var inlineScript = document.createTextNode("alert('Hello World!');");
newScript.appendChild(inlineScript); 
target.appendChild(newScript);
about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

I'm not going to comment on any security point other than to not use eval with external sourced strings (post-, get parameters, etc), but you're looking for the eval method:

https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/eval

    var decrypedjs = "alert(\"test\")" //for example;
    
    function start() {
      eval(decrypedjs);
    };
    
    start();

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!