Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

98
Visualizações
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 Respostas
Responde à pergunta

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 Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda