Skip to content

Instantly share code, notes, and snippets.

View MatiasBjorling's full-sized avatar
😃

Matias Bjørling MatiasBjorling

😃
View GitHub Profile
@MatiasBjorling
MatiasBjorling / pureftpd-phpass.patch
Created April 23, 2012 13:56
Patch for pure-ftpd that adds support for phpass as a "nearly" native wrapper.
diff -rup pure-ftpd-1.0.36/src/crypto.c pure-ftpd-1.0.36-phpass/src/crypto.c
--- pure-ftpd-1.0.36/src/crypto.c 2011-04-17 08:05:54.000000000 -0700
+++ pure-ftpd-1.0.36-phpass/src/crypto.c 2012-04-20 02:07:08.288870553 -0700
@@ -47,6 +47,78 @@ static char *hexify(char * const result,
return result;
}
+/**
+ * characters used for Base64 encoding
+ */
#!/usr/bin/php
<?php
$PHPASS_PATH = "/path/to/your/wordpress/wp-includes/class-phpass.php";
require($PHPASS_PATH);
if (count($argv) < 3)
return 0;
$ph = new PasswordHash(8, TRUE);