Added lot of junk laying around on harvie.cz
[mirrors/Programs.git] / php / sshb.php
diff --git a/php/sshb.php b/php/sshb.php
new file mode 100644 (file)
index 0000000..fb27d6f
--- /dev/null
@@ -0,0 +1,17 @@
+#!/usr/bin/php
+<?php
+
+$user = 'harvie';
+$host = 'harvie.ath.cx';
+$port = 22;
+
+$stdin = fopen('php://stdin', 'r');
+while(!feof($stdin)) {
+       $pass = trim(fgets($stdin));
+       $ssh = ssh2_connect($host, $port);
+       if (ssh2_auth_password($connection, $user, $pass)) {
+               echo("Authentication Successful: $pass\n");
+       } else {
+               die("Authentication Failed...\n");
+       }
+}
\ No newline at end of file
This page took 0.102301 seconds and 4 git commands to generate.