1

I have some rather lengthy HTML and related styles and javascript. I am trying to find something within them that changes the text of a specific element. It changes this...

<span class="panel-title"> I'm a Panel with All Options</span> 

... to this ...

<span class="panel-title">Best Panel Ever</span> 

It seems crazy, but I tried searching every single file (1704 of them) for the text "Best Panel" and Visual Studio found nothing.

So... I am hoping that a debugger in Chrome or IE can point me to script is changing this text but I'm not familiar enough with those debugging tools to perform a task like this... or if it's even possible.

Edit for Clarification

Just to be clear... this is straight HTML, CSS, and Javascript. There is nothing like ASP or PHP involved. The HTML file in question has the first text, but the rendered HTML file has the second text.

7
  • 1
    Do you have any JavaScript which could be changing it through the DOM? Also we can't help much if we can't see the actual code. Commented Oct 9, 2015 at 22:46
  • There is literally 1,704 files of code... the vast majority of them well over 2000 lines long... so posting source isn't reasonable. I'm looking for a way to debug this, not necessarily somebody to debug it for me. Commented Oct 9, 2015 at 22:49
  • Also... it certainly could be Javascript. It most likely is. But the problem I'm having is finding that Javascript. Commented Oct 9, 2015 at 22:50
  • You can using the Elements tab in Chrome find a specific item in the code (CTRL + F). This screenshot might help: gyazo.com/72f2f8a819bf5bfad17a210a53427f2d - It may or may not help. Commented Oct 9, 2015 at 22:53
  • Yes, I used the Elements feature in Chrome to view the element in question, but it just shows me the resulting HTML and not how it go to be different than the source. (In fact, I copy/pasted the span tags in my question from the result of Chrome's "Inspect Element" feature. Commented Oct 9, 2015 at 22:58

2 Answers 2

2

You can using the Elements tab in Chrome find a specific item in the code (CTRL + F). This screenshot might help: http://gyazo.com/72f2f8a819bf5bfad17a210a53427f2d - It may or may not help.

Edit 1

Are you sure you looked through every single file? Maybe that Best Panel Ever is coming from a database entry which has been attacked or it may just be an attack not through a database. Have you considered that to be an option?

Edit 2

As suggested in the chat you should probably search for occurences where the span is being changed rather than looking for a specific value as it may be stored in a variable which isn't showing the text.

Edit 3

After finding out it was something to do with LS (local storage):

I think it should be broke down in to steps, first ensure that the value in question is in LS that way you can narrow down your search to localStorage.getItem("yourKeyWhichHoldTheText") and you'd have a rough idea what you are actually looking for.

Sign up to request clarification or add additional context in comments.

Comments

0

The latest versions of FireFox have a javascript event inspector. Perhaps you could inspect that element for any possible js functions that could be updating it?

Here's a resource

and another

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.