first commit

This commit is contained in:
deepend 2020-11-01 01:01:40 -07:00
commit 93574ef014
28 changed files with 12685 additions and 0 deletions

0
README.md Normal file
View File

81
faq.php Normal file
View File

@ -0,0 +1,81 @@
<!DOCTYPE HTML>
<html>
<head>
<title>YourTilde - FAQ</title>
<meta name="description" content="website description" />
<meta name="keywords" content="website keywords, website keywords" />
<meta http-equiv="content-type" content="text/html; charset=windows-1252" />
<link rel="stylesheet" type="text/css" href="http://fonts.googleapis.com/css?family=Tangerine&amp;v1" />
<link rel="stylesheet" type="text/css" href="http://fonts.googleapis.com/css?family=Yanone+Kaffeesatz" />
<link rel="stylesheet" type="text/css" href="style/style.css" />
</head>
<body>
<div id="main">
<div id="header">
<div id="logo">
<img src="images/yourtildelogo.png" alt="YourTilde" width="140" height="140">
<div class="slogan"></div>
</div>
<div id="menubar">
<ul id="menu">
<!-- put class="current" in the li tag for the selected page - to highlight which page you're on -->
<li><a href="index.php">Home</a></li>
<li class="current"><a href="faq.php">Faq</a></li>
<li><a href="othertildes.php">Other Tildes</a></li>
<li><a href="signup/">Sign Up</a></li>
</ul>
</div>
</div>
<div id="site_content">
<div id="sidebar_container">
<img class="paperclip" src="style/paperclip.png" alt="paperclip" />
<div class="sidebar">
<!-- insert your sidebar items here -->
<h3>Latest News</h3>
<h4>Ok back in action!</h4>
<h5>1st November 2020</h5>
<p>YourTilde is back and lots of great things planned. Your accounts are as they were. Everything should be functioning as expected. Let us know if there is any issues in the #YourTilde channel on IRC.</p>
</div>
<img class="paperclip" src="style/paperclip.png" alt="paperclip" />
<div class="sidebar">
<h3>Mailing List</h3>
<p>If you would like to join our mailing list, please enter your email address and click 'Subscribe'.</p>
<form method="post" action="https://lists.tildeverse.org/postorius/lists/yourtilde.lists.tildeverse.org/anonymous_subscribe" id="subscribe">
<input type="hidden" name="csrfmiddlewaretoken" value="1XZDawRwy0l7ueB45pzNiXIUYAa7HLKofdmU1aysaJPMaMpwjajgDRBHC3XF0Ujl">
<p style="padding: 0 0 9px 0;"><input class="form_control" required id="id_email" type="text" name="email_address" value="your email address" onclick="javascript: document.forms['subscribe'].email_address.value=''" /></p>
<p><input type="text" name="display_name" class="form-control" value="Your name (optional)" id="id_display_name"></p>
<p><input class="subscribe" name="subscribe" type="submit" value="Subscribe" /></p>
</form>
</div>
</div>
<div id="content">
<!-- insert the page content here -->
<h1>FAQ</h1>
<p><h2>Is YourTilde.com FREE?</h2>
<u></u>Yes YourTilde.com is very much Free. You can keep your wallet in your pocket, I promise ;) In future there will be options for donating to YourTilde but no money would be required.<u></u></p>
<p><h2>Why but why?</h2>
<u></u>There is just something wonderful the text based applications. And having a social platform based in a text based world is just great.</p>
<p><h2>What features are offered by YourTilde?</h2>
<ul>
<li>Linux shell access using SSH.</li>
<li>Internet email with clients such as: alpine, and webmail</li>
<li>Browse the internet with text mode browsers such as: links, w3m, and lynx.</li>
<li>IRC Chat. Including full set of IRC Services (linked to Tilde.chat IRC Network).</li>
<li>Free web site hosting including support for PHP. perl, MySQL and more (vhosts for existing domains can be requested).</li>
<li>Lots of text based games with more added all the time</li>
<li>Development environment supporting many languages, compilers, editors, interpreters and tools.</li>
</ul></p>
<p><h2>What operating system does YourTilde run?</h2>
We run a version of Fedora. Recently moved from CentOS to offer users newer versions of all software :)</p>
</div>
</div>
<div id="footer">
<p>Copyright &copy; YourTilde | <a href="http://www.html5webtemplates.co.uk">design from HTML5webtemplates.co.uk</a></p>
</div>
</div>
</body>
</html>

Binary file not shown.

After

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

BIN
images/putty_ssh_auth.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

BIN
images/roundcube.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.6 KiB

BIN
images/squirrelmail.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

BIN
images/yourtildebanner.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 35 KiB

BIN
images/yourtildelogo.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 35 KiB

BIN
images/yourtildenav.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.9 KiB

78
index.php Normal file
View File

@ -0,0 +1,78 @@
<!DOCTYPE HTML>
<html>
<head>
<title>YourTilde - Home</title>
<meta name="description" content="website description" />
<meta name="keywords" content="website keywords, website keywords" />
<meta http-equiv="content-type" content="text/html; charset=windows-1252" />
<link rel="stylesheet" type="text/css" href="http://fonts.googleapis.com/css?family=Tangerine&amp;v1" />
<link rel="stylesheet" type="text/css" href="http://fonts.googleapis.com/css?family=Yanone+Kaffeesatz" />
<link rel="stylesheet" type="text/css" href="style/style.css" />
</head>
<body>
<div id="main">
<div id="header">
<div id="logo">
<img src="images/yourtildelogo.png" alt="YourTilde" width="140" height="140">
<div class="slogan"></div>
</div>
<div id="menubar">
<ul id="menu">
<!-- put class="current" in the li tag for the selected page - to highlight which page you're on -->
<li class="current"><a href="index.php">Home</a></li>
<li><a href="faq.php">Faq</a></li>
<li><a href="othertildes.php">Other Tildes</a></li>
<li><a href="signup/">Sign Up</a></li>
</ul>
</div>
</div>
<div id="site_content">
<div id="sidebar_container">
<img class="paperclip" src="style/paperclip.png" alt="paperclip" />
<div class="sidebar">
<!-- insert your sidebar items here -->
<h3>Latest News</h3>
<h4>Ok back in action!</h4>
<h5>1st November 2020</h5>
<p>YourTilde is back and lots of great things planned. Your accounts are as they were. Everything should be functioning as expected. Let us know if there is any issues in the #YourTilde channel on IRC.</p>
</div>
<img class="paperclip" src="style/paperclip.png" alt="paperclip" />
<div class="sidebar">
<h3>Mailing List</h3>
<p>If you would like to join our mailing list, please enter your email address and click 'Subscribe'.</p>
<form method="post" action="https://lists.tildeverse.org/postorius/lists/yourtilde.lists.tildeverse.org/anonymous_subscribe" id="subscribe">
<input type="hidden" name="csrfmiddlewaretoken" value="1XZDawRwy0l7ueB45pzNiXIUYAa7HLKofdmU1aysaJPMaMpwjajgDRBHC3XF0Ujl">
<p style="padding: 0 0 9px 0;"><input class="form_control" required id="id_email" type="text" name="email_address" value="your email address" onclick="javascript: document.forms['subscribe'].email_address.value=''" /></p>
<p><input type="text" name="display_name" class="form-control" value="Your name (optional)" id="id_display_name"></p>
<p><input class="subscribe" name="subscribe" type="submit" value="Subscribe" /></p>
</form>
</div>
</div>
<div id="content">
<!-- insert the page content here -->
<h1>Welcome to YourTilde.com!</h1>
<p>YourTilde.com offers services that are basically a social network inside SSH. There is chat, email, forums, games, and lots more. <b>Come try us out! Sign up <a href="signup/">here</a></p>
<h2>Current Users</h2>
<p>
<ul class="user-list">
<?php foreach (glob("/home/*") as $user) {
$user = basename($user); ?>
<li><a href="/~<?=$user?>/" target="_blank">~<?=$user?></a></li>
<?php } ?>
</ul>
</p>
</div>
</div>
<div id="footer">
<p>Copyright &copy; YourTilde | <a href="http://www.html5webtemplates.co.uk">design from HTML5webtemplates.co.uk</a></p>
</div>
</div>
</body>
</html>

92
othertildes.php Normal file
View File

@ -0,0 +1,92 @@
<!DOCTYPE HTML>
<html>
<head>
<title>YourTilde - Other Tildes</title>
<meta name="description" content="website description" />
<meta name="keywords" content="website keywords, website keywords" />
<meta http-equiv="content-type" content="text/html; charset=windows-1252" />
<link rel="stylesheet" type="text/css" href="http://fonts.googleapis.com/css?family=Tangerine&amp;v1" />
<link rel="stylesheet" type="text/css" href="http://fonts.googleapis.com/css?family=Yanone+Kaffeesatz" />
<link rel="stylesheet" type="text/css" href="style/style.css" />
</head>
<body>
<div id="main">
<div id="header">
<div id="logo">
<img src="images/yourtildelogo.png" alt="YourTilde" width="140" height="140">
<div class="slogan"></div>
</div>
<div id="menubar">
<ul id="menu">
<!-- put class="current" in the li tag for the selected page - to highlight which page you're on -->
<li><a href="index.php">Home</a></li>
<li><a href="faq.php">Faq</a></li>
<li class="current"><a href="othertildes.php">Other Tildes</a></li>
<li><a href="signup/">Sign Up</a></li>
</ul>
</div>
</div>
<div id="site_content">
<div id="sidebar_container">
<img class="paperclip" src="style/paperclip.png" alt="paperclip" />
<div class="sidebar">
<!-- insert your sidebar items here -->
<h3>Latest News</h3>
<h4>Ok back in action!</h4>
<h5>1st November 2020</h5>
<p>YourTilde is back and lots of great things planned. Your accounts are as they were. Everything should be functioning as expected. Let us know if there is any issues in the #YourTilde channel on IRC.</p>
</div>
<img class="paperclip" src="style/paperclip.png" alt="paperclip" />
<div class="sidebar">
<h3>Mailing List</h3>
<p>If you would like to join our mailing list, please enter your email address and click 'Subscribe'.</p>
<form method="post" action="https://lists.tildeverse.org/postorius/lists/yourtilde.lists.tildeverse.org/anonymous_subscribe" id="subscribe">
<input type="hidden" name="csrfmiddlewaretoken" value="1XZDawRwy0l7ueB45pzNiXIUYAa7HLKofdmU1aysaJPMaMpwjajgDRBHC3XF0Ujl">
<p style="padding: 0 0 9px 0;"><input class="form_control" required id="id_email" type="text" name="email_address" value="your email address" onclick="javascript: document.forms['subscribe'].email_address.value=''" /></p>
<p><input type="text" name="display_name" class="form-control" value="Your name (optional)" id="id_display_name"></p>
<p><input class="subscribe" name="subscribe" type="submit" value="Subscribe" /></p>
</form>
</div>
</div>
<div id="content">
<!-- insert the page content here -->
<h1>Other Tildes to check out!</h1>
<p><a href="https://tilde.club" target="_blank" rel="noopener noreferrer">tilde.club</a> -&nbsp; tilde.club is not a social network it is one tiny totally standard unix computer that people respectfully use together in their shared quest to build awesome web pages.</p>
<p><a href="https://tilde.team/" target="_blank" rel="noopener noreferrer">tilde.team</a>&nbsp;- one tiny standard unix computer in
the cloud that anyone can use and learn to use in the shared pursuit of cool sites and unix tools</p>
<p><a href="http://ctrl-c.club/" target="_blank" rel="noopener noreferrer">ctrl-c.club</a>&nbsp;- A place for the curious to poke around and
play. SSH access, web pages, games, and programming languages on tap.</p>
<p><a href="http://pebble.ink/" target="_blank" rel="noopener noreferrer">pebble.ink</a>&nbsp;- pebble.ink is a project almost, but not quite, like tilde.club</p>
<p><a href="http://hackers.cool/" target="_blank" rel="noopener noreferrer">hackers.cool</a>&nbsp;- A tilde.club started by some nerd at Hacker School. As such,
it's got a lot of Hacker Schoolers on it, but everyone is welcome!</p>
<p><a href="http://squiggle.city/" target="_blank" rel="noopener noreferrer">squiggle.city</a>&nbsp;- squiggle.city is a Debian server in the spirit of tilde.club.
It's for making web pages and learning about the command line. If you are reading userland, which is about how to unix,
squiggle.city is a place to explore the ideas it contains.</p>
<p><a href="http://tilde.town/" target="_blank" rel="noopener noreferrer">tilde.town</a>&nbsp;- tilde.town is an open, welcoming and safe place for the
exploration of lo-fi HTML art, hi-fi javascript experiments, generative poetic works, and digital socialization in a post-facebook age.</p>
<p><a href="http://palvelin.club/" target="_blank" rel="noopener noreferrer">palvelin.club</a>&nbsp;- Finnish language tilde server.</p>
<p><a href="http://skylab.org/" target="_blank" rel="noopener noreferrer">skylab.org</a>&nbsp;- An open-source community co-operative with ~150 members that has existed since 1997. Based in Portland, Oregon, United States with a userbase across the world, we have quietly existed.
Featuring geektalk community chat, a variety of tools and hosting running on FreeBSD.</p>
<p><a href="http://protocol.club/" target="_blank" rel="noopener noreferrer">protocol.club</a> -&nbsp;protocol.club explores the fundamental and unique learning opportunities provided by the implementation of standardized protocols. It is a place for curious minds to explore and experiment, to educate and be educated about protocols and implementations old and new alike. While inspired by tilde.club and federated with the rest of the tildeverse via NNTP (et cetera), protocol.club has a stronger focus on its particular mission and has several differences from other tilde boxes, namely: we have a Code of Conduct, and we have some resources available locally to aid development of protocol implementations and new draft protocols. We also serve pages over HTTPS.</p>
</div>
</div>
<div id="footer">
<p>Copyright &copy; YourTilde | <a href="http://www.html5webtemplates.co.uk">design from HTML5webtemplates.co.uk</a></p>
</div>
</div>
</body>
</html>

9861
signup/email/Net/DNS2.php Normal file

File diff suppressed because it is too large Load Diff

210
signup/email/ipaddr.php Normal file
View File

@ -0,0 +1,210 @@
<?php
// CubicleSoft PHP IP Address functions.
// (C) 2013 CubicleSoft. All Rights Reserved.
class IPAddr
{
static function NormalizeIP($ipaddr)
{
$ipv4addr = "";
$ipv6addr = "";
// Generate IPv6 address.
$ipaddr = strtolower(trim($ipaddr));
if (strpos($ipaddr, ":") === false) $ipaddr = "::ffff:" . $ipaddr;
$ipaddr = explode(":", $ipaddr);
if (count($ipaddr) < 3) $ipaddr = array("", "", "0");
$ipaddr2 = array();
$foundpos = false;
foreach ($ipaddr as $num => $segment)
{
$segment = trim($segment);
if ($segment != "") $ipaddr2[] = $segment;
else if ($foundpos === false && count($ipaddr) > $num + 1 && $ipaddr[$num + 1] != "")
{
$foundpos = count($ipaddr2);
$ipaddr2[] = "0000";
}
}
// Convert ::ffff:123.123.123.123 format.
if (strpos($ipaddr2[count($ipaddr2) - 1], ".") !== false)
{
$x = count($ipaddr2) - 1;
if ($ipaddr2[count($ipaddr2) - 2] != "ffff") $ipaddr2[$x] = "0";
else
{
$ipaddr = explode(".", $ipaddr2[$x]);
if (count($ipaddr) != 4) $ipaddr2[$x] = "0";
else
{
$ipaddr2[$x] = str_pad(strtolower(dechex($ipaddr[0])), 2, "0", STR_PAD_LEFT) . str_pad(strtolower(dechex($ipaddr[1])), 2, "0", STR_PAD_LEFT);
$ipaddr2[] = str_pad(strtolower(dechex($ipaddr[2])), 2, "0", STR_PAD_LEFT) . str_pad(strtolower(dechex($ipaddr[3])), 2, "0", STR_PAD_LEFT);
}
}
}
$ipaddr = array_slice($ipaddr2, 0, 8);
if ($foundpos !== false && count($ipaddr) < 8) array_splice($ipaddr, $foundpos, 0, array_fill(0, 8 - count($ipaddr), "0000"));
foreach ($ipaddr as $num => $segment)
{
$ipaddr[$num] = substr(str_pad(strtolower(dechex(hexdec($segment))), 4, "0", STR_PAD_LEFT), -4);
}
$ipv6addr = implode(":", $ipaddr);
// Extract IPv4 address.
if (substr($ipv6addr, 0, 30) == "0000:0000:0000:0000:0000:ffff:") $ipv4addr = hexdec(substr($ipv6addr, 30, 2)) . "." . hexdec(substr($ipv6addr, 32, 2)) . "." . hexdec(substr($ipv6addr, 35, 2)) . "." . hexdec(substr($ipv6addr, 37, 2));
// Make a short IPv6 address.
$shortipv6 = $ipv6addr;
$pattern = "0000:0000:0000:0000:0000:0000:0000";
do
{
$shortipv6 = str_replace($pattern, ":", $shortipv6);
$pattern = substr($pattern, 5);
} while (strlen($shortipv6) == 39 && $pattern != "");
$shortipv6 = explode(":", $shortipv6);
foreach ($shortipv6 as $num => $segment)
{
if ($segment != "") $shortipv6[$num] = strtolower(dechex(hexdec($segment)));
}
$shortipv6 = implode(":", $shortipv6);
return array("ipv6" => $ipv6addr, "shortipv6" => $shortipv6, "ipv4" => $ipv4addr);
}
static function GetRemoteIP($proxies = array())
{
$ipaddr = self::NormalizeIP(isset($_SERVER["REMOTE_ADDR"]) ? $_SERVER["REMOTE_ADDR"] : "127.0.0.1");
// Check for trusted proxies. Stop at first untrusted IP in the chain.
if (isset($proxies[$ipaddr["ipv6"]]) || ($ipaddr["ipv4"] != "" && isset($proxies[$ipaddr["ipv4"]])))
{
$xforward = (isset($_SERVER["HTTP_X_FORWARDED_FOR"]) ? explode(",", $_SERVER["HTTP_X_FORWARDED_FOR"]) : array());
$clientip = (isset($_SERVER["HTTP_CLIENT_IP"]) ? explode(",", $_SERVER["HTTP_CLIENT_IP"]) : array());
do
{
$found = false;
if (isset($proxies[$ipaddr["ipv6"]])) $header = $proxies[$ipaddr["ipv6"]];
else $header = $proxies[$ipaddr["ipv4"]];
$header = strtolower($header);
if ($header == "xforward" && count($xforward) > 0)
{
$ipaddr = self::NormalizeIP(array_pop($xforward));
$found = true;
}
else if ($header == "clientip" && count($clientip) > 0)
{
$ipaddr = self::NormalizeIP(array_pop($clientip));
$found = true;
}
} while ($found && (isset($proxies[$ipaddr["ipv6"]]) || ($ipaddr["ipv4"] != "" && isset($proxies[$ipaddr["ipv4"]]))));
}
return $ipaddr;
}
static function IsMatch($pattern, $ipaddr)
{
if (is_string($ipaddr)) $ipaddr = self::NormalizeIP($ipaddr);
if (strpos($pattern, ":") !== false)
{
// Pattern is IPv6.
$pattern = explode(":", strtolower($pattern));
$ipaddr = explode(":", $ipaddr["ipv6"]);
if (count($pattern) != 8 || count($ipaddr) != 8) return false;
foreach ($pattern as $num => $segment)
{
$found = false;
$pieces = explode(",", $segment);
foreach ($pieces as $piece)
{
$piece = trim($piece);
$piece = explode(".", $piece);
if (count($piece) == 1)
{
$piece = $piece[0];
if ($piece == "*") $found = true;
else if (strpos($piece, "-") !== false)
{
$range = explode("-", $piece);
$range[0] = hexdec($range[0]);
$range[1] = hexdec($range[1]);
$val = hexdec($ipaddr[$num]);
if ($range[0] > $range[1]) $range[0] = $range[1];
if ($val >= $range[0] && $val <= $range[1]) $found = true;
}
else if ($piece === $ipaddr[$num]) $found = true;
}
else if (count($piece) == 2)
{
// Special IPv4-like notation.
$found2 = false;
$found3 = false;
$val = hexdec(substr($ipaddr[$num], 0, 2));
$val2 = hexdec(substr($ipaddr[$num], 2, 2));
if ($piece[0] == "*") $found2 = true;
else if (strpos($piece[0], "-") !== false)
{
$range = explode("-", $piece[0]);
if ($range[0] > $range[1]) $range[0] = $range[1];
if ($val >= $range[0] && $val <= $range[1]) $found2 = true;
}
else if ($piece[0] == $val) $found2 = true;
if ($piece[1] == "*") $found3 = true;
else if (strpos($piece[1], "-") !== false)
{
$range = explode("-", $piece[1]);
if ($range[0] > $range[1]) $range[0] = $range[1];
if ($val >= $range[0] && $val <= $range[1]) $found3 = true;
}
else if ($piece[1] == $val2) $found3 = true;
if ($found2 && $found3) $found = true;
}
if ($found) break;
}
if (!$found) return false;
}
}
else
{
// Pattern is IPv4.
$pattern = explode(".", strtolower($pattern));
$ipaddr = explode(".", $ipaddr["ipv4"]);
if (count($pattern) != 4 || count($ipaddr) != 4) return false;
foreach ($pattern as $num => $segment)
{
$found = false;
$pieces = explode(",", $segment);
foreach ($pieces as $piece)
{
$piece = trim($piece);
if ($piece == "*") $found = true;
else if (strpos($piece, "-") !== false)
{
$range = explode("-", $piece);
if ($range[0] > $range[1]) $range[0] = $range[1];
if ($ipaddr[$num] >= $range[0] && $ipaddr[$num] <= $range[1]) $found = true;
}
else if ($piece == $ipaddr[$num]) $found = true;
if ($found) break;
}
if (!$found) return false;
}
}
return true;
}
}
?>

1519
signup/email/smtp.php Normal file

File diff suppressed because it is too large Load Diff

208
signup/email/utf8.php Normal file
View File

@ -0,0 +1,208 @@
<?php
// CubicleSoft PHP UTF8 (Unicode) functions.
// (C) 2014 CubicleSoft. All Rights Reserved.
class UTF8
{
// Removes invalid characters from the data string.
// http://www.w3.org/International/questions/qa-forms-utf-8
public static function MakeValid($data)
{
$result = "";
$x = 0;
$y = strlen($data);
while ($x < $y)
{
$tempchr = ord($data[$x]);
if ($y - $x > 1) $tempchr2 = ord($data[$x + 1]);
else $tempchr2 = 0x00;
if ($y - $x > 2) $tempchr3 = ord($data[$x + 2]);
else $tempchr3 = 0x00;
if ($y - $x > 3) $tempchr4 = ord($data[$x + 3]);
else $tempchr4 = 0x00;
if ($tempchr == 0x09 || $tempchr == 0x0A || $tempchr == 0x0D || ($tempchr >= 0x20 && $tempchr <= 0x7E))
{
// ASCII minus control and special characters.
$result .= chr($tempchr);
$x++;
}
else if (($tempchr >= 0xC2 && $tempchr <= 0xDF) && ($tempchr2 >= 0x80 && $tempchr2 <= 0xBF))
{
// Non-overlong (2 bytes).
$result .= chr($tempchr);
$result .= chr($tempchr2);
$x += 2;
}
else if ($tempchr == 0xE0 && ($tempchr2 >= 0xA0 && $tempchr2 <= 0xBF) && ($tempchr3 >= 0x80 && $tempchr3 <= 0xBF))
{
// Non-overlong (3 bytes).
$result .= chr($tempchr);
$result .= chr($tempchr2);
$result .= chr($tempchr3);
$x += 3;
}
else if ((($tempchr >= 0xE1 && $tempchr <= 0xEC) || $tempchr == 0xEE || $tempchr == 0xEF) && ($tempchr2 >= 0x80 && $tempchr2 <= 0xBF) && ($tempchr3 >= 0x80 && $tempchr3 <= 0xBF))
{
// Normal/straight (3 bytes).
$result .= chr($tempchr);
$result .= chr($tempchr2);
$result .= chr($tempchr3);
$x += 3;
}
else if ($tempchr == 0xED && ($tempchr2 >= 0x80 && $tempchr2 <= 0x9F) && ($tempchr3 >= 0x80 && $tempchr3 <= 0xBF))
{
// Non-surrogates (3 bytes).
$result .= chr($tempchr);
$result .= chr($tempchr2);
$result .= chr($tempchr3);
$x += 3;
}
else if ($tempchr == 0xF0 && ($tempchr2 >= 0x90 && $tempchr2 <= 0xBF) && ($tempchr3 >= 0x80 && $tempchr3 <= 0xBF) && ($tempchr4 >= 0x80 && $tempchr4 <= 0xBF))
{
// Planes 1-3 (4 bytes).
$result .= chr($tempchr);
$result .= chr($tempchr2);
$result .= chr($tempchr3);
$result .= chr($tempchr4);
$x += 4;
}
else if (($tempchr >= 0xF1 && $tempchr <= 0xF3) && ($tempchr2 >= 0x80 && $tempchr2 <= 0xBF) && ($tempchr3 >= 0x80 && $tempchr3 <= 0xBF) && ($tempchr4 >= 0x80 && $tempchr4 <= 0xBF))
{
// Planes 4-15 (4 bytes).
$result .= chr($tempchr);
$result .= chr($tempchr2);
$result .= chr($tempchr3);
$result .= chr($tempchr4);
$x += 4;
}
else if ($tempchr == 0xF4 && ($tempchr2 >= 0x80 && $tempchr2 <= 0x8F) && ($tempchr3 >= 0x80 && $tempchr3 <= 0xBF) && ($tempchr4 >= 0x80 && $tempchr4 <= 0xBF))
{
// Plane 16 (4 bytes).
$result .= chr($tempchr);
$result .= chr($tempchr2);
$result .= chr($tempchr3);
$result .= chr($tempchr4);
$x += 4;
}
else $x++;
}
return $result;
}
public static function IsValid($data)
{
$x = 0;
$y = strlen($data);
while ($x < $y)
{
$tempchr = ord($data[$x]);
if ($y - $x > 1) $tempchr2 = ord($data[$x + 1]);
else $tempchr2 = 0x00;
if ($y - $x > 2) $tempchr3 = ord($data[$x + 2]);
else $tempchr3 = 0x00;
if ($y - $x > 3) $tempchr4 = ord($data[$x + 3]);
else $tempchr4 = 0x00;
if ($tempchr == 0x09 || $tempchr == 0x0A || $tempchr == 0x0D || ($tempchr >= 0x20 && $tempchr <= 0x7E)) $x++;
else if (($tempchr >= 0xC2 && $tempchr <= 0xDF) && ($tempchr2 >= 0x80 && $tempchr2 <= 0xBF)) $x += 2;
else if ($tempchr == 0xE0 && ($tempchr2 >= 0xA0 && $tempchr2 <= 0xBF) && ($tempchr3 >= 0x80 && $tempchr3 <= 0xBF)) $x += 3;
else if ((($tempchr >= 0xE1 && $tempchr <= 0xEC) || $tempchr == 0xEE || $tempchr == 0xEF) && ($tempchr2 >= 0x80 && $tempchr2 <= 0xBF) && ($tempchr3 >= 0x80 && $tempchr3 <= 0xBF)) $x += 3;
else if ($tempchr == 0xED && ($tempchr2 >= 0x80 && $tempchr2 <= 0x9F) && ($tempchr3 >= 0x80 && $tempchr3 <= 0xBF)) $x += 3;
else if ($tempchr == 0xF0 && ($tempchr2 >= 0x90 && $tempchr2 <= 0xBF) && ($tempchr3 >= 0x80 && $tempchr3 <= 0xBF) && ($tempchr4 >= 0x80 && $tempchr4 <= 0xBF)) $x += 4;
else if (($tempchr >= 0xF1 && $tempchr <= 0xF3) && ($tempchr2 >= 0x80 && $tempchr2 <= 0xBF) && ($tempchr3 >= 0x80 && $tempchr3 <= 0xBF) && ($tempchr4 >= 0x80 && $tempchr4 <= 0xBF)) $x += 4;
else if ($tempchr == 0xF4 && ($tempchr2 >= 0x80 && $tempchr2 <= 0x8F) && ($tempchr3 >= 0x80 && $tempchr3 <= 0xBF) && ($tempchr4 >= 0x80 && $tempchr4 <= 0xBF)) $x += 4;
else return false;
}
return true;
}
// Locates the next UTF8 character in a UTF8 string.
// Set Pos and Size to 0 to start at the beginning.
// Returns false at the end of the string or bad UTF8 character. Otherwise, returns true.
public static function NextChrPos(&$data, $datalen, &$pos, &$size)
{
$pos += $size;
$size = 0;
$x = $pos;
$y = $datalen;
if ($x >= $y) return false;
$tempchr = ord($data[$x]);
if ($y - $x > 1) $tempchr2 = ord($data[$x + 1]);
else $tempchr2 = 0x00;
if ($y - $x > 2) $tempchr3 = ord($data[$x + 2]);
else $tempchr3 = 0x00;
if ($y - $x > 3) $tempchr4 = ord($data[$x + 3]);
else $tempchr4 = 0x00;
if ($tempchr == 0x09 || $tempchr == 0x0A || $tempchr == 0x0D || ($tempchr >= 0x20 && $tempchr <= 0x7E)) $size = 1;
else if (($tempchr >= 0xC2 && $tempchr <= 0xDF) && ($tempchr2 >= 0x80 && $tempchr2 <= 0xBF)) $size = 2;
else if ($tempchr == 0xE0 && ($tempchr2 >= 0xA0 && $tempchr2 <= 0xBF) && ($tempchr3 >= 0x80 && $tempchr3 <= 0xBF)) $size = 3;
else if ((($tempchr >= 0xE1 && $tempchr <= 0xEC) || $tempchr == 0xEE || $tempchr == 0xEF) && ($tempchr2 >= 0x80 && $tempchr2 <= 0xBF) && ($tempchr3 >= 0x80 && $tempchr3 <= 0xBF)) $size = 3;
else if ($tempchr == 0xED && ($tempchr2 >= 0x80 && $tempchr2 <= 0x9F) && ($tempchr3 >= 0x80 && $tempchr3 <= 0xBF)) $size = 3;
else if ($tempchr == 0xF0 && ($tempchr2 >= 0x90 && $tempchr2 <= 0xBF) && ($tempchr3 >= 0x80 && $tempchr3 <= 0xBF) && ($tempchr4 >= 0x80 && $tempchr4 <= 0xBF)) $size = 4;
else if (($tempchr >= 0xF1 && $tempchr <= 0xF3) && ($tempchr2 >= 0x80 && $tempchr2 <= 0xBF) && ($tempchr3 >= 0x80 && $tempchr3 <= 0xBF) && ($tempchr4 >= 0x80 && $tempchr4 <= 0xBF)) $size = 4;
else if ($tempchr == 0xF4 && ($tempchr2 >= 0x80 && $tempchr2 <= 0x8F) && ($tempchr3 >= 0x80 && $tempchr3 <= 0xBF) && ($tempchr4 >= 0x80 && $tempchr4 <= 0xBF)) $size = 4;
else return false;
return true;
}
// Determines if a UTF8 string can also be viewed as ASCII.
public static function IsASCII($data)
{
$pos = 0;
$size = 0;
$y = strlen($data);
while (self::NextChrPos($data, $y, $pos, $size) && $size == 1) {}
if ($pos < $y || $size > 1) return false;
return true;
}
// Returns the number of characters in a UTF8 string.
public static function strlen($data)
{
$num = 0;
$pos = 0;
$size = 0;
$y = strlen($data);
while (self::NextChrPos($data, $y, $pos, $size)) $num++;
return $num;
}
// Converts a UTF8 string to ASCII and drops bad UTF8 and non-ASCII characters in the process.
public static function ConvertToASCII($data)
{
$result = "";
$pos = 0;
$size = 0;
$y = strlen($data);
while ($pos < $y)
{
if (self::NextChrPos($data, $y, $pos, $size) && $size == 1) $result .= $data[$pos];
else if (!$size) $size = 1;
}
return $result;
}
// Converts UTF8 characters in a string to HTML entities.
public static function ConvertToHTML($data)
{
return preg_replace_callback('/([\xC0-\xF7]{1,1}[\x80-\xBF]+)/', 'UTF8::ConvertToHTML__Callback', $data);
}
private static function ConvertToHTML__Callback($data)
{
$data = $data[1];
$num = 0;
$data = str_split(strrev(chr((ord(substr($data, 0, 1)) % 252 % 248 % 240 % 224 % 192) + 128) . substr($data, 1)));
foreach ($data as $k => $v) $num += (ord($v) % 128) * pow(64, $k);
return "&#" . $num . ";";
}
}
?>

90
signup/index.php Normal file
View File

@ -0,0 +1,90 @@
<!DOCTYPE HTML>
<html>
<head>
<title>YourTilde - Sign up!</title>
<meta name="description" content="website description" />
<meta name="keywords" content="website keywords, website keywords" />
<meta http-equiv="content-type" content="text/html; charset=windows-1252" />
<link rel="stylesheet" type="text/css" href="http://fonts.googleapis.com/css?family=Tangerine&amp;v1" />
<link rel="stylesheet" type="text/css" href="http://fonts.googleapis.com/css?family=Yanone+Kaffeesatz" />
<link rel="stylesheet" type="text/css" href="../style/style.css" />
</head>
<body>
<div id="main">
<div id="header">
<div id="logo">
<img src="../images/yourtildelogo.png" alt="YourTilde" width="140" height="140">
<div class="slogan"></div>
</div>
<div id="menubar">
<ul id="menu">
<!-- put class="current" in the li tag for the selected page - to highlight which page you're on -->
<li><a href="../index.php">Home</a></li>
<li><a href="../faq.php">Faq</a></li>
<li><a href="../othertildes.php">Other Tildes</a></li>
<li class="current"><a href="../signup/">Sign Up</a></li>
</ul>
</div>
</div>
<div id="site_content">
<div id="content_wide">
<!-- insert the page content here -->
<h1>Sign up</h1>
<div class="form_settings">
<div class="form_settings">
<div class="form_settings">
<p>we're excited you're here! let's get you signed up!</p>
<p>fill out this form and we'll get back to you with account info</p>
<table>
<tr>
<td>
<form method="post">
<?php include 'signup-handler.php'; ?>
<div>
<p>your desired username (numbers and lowercase letters only, no spaces)</p>
<input class="form-control" name="username" value="<?=$_REQUEST["username"] ?? ""?>" type="text" required>
</div>
<div>
<p>email to contact you with account info</p>
<input class="form-control" name="email" value="<?=$_REQUEST["email"] ?? ""?>" type="text" required>
</div>
<div>
<p>what interests you about YourTilde? we want to make sure you're a real human being :)</p>
<textarea required class="form-control" name="interest" id="" cols="40" rows="7"><?=$_REQUEST["interest"] ?? ""?></textarea>
</div>
<div>
<p>SSH public key</p>
<textarea required class="form-control" name="sshkey" id="" cols="40" rows="10"><?=$_REQUEST["sshkey"] ?? ""?></textarea>
<p>if you don't have a key, don't worry! <a href="https://wiki.yourtilde.com/doku.php?id=ssh_primer">check out our guide to ssh keys</a> and make sure that you only put your pubkey here</p>
</div>
<p>
<em>signing up implies that you agree to abide by <a href="/code-of-conduct.php">our code of conduct</a></em>
<br>
no drama. be respectful. have fun. we're all trying, and we're all in this together :)
</p>
<button class="submit" type="submit">submit</button>
</form>
</td>
</tr>
</table>
</div>
</div>
<div id="footer">
<p>Copyright &copy; YourTilde.com | <a href="http://www.html5webtemplates.co.uk">design from HTML5webtemplates.co.uk</a></p>
</div>
</div>
</body>
</html>

132
signup/signup-handler.php Normal file
View File

@ -0,0 +1,132 @@
<?php
require_once "email/smtp.php";
function forbidden_name($name) {
return in_array($name, [
'0x0',
'abuse',
'admin',
'administrator',
'auth',
'autoconfig',
'bbj',
'broadcasthost',
'cloud',
'forum',
'ftp',
'git',
'gopher',
'hostmaster',
'imap',
'info',
'irc',
'is',
'isatap',
'it',
'localdomain',
'localhost',
'lounge',
'mail',
'mailer-daemon',
'marketing',
'marketting',
'mis',
'news',
'nobody',
'noc',
'noreply',
'pop',
'pop3',
'postmaster',
'retro',
'root',
'sales',
'security',
'smtp',
'ssladmin',
'ssladministrator',
'sslwebmaster',
'support',
'sysadmin',
'team',
'usenet',
'uucp',
'webmaster',
'wpad',
'www',
'znc',
'lukewarmcat',
]);
}
$message = "";
if (isset($_REQUEST["username"]) && isset($_REQUEST["email"])) {
// Check the name.
$name = trim($_REQUEST["username"]);
if ($name == "")
$message .= "<li>please fill in your desired username</li>";
if (strlen($name) > 32)
$message .= "<li>username too long (32 character max)</li>";
if (!preg_match('/^[a-z][a-z0-9]{1,31}$/', $name))
$message .= "<li>username contains invalid characters (lowercase ascii only, must start with a letter)</li>";
if ($_REQUEST["sshkey"] == "" || mb_substr($_REQUEST["sshkey"], 0, 4) !== "ssh-")
$message .= '<li>ssh key required: please create one and submit the public key. '
. 'see our <a href="https://wiki.yourtilde.com/doku.php?id=ssh_primer">ssh wiki</a> or '
. 'hop on <a href="https://web.tilde.chat/?join=yourtilde">irc</a> and ask for help</li>';
if ($_REQUEST["interest"] == "")
$message .= "<li>please explain why you're interested so we can make sure you're a real human being</li>";
if (posix_getpwnam($name) || forbidden_name($name))
$message .= "<li>sorry, the username $name is unavailable</li>";
// Check the e-mail address.
$email = trim($_REQUEST["email"]);
if ($email == "")
$message .= "<li>please fill in your email address</li>";
else {
$result = SMTP::MakeValidEmailAddress($_REQUEST["email"]);
if (!$result["success"])
$message .= "<li>invalid email address: " . htmlspecialchars($result["error"]) . "</li>";
elseif ($result["email"] != $email)
$message .= "<li>invalid email address. did you mean: " . htmlspecialchars($result["email"]) . "</li>";
}
// no validation errors
if ($message == "") {
$sshkey = trim($_REQUEST["sshkey"]);
$makeuser = "makeuser {$_REQUEST["username"]} {$_REQUEST["email"]} \"{$sshkey}\"";
$msgbody = "
username: {$_REQUEST["username"]}
email: {$_REQUEST["email"]}
reason: {$_REQUEST["interest"]}
$makeuser
";
if (mail('root', 'new YourTilde signup', $msgbody)) {
echo '<div class="alert alert-success" role="alert">
email sent! we\'ll get back to you soon (usually within a day) with login instructions! be sure to check your spam folder as we\'ve had several reports of being marked as spam! <a href="/">back to YourTilde.com home</a>
</div>';
file_put_contents("/var/signups", $makeuser.PHP_EOL, FILE_APPEND);
} else {
echo '<div class="alert alert-danger" role="alert">
something went wrong... please send an email to <a href="mailto:root@yourtilde.com">root@yourtilde.com</a> with details of what happened
</div>';
}
} else {
?>
<div class="alert alert-warning" role="alert">
<strong>please correct the following errors: </strong>
<?=$message?>
</div>
<?php
}
}
?>

BIN
style/Thumbs.db Normal file

Binary file not shown.

BIN
style/bullet.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 989 B

BIN
style/graphic.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.6 KiB

BIN
style/paperclip.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

BIN
style/pattern.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 111 B

295
style/style.css Normal file
View File

@ -0,0 +1,295 @@
html
{ height: 100%;}
*
{ margin: 0;
padding: 0;}
body
{ font-family: "courier new", monospace;
background: #F7F7F7 url(pattern.png) fixed;
color: #fff;}
p
{ padding: 0 0 20px 0;
line-height: 1.5em;
font-size: 107%;}
img
{ border: 0;}
h1, h2, h3, h4, h5, h6
{ font: normal 250% 'Yanone Kaffeesatz', arial, sans-serif;
color: #FFF;
margin: 0 0 15px 0;
padding: 5px 0 5px 0;}
h2
{ font: normal 170% 'Yanone Kaffeesatz', arial, sans-serif;
color: #FFF;
margin: 0;
padding: 0 0 8px 0;}
h3
{ font-size: 200%;
margin: 0 0 9px 0;
color: #FFF;}
h4, h5, h6
{ margin: 0;
padding: 0 0 5px 0;
font: normal 100% arial, sans-serif;
color: #FFF;
line-height: 1em;}
h5, h6
{ font: italic 95% arial, sans-serif;
color: #888;
padding-bottom: 15px;}
h6
{ color: #FFF;}
a, a:hover
{ outline: none;
text-decoration: none;
color: #35BDF5;}
a:hover
{ text-decoration: underline;}
.left
{ float: left;
width: auto;
margin-right: 10px;}
.right
{ float: right;
width: auto;
margin-left: 10px;}
.center
{ display: block;
text-align: center;
margin: 20px auto;}
ul
{ margin: 2px 0 22px 17px;}
ul li
{ list-style-type: circle;
margin: 0 0 0 0;
padding: 0 0 4px 5px;}
ol
{ margin: 8px 0 22px 20px;}
ol li
{ margin: 0 0 11px 0;}
#main, #header, #logo, #menubar, #site_content, #footer
{ margin-left: auto;
margin-right: auto;}
#main
{ width: 950px;
margin: 20px auto;}
#header
{ width: 952px;
height: 145px;}
#logo
{ width: 950px;
float: left;
height: 100px;
background: transparent;
padding: 0 0 0px 10px;}
#logo h1
{ font: normal 350% 'Yanone Kaffeesatz', arial, sans-serif;
padding: 5px 0 0 17px;
color: #FFF;
float: left;}
#logo h1 a
{ color: #35BDF5;
text-decoration: none;}
#logo h1 a:hover
{ color: #555;
text-decoration: none;}
.slogan
{ float: right;
padding-right: 25px;
text-align: right;
font: 500% 'tangerine', arial;
color: #111;}
#menubar
{ height: 46px;
width: 700px;
margin: 0px auto -1px auto;
float: right;
padding: 0px 0 0 0;}
ul#menu
{ float: right;}
ul#menu li
{ float: left;
padding: 0 0 0px 0px;
list-style: none;
margin: 2px 0 0 0;
background: transparent;}
ul#menu li a
{ font: normal 170% 'Yanone Kaffeesatz', sans-serif;
text-decoration: none;
color: #FFF;
display: block;
float: left;
height: 20px;
padding: 7px 23px 15px 23px;
text-align: center;}
ul#menu li.current a
{ height: 20px;
padding: 6px 22px 15px 22px;}
ul#menu li.current a
{ background: transparent url(transparent.png) repeat;
border: 1px solid #000;
border-bottom: 0;
color: #F14E23;}
ul#menu li a:hover
{ color: #F14E23;}
#site_content
{ width: 950px;
overflow: hidden;
margin: 0 auto 0 auto;
padding: 0;
background: transparent url(transparent.png) repeat;
border: 1px solid #000;}
#sidebar_container
{ float: right;
width: 250px;
margin: 25px 0;}
.sidebar
{ float: right;
width: 200px;
margin: 0 24px 27px 0;
background: #1d1d1d;
border: 1px solid #000;
padding: 0 15px 15px 15px;}
.sidebar h3, .content h1
{ padding: 10px 15px;
margin: 0 1px;}
.sidebar h1
{ padding: 5px 0 0 0;}
.paperclip
{ float: left;
position: relative;
z-index: 0;
vertical-align: middle;
margin: -27px 0 -60px -30px;}
#content
{ text-align: left;
width: 630px;
padding: 25px 0 5px 25px;
margin: 0;}
#content ul
{ margin: 2px 0 22px 0px;}
#content ul li
{ list-style-type: none;
background: url(bullet.png) no-repeat;
margin: 0 0 6px 0;
padding: 0 0 4px 25px;
line-height: 1.5em;}
#footer
{ clear: both;
width: 100%;
height: 85px;
padding: 20px 0 5px 0;
text-align: center;
color: #FFF;
background: transparent;
margin-bottom: 20px;}
#footer p
{ padding: 0 0 10px 0;}
#footer a, #footer a:hover
{ color: #FFF;
text-decoration: none;}
#footer a:hover
{ color: #35BDF5;
text-decoration: none;}
.gallery img
{ position:absolute;}
.search
{ color: #666;
border: 1px solid #eee;
margin: 0;
padding: 10px 5px;
width: 189px;
color: #F14E23;}
.subscribe
{ color: #35BDF5;
border: 1px solid #ddd;
padding: 5px 10px;
background: #fff;
float: right;
cursor: pointer;
margin: 0;
font: normal 140% 'Yanone Kaffeesatz', sans-serif;}
table
{ margin: 10px 0 30px 0;}
table tr th, table tr td
{ padding: 7px 4px;
text-align: left;}
table tr td
{ border-top: 1px solid #FFF;}
.user-list {
display: flex;
flex-flow: row wrap;
justify-content: space-evenly;
list-style-type: none;
padding: 0;
}
.user-list li {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
flex: 10em;
}
.user-list::after {
content: "";
}
div.alert-warning {
background-color: darkred;
}
div.alert-success {
background-color: darkgreen;
}

119
style/style1.css Normal file
View File

@ -0,0 +1,119 @@
/* {font-size:13pt;font-weight:normal;} */
@media (min-width: 64em) {
.row {
display: flex;
flex-wrap: nowrap;
flex-direction: row-reverse;
}
.col { flex-grow: 1; }
}
.grid {
border-collapse: collapse;
}
.col {
border: 6px double #fb5;
padding: 1em;
}
.user-list {
display: flex;
flex-flow: row wrap;
justify-content: space-evenly;
list-style-type: none;
padding: 0;
}
.user-list li {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
flex: 10em;
}
.user-list::after {
content: "";
}
a {
text-decoration: none;
color: #f70;
font-weight: bold;
padding-right: 0.25em;
}
a:hover {color: #f20;}
hr {
border-color: #fb5;
}
.text-center {
text-align: center
}
.advisory {
background: #fc4;
color: #222;
font-weight: bold;
padding: 1em;
border-radius: 0.25em;
}
h1 {
text-transform: uppercase;
color: #fb5;
font-family: monospace;
}
/* THEGOODS */
#fancyboi::before {
content: "$ ";
}
@media (prefers-reduced-motion: no-preference) {
@keyframes flash {
50% { opacity: 0; }
}
@keyframes reveal {
from { width: 2em; } /* Width of ::before */
to { width: 100%; }
}
#fancyboi {
overflow: hidden;
white-space: nowrap;
animation: reveal 4s linear;
text-overflow: "";
}
#fancyboi::after {
content: "";
animation: flash 0.5s step-end infinite;
}
}
/* SDOOGEHT */
.sourceCode {
color:#008000;
}
code > span.fl {
/* color: #008000; /
}
/* Page content */
.content {
padding-top: 5px;
}
input[type="text"],
textarea {
background-color: #333;
color: darkorange;
}
div.alert-warning {
background-color: darkred;
}
div.alert-success {
background-color: darkgreen;
}
/* Mobile */
@media (max-width: 768px) {
td {
display: block;
}
}

BIN
style/transparent.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 199 B

0
updated.html Normal file
View File

BIN
yourtildelogowhite.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB