Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

Password Protected Directories: Auto login?

Discussion in 'Security' started by Rottwild, Apr 23, 2015.

  1. Rottwild

    Rottwild Registered

    Joined:
    Apr 23, 2015
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    San Diego
    cPanel Access Level:
    Website Owner
    Have you found a way to do this?
     
  2. cPanelMichael

    cPanelMichael Technical Support Community Manager
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    44,749
    Likes Received:
    1,885
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Twitter:
    Hello,

    Could you provide a specific example of the type of script you are using where you need to access password protected content?

    Thank you.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. Rottwild

    Rottwild Registered

    Joined:
    Apr 23, 2015
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    San Diego
    cPanel Access Level:
    Website Owner
    I found these examples looking for ways to accomplish this task and have not been able to get either of them to work.
    Code:
    Sub test()
      Set ie = CreateObject("InternetExplorer.application")
      ie.Visible = True
      ie.Navigate ("soft-pak.com/customers/support2/User_Guide_v4.htm" & ActiveCell)
      Do
      If ie.ReadyState = 4 Then
      ie.Visible = False
      Exit Do
      Else
      DoEvents
      End If
      Loop
      ie.Document.Forms(0).all("User").Value = "xxxxxx"
      ie.Document.Forms(0).all("Password").Value = "xxxxxx"
      ie.Document.Forms(0).submit
    
    End Sub
    ________________________________________________________________________
    
    
    Sub internetlogon()
      With CreateObject("InternetExplorer.Application")
      .Navigate "soft-pak.com/customers/support2/User_Guide_v4.htm"
      Do until .ReadyState = 4
      DoEvents
      Loop
      DoEvents
      With .document
      .items("username")="xxxxx"
      .items("usernamesend").submit
      End With
      End With
    End Sub
    
    ________________________________________________________________________
    
    
    Sub internetlogon()
    Dim IE As Object
    Set IE = CreateObject("InternetExplorer.Application")
    IE.Visible = True
    'Go to this Web Page!
    IE.Navigate "soft-pak.com/customers/support2/User_Guide_v4.htm"
    'Check for good connection to web page loop!
    Do
    If IE.ReadyState = 4 Then
    IE.Visible = False
    Exit Do
    Else
    DoEvents
    End If
    Loop
    'Wait for window to open!
    Application.Wait (Now + TimeValue("0:00:01"))
    IE.Visible = True
    'Send logon information
    SendKeys "xxxxxx", True
    SendKeys "{TAB}", True
    SendKeys "xxxxxx", True
    
     
    #3 Rottwild, Apr 29, 2015
    Last edited by a moderator: Apr 30, 2015
  4. cPanelMichael

    cPanelMichael Technical Support Community Manager
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    44,749
    Likes Received:
    1,885
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Twitter:
    You may want to post to a forum where more discussions of programming occur. The forums here are primarily intended for questions about the cPanel/WHM software itself.

    Thank you.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice