Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7906073
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T10:45:55+00:00 2026-06-03T10:45:55+00:00

How can i extract all the strings present in script tags. I want to

  • 0

How can i extract all the strings present in script tags. I want to extract each string and find whether any shellcode is present. But javascript uses several methods in declaring a string For example a string can be

 var y="Some text";
 var x1 = "3+4";
 eval("\144\157\143\165\155\145\156\164"); //string given in eval();

It can be in a concatenated format

var x1 = "te ActiveX Co"; var x2 = "ntrol"; var x3 = x1 + x2; 
var x4 = "Execu" + x3;

How can i identify each and every string even if it is defined in eval() or document.write() by using simple javacript code.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T10:45:57+00:00Added an answer on June 3, 2026 at 10:45 am

    This is a very complex problem for which there is no simple solution.

    You could use a parser generator and the BNF definition of the ECMAScript language (surely you can find it on the web somewhere) to extract strings from the target source code.

    [Edit] Since the linked parser generator is written in JavaScript and supports web browsers as a platform you can generate a custom ECMAScript parser, embed it in a page, and fetch all the embedded script source (e.g. $('script').map(function(){return $(this).text();})). Note that your custom parser could simply echo the parsed strings, e.g. via console.log(...).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

The Cassandra command-line utility sstablekeys can be used to extract all defined row keys
Good day, I need to extract portion of string which can looks like this:
Simply put, I need to extract all strings enclosed in curly braces from a
How can you extract strings from messages in NodeJS? Specifically I'm modifying a simple
I am crawling a page www.thenextweb.com I want to extract all the post links,
Folks, I tired all my PHP skills to extract domain name strings from a
I'm trying to find all strings of the format {{rdex|001|001|Bulbasaur|2|Grass|Poison}} in a large text
I can extract the month and day by using Day(Date()) , Month(Date()) . I
We can extract the mimetype from byte array, e.g., by using Apache Tika. Is
To have a general-purpose documentation system that can extract inline documentation of multiple languages,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.