Jump to content

.htaccess and .htpasswd


legend
 Share

Recommended Posts

Hi. I have made a .htaccess file:

AuthUserFile /home/fileprot/public_html/test/.htpasswd
AuthType Basic
AuthName "My Files"
Require valid-user

and in my .htpasswd the login is stored.

It's a simple authentication.

Does anyone knows how I would make a autoit script that authenticates with that login?

Posted Image

(I need it all to authenticate silent, maybe winhttp can do it?)

Edited by legend
Link to comment
Share on other sites

I made a hardware authentication script, and I make only the script being able to get the content on the webhost, by using a custom user agent (htaccess)

the problem is, you can just spoof the user agent, and then get access, therefor this could solve the problem, by storing the login in the compiled autoit script, and then making it authenticate

if it's possible to do that hidden

Edited by legend
Link to comment
Share on other sites

I tried this:

#include 
;========================>
$hInternet = _WinHttpOpen()

$hConnect = _WinHttpConnect($hInternet, "site.net/test")
$hRequest = _WinHttpOpenRequest($hConnect, "GET", "/")
If _WinHttpSetCredentials($hRequest, $WINHTTP_AUTH_TARGET_SERVER, $WINHTTP_AUTH_SCHEME_BASIC, "testuser", "testpass") = 0 Then
MsgBox(16, "Fehler", "_WinHttpSetCredentials ist fehlgeschlagen. Errorcode: " & @error)
EndIf
_WinHttpSendRequest($hRequest)
If @error Then MsgBox(16, "Error", ",..")
_WinHttpReceiveResponse($hRequest)
$sRead = ""
Do
$sRead &= _WinHttpReadData($hRequest)
until @error

InetGet("http://www.site.net/test/test.txt", @scriptdir & "\test.txt")

but didn't work

Link to comment
Share on other sites

  • Moderators

legend,

Two things:

- 1. Please read the Forum rules (the link is also at bottom right of each page) - particularly the bit about not discussing log-in and security dialogs - before you post again.

- 2. Your use of a "password sniffer" was reported before you edited your posts and I have seen the images. Not something we want to see here - do not do it again.

As a result - thread locked. :naughty:

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...