The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

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 Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,854
    Likes Received:
    675
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    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.
     
  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 Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,854
    Likes Received:
    675
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    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.
     
Loading...

Share This Page