#!/usr/bin/perl -w

print getpass();

sub getpass {
	open STDIN, "/dev/tty";

	system "stty -echo";
	my($c, $pwd);
	$pwd = "";
	while (($c = getc(STDIN)) ne '' and $c ne "\n" and $c ne "\r") {
		$pwd .= $c;
	}
	system "stty echo";
	print STDERR "\n";

	return $pwd;
}
