Forum Discussion

ctr_159227's avatar
ctr_159227
Historic F5 Account
Jul 27, 2016

Get html code of an BIG-IP page through curl/code

Hello Folks

 

Greetings I am looking for info on how i can get/access html content of an BIG-IP page using curl or code. When i tried to access in curl using it shows http code 302 (Redirection error for login). Is there way to pass auth info in the request when trying to access page.

 

In browser, when i am logged in i can access below page content, but i would to do it through curl or code. In browser, ui session seems to be passing these cookie info (BIGIPAuthCookie=sdfsdfsd; BIGIPAuthUsernameCookie=admin), but not sure how to create this through code.

 

shell curl -k -u admin:admin https://10.xxx.xxx.xx/sam/admin/vpe2/public/php/supportTable.php

 

here</p>

 

Thanks

 

7 Replies

    • ctr_159227's avatar
      ctr_159227
      Historic F5 Account

      Goal is to get/scrape the data (as this data is not exposed through API currently) from this page fully within java code, without manual intervention. Parsed data from this page is used some where else.

       

      Dont have much experience with cookies, even if i capture the login request from BIG-IP UI as curl command in dev tools in chrome, curl command fails in shell.

       

    • ctr_159227's avatar
      ctr_159227
      Historic F5 Account

      Goal is to get/scrape the data (as this data is not exposed through API currently) from this page fully within java code, without manual intervention. Parsed data from this page is used some where else.

       

      Dont have much experience with cookies, even if i capture the login request from BIG-IP UI as curl command in dev tools in chrome, curl command fails in shell.

       

  • ctr_159227's avatar
    ctr_159227
    Historic F5 Account

    Thanks. I haven't tried this, I doubt rest token will work with BIG-IP UI. I am dev, I need the scrape the html content, to use this information some where else.

     

  • i doubt you can create those, the big-ip will send you them after successful auth.

     

    i would look into curl examples where you login to a website first and try to duplicate that for the big-ip. it might be you will have to use a scripting language.