password-protection

Password protect a cname subdomain with .htaccess?

試著忘記壹切 提交于 2019-12-11 10:26:55
问题 I'm trying to build and test a "m." subdomain for a website I'm working on. "m.domain.com" is simply a cname for "domain.com" and will be used to set a server-side boolean so the mobile version of the site will serve exactly the same pages, just with different css and scripts. While I'm testing, I want to require a password for all requests made to m.domain.com. I've tried several .htaccess variants on environment variable solutions, and this is what I have right now: SetEnvIfNoCase Host m\

Setting NTAG213 password in Android with MifareUltralight.transceive crashes, no exception thrown

自古美人都是妖i 提交于 2019-12-11 08:32:37
问题 I'm trying to set a password on my empty NTAG213 tags, but when I get to writing the PACK and PWD my app just crashes, with no exception thrown. I did get my app far enough to write valid NDEF messages and read those, it seems I can also write to other configuration pages(2Ah and 29h for configurating the password protection). When I get to writing PACK though, my app crashes but doesn't throw the IOException I would expect from MifareUltralight.transceive(byte[] data). Here is the souce code

Storing a password in a string before sending to database

心不动则不痛 提交于 2019-12-11 08:11:26
问题 I'm trying to learn some good practice for handling passwords. I will supply some code snippets from my project and explain what I'm worried and curious about. Lets start with the code that gets the user input, my button event code: string username = txtUser.Text; string password = Hash.EncryptString(txtPass.Text); Here my idea is that, storing a password in a string in clear text is probably bad practice? I'm aware this is probably not the solution to that (especially since I'm sending it in

how to read password protected excel in python

自作多情 提交于 2019-12-11 07:30:24
问题 I'm new to python programming, and I am trying to read a password protected file using python, the code is shown below: import sys import win32com.client xlApp = win32com.client.Dispatch("Excel.Application") print "Excel library version:", xlApp.Version filename,password = 'C:\myfiles\foo.xls', 'qwerty12' xlwb = xlApp.Workbooks.Open(filename, Password=password) But then the xls file is loaded but still prompt me to provide the password, I can't let python to enter the password for me. What

Applying .htaccess folder username/password with PHP

时间秒杀一切 提交于 2019-12-11 07:22:41
问题 I’m building a PHP/MySQL web application. Users log in and various session variables are set. There’s a folder on the webserver where users can upload files to (any kind – images, pdf, .doc etc). I’d like to protect this folder to prevent people who are not logged in typing in the url and getting to these files. Browsing of files in this folder is disallowed. I can apply a password using my cpanel, which works nicely. However it means that users have to log in to the application, then the

Load DB password and keys into PHPs memory on startup

吃可爱长大的小学妹 提交于 2019-12-11 07:00:15
问题 I feel a bit anxious to put my database username, password and encryption keys into a PHP file that everyone who hacked himself into the server could easily read. Is it maybe possible to load PHP and tell it the passwords it might need upfront? My question is simple: Is there any other way to let PHP know about the DB password and key other than to put everything into one file? Any ideas are welcome. 回答1: To my knowledge you will have to declare your variables at some point in order to

Password file obfuscation

人走茶凉 提交于 2019-12-11 06:18:06
问题 I am using lua to administrate a firewall server and want to obfuscate sensible variables such as login data. I have tried luac but the variable content is still easily readable. Is there any way to encrypt/decrypt these sensible data? 回答1: I'm assuming you have a lua script which contains both the commands to send as well as any "secret data", and you want to be able to run this script without having to type in anything interactively. If so, the script itself must be able to decrypt your

Convert text passwords in database to hashed passwords?

假装没事ソ 提交于 2019-12-11 05:47:26
问题 In my database I have over 600 users. The passwords were previously stored as plain text (slap on hand, I know). Anyways, I have changed my code to store STA1 hashed passwords, but I need to convert the existing passwords in my database so each user doesn't need to go in and modify their account. Any help? 回答1: First, backup your database with mysqldump. For example bash#> mysqldump -u username -p nameoftable >file_to_write_to.sql Also, make sure that your password field is 40 characters long

Can I set these char(☺☻♥♦♣) as password [closed]

两盒软妹~` 提交于 2019-12-11 04:56:00
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 9 years ago . these char can be entered by keyboard by pressing with the combination of ALT and ASCII of char I think these ☺ ☻ ♥ ♦ ♣ char can't be easily cracked by brute force attack. 回答1: If the question is "can I use these," then the answer is "maybe." You will need to test them thoroughly to make sure that your

How to unprotect an Excel workbook

谁说我不能喝 提交于 2019-12-11 03:56:23
问题 I have an Excel workbook that is password protected (the entire document, not just a sheet or set of sheets - you can't open the file without the password). I know the password, so I am able to open it, but there is no obvious way to turn off the password protection. Specifically, I would like to do this in VBA, because eventually I want to be able to do this to multiple files using a loop. I tried using: ThisWorkbook.Unprotect(Password = "[password]") but this does absolutely nothing. 回答1: