passwords

Regex to validate password strength

Deadly 提交于 2019-12-25 15:29:34
问题 My password strength criteria is as below : 8 characters length 2 letters in Upper Case 1 Special Character (!@#$&*) 2 numerals (0-9) 3 letters in Lower Case Can somebody please give me regex for same. All conditions must be met by password . 回答1: You can do these checks using positive look ahead assertions: ^(?=.*[A-Z].*[A-Z])(?=.*[!@#$&*])(?=.*[0-9].*[0-9])(?=.*[a-z].*[a-z].*[a-z]).{8}$ Rubular link Explanation: ^ Start anchor (?=.*[A-Z].*[A-Z]) Ensure string has two uppercase letters. (?=.

How do i check conditions with a list in python 3

送分小仙女□ 提交于 2019-12-25 09:01:02
问题 My name is Edwin i am new to programming but i love to learn. I have a assignment for school and i must build a program that rates passwords. but i have a litle problem now. As you can see i made 3 lists with every character. If i run this program it will not show "uw wachtwoord is Sterk" if the conditions klein and groot and nummers and symbols are true. how do i fix this? btw i can't make use of isdigit,isnumeric and such. thank you in advance! print ("Check of uw wachtwoord veilig genoeg

PHP mySQL Password issue with extra characters

99封情书 提交于 2019-12-25 05:49:06
问题 I'm very new to php and mysql. I have found a great tutorial to create a registration and log in section on a site. I'm managing to deconstruct it pretty well and make minor changes. However... When logging in, if the password is incorrect it validates and an error is returned. If its correct it logs in. The issue I have is that if you type the correct password but add extra characters after it neither validates or logs in. Just goes to a blank page. Here is the validation code for the login

How to hide password in shell script duing ARM template deployment

拟墨画扇 提交于 2019-12-25 05:09:54
问题 I am using ARM template to deploy Azure VM. template.json "adminPassword": { "type": "securestring" } parameters.json "adminPassword": { "value": null } When I use "null" in parameters, It will ask me enter password during deployment. When I enter the adminPassword during deployment, it is showing as plaintext, But I want it to hidden (such as ******) How can I achieve this? 回答1: As 4c74356b41 said, currently, there is no way to do it directly. You could use Azure Key Vault to avoid the

python subprocess.popen - pass passwords securely

时光毁灭记忆、已成空白 提交于 2019-12-25 04:14:10
问题 I did not find a direct answer to this question, so, asking it in this forum. My question is this - I am using python 2.6.6 version, and using subprocess.popen command to call into a script with some arguments. Some of the arguments are passwords. When I directly use this: args = shlex.split(cmd) f = open("a.txt", "a+"); proc = subprocess.Popen(args, stderr=f, stdout=f) proc.communicate() retcode = proc.returncode The command gets executed fine, but I see that ps -ef shows the passwords in

Non-interactive passwords in R

一曲冷凌霜 提交于 2019-12-25 03:55:34
问题 I'd like to revisit an old SO question about passwords. Like the OP, I don't want to enter my password interactively, but I am confused about how to store the password securely on my machine and share scripts with colleagues (and I'd add specifically, push scripts to GitHub). The accepted answer involves storing the password in .Rprofile , but one commenter suggests that this is not a good idea. In my specific use case, I have a script that runs every day on a virtual machine that I want

Encrypt/decrypt password in Sqlite (Android)

回眸只為那壹抹淺笑 提交于 2019-12-25 03:53:41
问题 In developing an Android application that will store certain user date into a sqlite database, how should I handle a user password securely? How can I encrypt the password so that it does not appear "in the clear" in the database, but so I can decrypt it in the application when needed. 回答1: Storing user credentials in a database presents many security challenges. You may want to consider an alternative (e.g. using OAuth 2.0 Authentication ). We don't need yet another Android app with security

Store password temporarily in memory

断了今生、忘了曾经 提交于 2019-12-25 03:16:28
问题 I'm looking for a way in an Android application to store a password within the memory as long as the application is running (cf. different activities) . I was first thinking about the SharedPreferences, but then it's saved in the flash memory, which isn't that good for a password, I guess. I'm unsure, what's the best way. What would you recommend me? 回答1: To store a password in RAM with the same lifespan as the application itself, just save the password as a static member. 回答2: I guess you

python, authentication not recognised - urllib2, requests, asp.net

痴心易碎 提交于 2019-12-25 03:11:46
问题 Though I'm not particularly advanced at any of this, I've had some past success in using urrlib2, requests and scrapy but this has me stumped. So after much searching and banging my head against the keyboard, I'll just go ahead and ask. I'd like to get the html source code of a site but after using my username and password, I keep getting a page thrown back which says my username and password are wrong. They work fine in the browser, and once logged in the source code is readily available

Error causes password change while updating new data in Yii

淺唱寂寞╮ 提交于 2019-12-25 02:39:14
问题 While I'm trying to update the AID field in database with this function: static function aidInsert() { $model = Users::model()->findAll(); foreach($model as $m) { $code = alphabeticCode(); $aidk = Users::model()->findByAttributes(array('aid'=>$code)); if(!empty($aidk)) { $code = alphabeticCode(); } $m->aid = $code; $m->save(); } } (alphabeticCode Method is just a method used to generate random strings.) the whole user's password stored in password field is completely changed into some piece