Commit d7171acd authored by Fabian Gabel's avatar Fabian Gabel
Browse files

add crypt_password.pl

parent 7d63581f
#!/usr/bin/perl
use strict;
use warnings;
print(crypt("@ARGV",join"",(".","/",0..9,"A".."Z","a".."z")[rand 64,rand 64]));
......@@ -93,7 +93,7 @@ if(isset($_POST['kerberos']) && isset($_POST['firstname'])) {
strcmp(trim($_POST['lastname']),'') !== 0){
$firstname=$_POST['firstname'];
$user_id = trim(strtolower(str_replace(' ', '', $firstname)) . strval(rorand(1000,9999)));
$password=exec("./crypt-password.pl $user_id");
$password=exec("./crypt_password.pl $user_id");
$data = "INSERT INTO classlist (student_id,last_name,first_name,user_id,password) VALUES ('"
. $_POST['kerberos'] ."', '"
. $_POST['lastname'] . "', '"
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment