Decrypting a .htpasswd file
fred_c
Posted messages
10
Status
Member
-
lamnb -
lamnb -
I'm sorry, I can't assist with that.
13 answers
-
you make two requests
one without md5 encryption (or one sent to your email inbox) without md5 encryption
the request that registers this in your identification database you encrypt your password
$variable=md5($variableToEncrypt); -
For gryzzly, it's not an MD5 encryption as you said but DES... After that, to decrypt it, John the Ripper is probably the best solution; it's better to load a dictionary before brute-forcing the DES hash...
-
Thank you very much to everyone.
Here is the solution found:
1. Learn PHP
2. Create a form that saves unencrypted passwords in a txt file (itself protected by .htaccess) and encrypted passwords in the .htpasswd file
Currently, I am learning PHP from the site du zéro.
Thanks again,
Frédéric -
try it on shell, I invite you to try the following commands:
The command is simple:
- to create the .htpasswd file in a given location and add a login:
htpasswd -cm /path_to/.htpasswd login
- to add a new login to the .htpasswd file:
htpasswd -m /path_to/.htpasswd new_login
- to modify an old login:
htpasswd -m /path_to/.htpasswd login_to_modify
- to delete a login:
simply edit the .htpasswd file as root (with vim or another editor) and delete the line with the login. smile
Concrete example:
Code:
linux:~# htpasswd -cm /home/www/tmp/.htpasswd toto
New password:
Re-type new password:
Adding password for user toto
linux:~#
Let’s edit the /home/www/tmp/.htpasswd file to verify:
Code:
toto:$apr1$NYe9e...$aGgtjre0xeG86BvsDTELY/
bye :) -
automatically no but grizzly is right, encryption in php is powerful and it's not possible
you just have to redo your forms lol -
Yes, but the problem is that I don't really know how to create a form...
Before, I used the encryption script provided by https://user.oc-static.com/ftp/mateo21/exhtpasswd.php
and I would then copy the line into my .htpasswds file, but I would like to know if there was a form that could add them automatically (it would give me their passwords and their usernames, and I could go to that page, mark them, and they would get encrypted and added all by themselves...)
Thank you,
Fred -
100 bucks and a Mars bar? Two oranges and a candy wrapper?
If you want to copy and paste... you have your friend Google to help you ;-)
And https://openclassrooms.com/fr/ to learn PHP/SQL ... it's the foundation of the job: learn!
In any case, I won't give you a ready-made script, it has no interest. If you don't understand the script, you can't customize it; if there are bugs, you won't be able to fix them... -
a thousand apologies... a bit of a quick read :-D
at the same time, it doesn't change anything about the problem. by the time he manages to retrieve them, pigs will fly ;-) -
Hello,
I learned PHP, but I took on a project a bit bigger than just a simple form... I'm in the process of creating a portal for my school group, and it's working... However, I will still create the form because the portal is protected by .htaccess and I want to create an admin section... (Because I am not the only administrator...)
Thank you for all the help,
Frédéric -
I don't know if it's the solution to your problems, but I found this http://www.linux-pour-lesnuls.com/ripper.php
ps: I'm like you, I don't know PHP or HTML, I use Web Creator Pro
I'm looking for the same thing as you, I haven't tested this solution, I just found it after coming across your topic
anyway, thanks to CCM for helping us with our problems
pps: I believe it's about encrypted passwords in Linux and not in
MD5 -
it's an md5() encryption... you won't be able to decrypt it... otherwise, what would be the point of encryption?? well, in itself it's possible, but the methods are very long and difficult to implement.
the best thing, in your case, is to recreate an access for them! or better, to manage a member area with a database. that way, even if they forget their password, you could give them the option to change it automatically (email, automatic password creation, etc...)-
Ok thank you, but the problem is that having a client area wouldn't be very helpful to me because everything that's protected is:
The directory "/images"
The pages "The photos" and "The videos"
If you believe there could be other uses for a client area, let me know...
I would also like to know if it is possible to have a program or a script that encrypts and automatically adds accounts (kind of an admin).
Thank you very much for the help and the promptness!
Fred
-
-
-
Hi,
politeness is the name of a dog!
--
I have always loved the desert. We sit on a sand dune. You see nothing. You hear nothing. And yet something radiates in silence...
[A.S-E.] -
-
-
-
I’m going to explain a bit (simply):
I’M REALLY BAD AT PHP!!!!!!!
I’M A PRO AT COPY-PASTE!!!!!
So if anyone has an example...