password-protection

What is the best way to password protect folder/page using php without a db or username

限于喜欢 提交于 2019-11-26 21:44:29
What is the best way to password protect folder using php without a database or user name but using. Basically I have a page that will list contacts for organization and need to password protect that folder without having account for every user . Just one password that gets changes every so often and distributed to the group. I understand that it is not very secure but never the less I would like to know how to do this. In the best way. It would be nice if the password is remembered for a while once user entered it correctly. I am doing approximately what David Heggie suggested, except without

Python's safest method to store and retrieve passwords from a database

℡╲_俬逩灬. 提交于 2019-11-26 18:59:27
问题 Looking to store usernames and passwords in a database, and am wondering what the safest way to do so is. I know I have to use a salt somewhere, but am not sure how to generate it securely or how to apply it to encrypt the password. Some sample Python code would be greatly appreciated. Thanks. 回答1: Store the password+salt as a hash and the salt. Take a look at how Django does it: basic docs and source. In the db they store <type of hash>$<salt>$<hash> in a single char field. You can also

Blocking android apps programmatically

本小妞迷上赌 提交于 2019-11-26 18:44:57
问题 I tried to develop such an app, in the sense I want to lock all the applications in my device with a password whatever I want. But I didn't find any piece of code for the solution. So I developed one by myself and unfortunately it didn't succeed. I found many solutions for locking android devices but, didn't find one for locking an app. Will be glad if you suggest a solution. 回答1: I used a background service to check which application is in the foreground (which means that application is

What is the best way to store password in database when API call requires sending of password in plain text?

徘徊边缘 提交于 2019-11-26 16:39:24
问题 I'm writing a web app in Django that is interfacing with the Read it Later List API (http://readitlaterlist.com/api/docs/). However, all of the API calls require sending the username and password with each request. In order to do this, it seems that I need to store the user's password in plain text in my database. Am I missing something or is that the only approach possible in this case? Is there some way to store an encrypted password in my database, but yet be able to send a decrypted

How do I measure the strength of a password?

人走茶凉 提交于 2019-11-26 16:02:30
问题 I was looking for an effective algorithm that can give me an accurate idea of how strong a password is. I found that several different websites use several different algorithms as I get different password strength ratings on different websites. 回答1: This has grown to my general brain dump of best practices for working with passwords in PHP/MySQL. The ideas presented here are generally not my own, but the best of what I've found to date. Ensure you are using SSL for all operations involving

Securing a password in source code?

感情迁移 提交于 2019-11-26 15:49:50
问题 I have a password in my code which is needed to connect to a sftp server. Whats the best way to "obfuscate" or hide it in the code? Thanks 回答1: Don't store you password in your source code, store it in a protected section within you App.Config (or Web.Config). See Encrypting Configuration File Sections Using Protected Configuration section in this Microsoft Doc This works by encrypting the encryption keys using built-in Windows stuff, locked to the Mac address and various other undocumented

How to send password securely via HTTP using Javascript in absence of HTTPS?

不打扰是莪最后的温柔 提交于 2019-11-26 15:13:34
问题 The very basic issue all developers face: Whenever user submits the form, the password is sent via network and it must be protected. The site I develop for doesn't have HTTPS. Neither does the owner want to buy a SSL certificate, nor is he interested in a self-signed one. So I want to protect the password sent via HTTP using Javascript when submitting form. To eager downvoters: How to send password securely over HTTP? DOES NOT give any sensible solution and I am in another situation. If I use

Way to securely give a password to R application from the terminal?

。_饼干妹妹 提交于 2019-11-26 12:41:07
问题 Does R have a function that allows a user to provide a password securely, such as Python\'s getpass module? (see http://docs.python.org/library/getpass.html for an example of what I mean) 回答1: The problem is that R does not have functions to control the terminal it is running in (something like Rncurses ); probably this is due to portability issues. Some time ago I was struggling with the same problem and I ended up with a function using TclTk: getPass<-function(){ require(tcltk); wnd<

Password protect a specific URL

此生再无相见时 提交于 2019-11-26 11:45:49
The site is on shared hosting. I need to password protect a single URL. http://www.example.com/pretty/url Obviously that's not a physical file path I'm trying to protect, it's just that particular URL. Any quick solution with .htaccess? You should be able to do this using the combination of mod_env and the Satisfy any directive. You can use SetEnvIf to check against the Request_URI , even if it's not a physical path. You can then check if the variable is set in an Allow statement. So either you need to log in with password, or the Allow lets you in without password: # Do the regex check

Sheet protection: UserInterFaceOnly gone

蹲街弑〆低调 提交于 2019-11-26 11:34:59
问题 In VBA Excel if I protect sheets with UserInterFaceOnly:=True option after I close and open the file again the UserInterFaceOnly mode is not active, only Password protection. The code: ActiveSheet.Protect Password:=\"myPassword\", UserInterfaceOnly:=True Why? 回答1: You can't do it without reapplying UserInterfaceOnly:=True after reopening the workbook. Taken from Excel's Vb protect method reference: If you apply this method with the UserInterfaceOnly argument set to true and then save the