move open3 to ipc run
This commit is contained in:
parent
197ecbb5b1
commit
4e93ecb202
2 changed files with 8 additions and 6 deletions
|
|
@ -5,7 +5,7 @@ use warnings;
|
|||
use Config;
|
||||
use IO::Socket;
|
||||
use IO::Select;
|
||||
use IPC::Open3;
|
||||
use IPC::Run qw (start finish );
|
||||
|
||||
# Configs
|
||||
# File to store the user:password hash mappings
|
||||
|
|
@ -76,11 +76,11 @@ while (my $conn = $sock->accept()) {
|
|||
if ($user eq "" or $pass eq "") {
|
||||
next;
|
||||
}
|
||||
open3(\*WRITE, \*READ, 0, $enc);
|
||||
print WRITE "$pass";
|
||||
close(WRITE);
|
||||
chomp(my $hash = <READ>);
|
||||
close(READ);
|
||||
my $hash;
|
||||
my $h = start(\@enc, \<<IN, \$hash);
|
||||
$pass
|
||||
IN
|
||||
chomp($hash);
|
||||
if ($hash eq "") {
|
||||
next;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue