diff --git a/en/onion-services.html b/en/onion-services.html index 87f307e..88b5a1f 100644 --- a/en/onion-services.html +++ b/en/onion-services.html @@ -54,6 +54,7 @@
  • Devzat (Seperate Sign-Up) - Chat over ssh!
  • Element - Secure collaboration and messaging
  • FreshRSS (On Request) - A free, self-hostable aggregator
  • +
  • FullTextRSS - Create full-text feed from feed or webpage URL
  • Hydrogen - Lightweight Matrix client with legacy and mobile browser support
  • LittleLink Custom (Seperate Sign-Up) - Self-hosted free Linktree alternative
  • Mastodon (Reg needed) - ActivityPub federated microblogging plaftorm
  • diff --git a/en/register.php b/en/register.php index a754609..021f081 100644 --- a/en/register.php +++ b/en/register.php @@ -26,11 +26,21 @@ $str = str_replace("\r", '', $str); return $str; } - + function getName() { + $characters = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'; + $randomString = ''; + + for ($i = 0; $i < 50; $i++) { + $index = rand(0, strlen($characters) - 1); + $randomString .= $characters[$index]; + } + return $randomString; + } + $password = getName(); $success = false; - $username = $passowrd0 = $password1 = $email = $ssh = $reason = - $username_err = $password0_err = $password1_err = $email_err = $ssh_err = $reason_err = ''; + $username = $email = $ssh = $reason = + $username_err = $email_err = $ssh_err = $reason_err = ''; $username_re = '/^[a-z_][a-z0-9_]{0,30}$/'; @@ -50,17 +60,6 @@ $username_err = "Username is required"; } - if (!empty($_POST['password0'] || !empty($_POST['password1']))) { - if ($_POST['password1'] === $_POST['password0']) { - $password0 = $_POST['password0']; - $password1 = $_POST['password1']; - } else { - $password0_err = $password1_err = "Passwords do not match"; - } - } else { - $password0_err = $password1_err = "Password is required"; - } - if (!empty($_POST['email'])) { if (filter_var(sanitize($_POST['email']), FILTER_VALIDATE_EMAIL)) { $email = sanitize($_POST['email']); @@ -89,7 +88,7 @@ $reason_err = "Join reason is required"; } - if (empty($username_err . $password0_err . $password1_err . $email_err . $ssh_err . $reason_err)) + if (empty($username_err . $email_err . $ssh_err . $reason_err)) $success = true; } @@ -97,21 +96,13 @@ ?>

    Sign Up

    See the wiki page on how to register.

    -

    WARNING: Your password must contain at least one lowercase letter, one uppercase letter, and one number. This is a restriction of our mail server and PeerTube.

    + * Required field
    ">

    Username: *

    -

    Password: - - *

    - -

    Password: - - *

    -

    E-mail (We need one so we can contact you) *

    @@ -190,8 +181,9 @@ $message .= ".\nJoin reason:\n$reason\n\n\nTo accept this request, run this command as root:\n/root/bin/accept $username\nTo deny this request, run this command as root:\n/root/bin/deny $username\n"; $contents = "#!/usr/bin/env -S bash -e\n\n# This is the registration script for $username \n# This script was automatically generated by http://" . $_SERVER['HTTP_HOST'] . htmlspecialchars($_SERVER['PHP_SELF']). "\n\n"; - $contents .= '~/bin/mktuser ' . escapeshellarg($username) . ' ' . escapeshellarg($password0) . " <<< " . escapeshellarg($_POST['ssh']) . "\n\n"; - if ($use_matrix) $contents .= '~/bin/mkmuser ' . escapeshellarg($username) . ' ' . escapeshellarg($password0) . "\n"; + $contents .= '~/bin/mktuser ' . escapeshellarg($username) . ' ' . escapeshellarg($password) . " <<< " . escapeshellarg($_POST['ssh']) . "\n"; + $contents .= 'echo ' . escapeshellarg($password) . ' > /sshfs/home/' . $username . '/pass && chmod 600 /sshfs/home/' . $username . '/pass && ssh 192.168.122.30 chown ' . escapeshellarg($username . ':' . $username) . ' /sshfs/home/' . $username . '/pass' . "\n\n"; + if ($use_matrix) $contents .= '~/bin/mkmuser ' . escapeshellarg($username) . ' ' . escapeshellarg($password) . "\n"; if ($use_fedi) { $pass_file = '/home/' . $username . '/mastodon-pass'; $contents .= 'touch /sshfs' . $pass_file . "\n"; @@ -200,14 +192,14 @@ $contents .= '~/bin/mkfuser ' . escapeshellarg($username) . ' ' . escapeshellarg($email) . ' | tee /sshfs' . escapeshellarg($pass_file) . "\n"; unset($pass_file); } - if ($use_git) $contents .= '~/bin/mkguser ' . escapeshellarg($username) . ' ' . escapeshellarg($password0) . ' ' . escapeshellarg($email) . "\n"; - if ($use_nc) $contents .= '~/bin/mknuser ' . escapeshellarg($username) . ' ' . escapeshellarg($password0) . "\n"; - if ($use_peertube) $contents .= '~/bin/mkpuser ' . escapeshellarg($username) . ' ' . escapeshellarg($password0) . ' ' . escapeshellarg($email) . "\n"; - if ($use_jitsi) $contents .= '~/bin/mkxuser ' . escapeshellarg($username) . ' ' . escapeshellarg($password0) . " jitsi.vern.cc\n"; - if ($use_xmpp) $contents .= '~/bin/mkxuser ' . escapeshellarg($username) . ' ' . escapeshellarg($password0) . " vern.cc\n"; - if ($use_xmppo) $contents .= '~/bin/mkxuser ' . escapeshellarg($username) . ' ' . escapeshellarg($password0) . " vernccvbvyi5qhfzyqengccj7lkove6bjot2xhh5kajhwvidqafczrad.onion\n"; - if ($use_xmppi) $contents .= '~/bin/mkxuser ' . escapeshellarg($username) . ' ' . escapeshellarg($password0) . " verncceu2kgz54wi7r5jatgmx2mqtsh3knxhiy4m5shescuqtqfa.b32.i2p\n"; - $contents .= "s-nail -vr 'register@vern.cc' -c cobra@vern.cc -c neo@vern.cc -c aryak@vern.cc -s 'Your ~vern account has been created' -M text/plain " . escapeshellarg($email) . " < <(printf 'Hello %s,\\nYour membership request on ~vern has been accepted.\\nYou can now SSH into vern.cc using the public key(s) that you supplied to ~vern.\\nIf you signed up for Mastodon, a randomly generated password for the account will be in ~/mastodon-pass\\n\\nThank you for being a part of ~vern!' " . escapeshellarg($username) . ")\n"; + if ($use_git) $contents .= '~/bin/mkguser ' . escapeshellarg($username) . ' ' . escapeshellarg($password) . ' ' . escapeshellarg($email) . "\n"; + if ($use_nc) $contents .= '~/bin/mknuser ' . escapeshellarg($username) . ' ' . escapeshellarg($password) . "\n"; + if ($use_peertube) $contents .= '~/bin/mkpuser ' . escapeshellarg($username) . ' ' . escapeshellarg($password) . ' ' . escapeshellarg($email) . "\n"; + if ($use_jitsi) $contents .= '~/bin/mkxuser ' . escapeshellarg($username) . ' ' . escapeshellarg($password) . " jitsi.vern.cc\n"; + if ($use_xmpp) $contents .= '~/bin/mkxuser ' . escapeshellarg($username) . ' ' . escapeshellarg($password) . " vern.cc\n"; + if ($use_xmppo) $contents .= '~/bin/mkxuser ' . escapeshellarg($username) . ' ' . escapeshellarg($password) . " vernccvbvyi5qhfzyqengccj7lkove6bjot2xhh5kajhwvidqafczrad.onion\n"; + if ($use_xmppi) $contents .= '~/bin/mkxuser ' . escapeshellarg($username) . ' ' . escapeshellarg($password) . " verncceu2kgz54wi7r5jatgmx2mqtsh3knxhiy4m5shescuqtqfa.b32.i2p\n"; + $contents .= "s-nail -vr 'register@vern.cc' -c cobra@vern.cc -c neo@vern.cc -c aryak@vern.cc -s 'Your ~vern account has been created' -M text/plain " . escapeshellarg($email) . " < <(printf 'Hello %s,\\nYour membership request on ~vern has been accepted.\\nYou can now SSH into vern.cc using the public key(s) that you supplied to ~vern.\\nA global password for all the services you signed up to can be found at ~/pass. If you signed up for Mastodon, password for the account can be found at ~/mastodon-pass\\n\\nThank you for being a part of ~vern!' " . escapeshellarg($username) . ")\n"; $contents .= "rm -f $0\n"; $contents .= "exit\n\n\n"; $contents .= $reason . "\n"; diff --git a/en/services.html b/en/services.html index 4a9c314..7e9fad6 100644 --- a/en/services.html +++ b/en/services.html @@ -56,6 +56,7 @@
  • Devzat (Seperate Sign-Up) - Chat over ssh!
  • Element - Secure collaboration and messaging
  • FreshRSS (On Request) - A free, self-hostable aggregator
  • +
  • FullTextRSS - Create full-text feed from feed or webpage URL
  • Hydrogen (AD: A) - Lightweight Matrix client with legacy and mobile support
  • Jitsi (Reg needed) - Free video conferencing software for web & mobile
  • LittleLink Custom (Seperate Sign-Up) (AD: A) - Self-hosted free Linktree alternative