passwords

What exactly is classified as a “symbol” in C#?

荒凉一梦 提交于 2019-12-06 12:45:06
So I am trying to write a program that asks for you to create a password. I have a block of code that checks to see if the string entered by the user contains a symbol. I have the code set to exit the loop when the boolean value 'validPassword' equals true. string pleaseenterapassword = "Create a password:"; bool validPassword = false; Console.WriteLine(pleaseenterapassword); // Writes to the screen "Create a password:" string password = Console.ReadLine(); //Sets the text entered in the Console into the string 'password' bool containsAtLeastOneSymbol = password.Any(char.IsSymbol); if

How to enforce user to change passwd after Password Expiration timeout in Android 3.0?

非 Y 不嫁゛ 提交于 2019-12-06 12:10:20
I was trying to use Android Password expiration feature using DeviceAdmin . When I call setPasswordExpirationTimeout() API , it only sends a notification and doesn't actually force the user to change the password. It only sends a notification after timeout: V/DevicePolicyManagerService( 662): Sending password expiration notifications for action com.android.server.ACTION_EXPIRED_PASSWORD_NOTIFICATION You have to get the callback in DeviceAdminReceiver in onPasswordExpired() to force user to change password. Any specific reason it's been implemented this way (or is it just to give flexibility to

Java 1.5 Command Line Password Masking

 ̄綄美尐妖づ 提交于 2019-12-06 11:37:17
All, Our server is running Java 1.5 and I am having difficulty trying to mask user input from the command line. I am executing a jar file (java -jar my.jar) and am working through command line prompts via printlns. I cannot use Java Console. Thanks On a Unix system? You could try running the system program stty with argument -echo before reading the program and the program stty echo afterwards. ProcessBuilder pb = new ProcessBuilder("stty", "-echo"); pb.start().waitFor(); // Read the password here pb = new ProcessBuilder("stty", "echo"); pb.start().waitFor(); Note that I have not tried this!

How do I use expect to connect via ssh to a system and change the password of the host system?

别等时光非礼了梦想. 提交于 2019-12-06 11:23:20
问题 I am automating the process of: Connect to a system named "alpha" via ssh with password "alpha" for username "alpha". Once connected I would like to set the root password (to "kickass"). The system I am connecting to doesn't have a root password by default. I wrote this expect script to do the job but it doesn't work consistently. It works once and then if I change the password to test again, it waits at the "Enter new UNIX password:" prompt after issuing "sudo passwd root". Any ideas? #!/usr

How to store passwords in a database table

倾然丶 夕夏残阳落幕 提交于 2019-12-06 11:20:17
I am designing a C# application in which I need to store users' login information, including their passwords, in a database table. I was wondering what's a decent way of doing this. I know it is a terrible idea to store passwords as clear text. I was thinking of encrypting the passwords and then storing them. After that, every time the users enter their passwords, I can encrypt their input and compare that encrypted input with the one already in the database. My plan is to use a good has function for the encryption... I think a common tactic is to make a hash of the password using something

Password Recovery: How to decrypt an md5 encrypted password? [duplicate]

谁都会走 提交于 2019-12-06 10:44:11
This question already has answers here : Closed 6 years ago . Possible Duplicate: Is it possible to decrypt md5 hashes? In my website, I'm using md5 encryption for the password. So it's saving in the encrypted form in the database. For doing the password recovery, how can I decrypt the encrypted password ?? Please Help :) As others described quite well, you cannot easily 'decrypt' an MD5 hash. I guess the best way to do your password recovery is like this: A user can request password recovery by providing his email address (it should be unique so users can be identified by email address). an

Creating a regex to check for a strong password

泪湿孤枕 提交于 2019-12-06 10:16:53
问题 Say I have a regex that checks for alphanumeric. I now want to create another regex that checks for at least 1 number in the password. And I want to check if it has at least 1 non-alphanumeric character (somethign other than a letter or number). Should I just call each one seperatley, and if one fails return false or is there a way to combine them into 1 call? 回答1: Depends on exactly what criteria you're using, but it would probably be better to do a single pass through the string and set a

Password Reset Link Expiry

浪尽此生 提交于 2019-12-06 09:29:58
I wonder whether someone could help me please. I've been doing quite a bit of research on the 'Password Reset' process and from one of the tutorials I found, I've been able to put the following code together which provides this functionality. Forgot Password <?php // Connect to MySQL $c = mysql_connect("host", "user", "password"); mysql_select_db("database", $c); // Was the form submitted? if ($_POST["ForgotPasswordForm"]) { // Harvest submitted e-mail address $emailaddress = mysql_real_escape_string($_POST["emailaddress"]); // Check to see if a user exists with this e-mail $userExists = mysql

What mechanisms does ssh-agent use to keep unlocked private keys secure in memory?

岁酱吖の 提交于 2019-12-06 09:05:09
问题 I'm working on a library to make quick access to KeepassX database files easier for power users. Right now the application is so short-lived in memory that security around the unencrypted KeePass database is not a huge concern. However, I'd like to add the ability to hold the database unlocked for a period of time in the background, similar to the way the KeepassX GUI does. This would allow immediate query of passwords without being prompted for the master password. This means there would be

Android Oreo: what should I do to publish my app as an Autofill service provider?

我怕爱的太早我们不能终老 提交于 2019-12-06 07:59:26
问题 I'm an independent developer of a password manager app. What should I do, or what should I implement (interface/API/Service), to make my app an Autofill service provider (in a device with Android Oreo API >= 26)? I have read all kinds of related documentation, but I can't understand how to do this. Am I missing something? At the moment I see that only well-known password managers support this feature: Any hints are welcome. 回答1: As usual, Google's own examples repository provides a good