How to Parse this?



  • i am trying to make a config but facing a problem hope to be solved here

    i need to parse a key from source but the source have many keys i need one which i cant parse because source code is same with each key look here```
    <div class="login-panel align-left">
    <div class='myloginform' id='ecc6ad2efa44de13f118b60ed8da2a90' ngShowLogin><div id="component-login" class="component-login-panel">
    <form action="https://www.xxxxxxx.com/login" method="post" class="form-detail">
    <label class="cookies-only" for="login[username]">Username:</label> <input class="text-input cookies-only" autocomplete="off" name="login[username]" value /> <label class="cookies-only" for="login[password]">Password:</label> <input class="text-input cookies-only" type="password" autocomplete="off" name="login[password]" value /> <input class="button button-big cookies-only" type="submit" value="Sign in" /> <input class="cookies-only" type="checkbox" name="login[remember_me]" value="checked" /> <label class="label-remember cookies-only" for="login[remember_me]">Remember Me</label> <span class="text-inline no-cookies-only"><a href="https://www.xxxxxxx.com/login/">Login</a></span>
    <span> | <a href="https://www.xxxxxxx.com/signup/">Register</a></span>
    <span> | <a href="https://www.xxxxxxx.com/retrieve_password">Forgot your password?</a></span>
    <input type="hidden" name="d5d9c50cddb8e5c7d2cebd62ad4aaac8" value="b1fd35fc9d1a11fa77c03ab15621e229" /> </form>
    </div>

    </div><div class='myloginform' id='fa716d10e9b75dd8ac60fd1ce74f1ad0' ngShowLogin><div id="component-login" class="component-login-panel">
    <form action="https://www.xxxxxxx.com/login" method="post" class="form-detail">
    <label class="cookies-only" for="login[username]">Username:</label> <input class="text-input cookies-only" autocomplete="off" name="login[username]" value /> <label class="cookies-only" for="login[password]">Password:</label> <input class="text-input cookies-only" type="password" autocomplete="off" name="login[password]" value /> <input class="button button-big cookies-only" type="submit" value="Sign in" /> <input class="cookies-only" type="checkbox" name="login[remember_me]" value="checked" /> <label class="label-remember cookies-only" for="login[remember_me]">Remember Me</label> <span class="text-inline no-cookies-only"><a href="https://www.xxxxxxx.com/login/">Login</a></span>
    <span> | <a href="https://www.xxxxxxx.com/signup/">Register</a></span>
    <span> | <a href="https://www.xxxxxxx.com/retrieve_password">Forgot your password?</a></span>
    <input type="hidden" name="d5d9c50cddb8e5c7d2cebd62ad4aaac8" value="e4a21bcaa42df90a4edaabef702267c9" /> </form>
    </div>

    </div><div class='myloginform' id='4172b7e883bb35e31baf4921a7679741' ngShowLogin><div id="component-login" class="component-login-panel">
    <form action="https://www.xxxxxxx.com/login" method="post" class="form-detail">
    <label class="cookies-only" for="login[username]">Username:</label> <input class="text-input cookies-only" autocomplete="off" name="login[username]" value /> <label class="cookies-only" for="login[password]">Password:</label> <input class="text-input cookies-only" type="password" autocomplete="off" name="login[password]" value /> <input class="button button-big cookies-only" type="submit" value="Sign in" /> <input class="cookies-only" type="checkbox" name="login[remember_me]" value="checked" /> <label class="label-remember cookies-only" for="login[remember_me]">Remember Me</label> <span class="text-inline no-cookies-only"><a href="https://www.xxxxxxx.com/login/">Login</a></span>
    <span> | <a href="https://www.xxxxxxx.com/signup/">Register</a></span>
    <span> | <a href="https://www.xxxxxxx.com/retrieve_password">Forgot your password?</a></span>
    <input type="hidden" name="d5d9c50cddb8e5c7d2cebd62ad4aaac8" value="ee9b216b9e5f2ffbfc512329424d6084" /> </form>
    </div>

    </div><div class='myloginform' id='039763018ce4e0565b4dd9368331f530' ngShowLogin><div id="component-login" class="component-login-panel">
    <form action="https://www.xxxxxxx.com/login" method="post" class="form-detail">
    <label class="cookies-only" for="login[username]">Username:</label> <input class="text-input cookies-only" autocomplete="off" name="login[username]" value /> <label class="cookies-only" for="login[password]">Password:</label> <input class="text-input cookies-only" type="password" autocomplete="off" name="login[password]" value /> <input class="button button-big cookies-only" type="submit" value="Sign in" /> <input class="cookies-only" type="checkbox" name="login[remember_me]" value="checked" /> <label class="label-remember cookies-only" for="login[remember_me]">Remember Me</label> <span class="text-inline no-cookies-only"><a href="https://www.xxxxxxx.com/login/">Login</a></span>
    <span> | <a href="https://www.xxxxxxx.com/signup/">Register</a></span>
    <span> | <a href="https://www.xxxxxxx.com/retrieve_password">Forgot your password?</a></span>
    <input type="hidden" name="d5d9c50cddb8e5c7d2cebd62ad4aaac8" value="bc6de358b991fb94facbdcdc75578425" /> </form>

    i need to paerse value="ee9b216b9e5f2ffbfc512329424d6084" /> this key which is in 3rd section but dont know how please help


  • Click on PARSE
    and do REGEX SEARCH

    <input type="hidden" name="." value="(.?)"

    OUTPUT
    [1]



  • @yabbas

    I did but nothing parse mean empty



  • try this maybe work:

    #TOKEN PARSE "<SOURCE>" REGEX "<input type=\"hidden\" name=\".*\" value=\"([^>]*)\" /> </form>" "[1]" Recursive=TRUE -> VAR "TOKEN" 
    
    #TOKEN_3 PARSE "<TOKEN[2]>" LR "" "" -> VAR "TOKEN3" 
    

  • Admin

    Guys please can you use markdown syntax to post code? Otherwise * gets interpreted as italic and nothing works
    Read here https://www.markdownguide.org/basic-syntax



  • Sorry Admin



  • @percebal42 NOT WORK EITHER 🙂



  • Check if the name of this change automatically.
    If it changes, you have to use 2 blocks, one to parse the name and another one to parse the value
    In case it's not, just parse the value ie => [name="xxxx"], attribute=value



  • @percebal42 worked for me


Log in to reply