Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Show hidden values in chrome

Tags:

I was wondering if there is a way to show the values for the key variable? There isn't a check for the answers, and I cannot for the life of me find out the answer. Please help:

<form method="post" action="/webwork2//Section13.3/5/" 
  enctype="multipart/form-data" id="problemMainForm" name="problemMainForm" onsubmit="submitAction()">
  <input type="hidden" name="user" value="name" id="hidden_user" />
  <input type="hidden" name="effectiveUser" value="name" id="hidden_effectiveUser" />
  <input type="hidden" name="key" value="ZHaiEU4qkcpMc1m2kBaYrMvbOo5TktAY" id="hidden_key" />
</form>
like image 957
Michael Mosca Avatar asked Jul 06 '17 09:07

Michael Mosca


People also ask

How do I show hidden elements in Chrome?

VIEW HIDDEN ELEMENTS: The extension makes visible those elements hidden by the "display:none", "type=hidden", and "visibility=hidden" attributes / styles. To do this hit LazySec's "Show Hidden Elements" button.

How do I get rid of hidden inspect?

Use the Document Inspector to Remove Hidden Data To open the Document Inspector, click File > Info > Check for Issues > Inspect Document. The Excel Document Inspection window shown below opens up. Click Inspect to identify hidden content, and then click Remove All to remove the item of your choice.

How do I hide hidden fields in inspect element?

It is not possible to hide elements from the DOM inspector, that would defeat the purpose of having that tool. Disabling javascript is all it would take to bypass right click protection. What you should do is implement a proper autologin.


1 Answers

This simple JavaScript function makes visible all hidden inputs on the site:

function showHiddenInputs() {
    inputs = Array.from(document.getElementsByTagName('input'));
    inputs.forEach((input) => {
        if (input.type === 'hidden')
            input.type = 'text';
})}

showHiddenInputs();

One-liner to the browser console:

inputs = Array.from(document.getElementsByTagName('input')); inputs.forEach((input) => { if (input.type === 'hidden') input.type = 'text'; })

If you wanna get value only from element with name "key", use this in console:

document.getElementsByName('key')[0].value

You can use any other number instead of 0, if there are multiple elements with name "key" or you can use this loop:

elements = Array.from(document.getElementsByName('lsd'));
elements.forEach((element) => {
    if (element.type === 'hidden')
        console.log(element.value);
})
like image 178
BlueManCZ Avatar answered Sep 23 '22 11:09

BlueManCZ