aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorarf20 <aruizfernandez05@gmail.com>2025-11-06 06:27:30 +0100
committerarf20 <aruizfernandez05@gmail.com>2025-11-06 06:27:30 +0100
commitfbe5c00a1685923da64d7f98deda5a2d96b738fc (patch)
tree9230cd25610d06aee609ba5dfa1a53117ab3b053
parentf7b57b49b0c8755b1c85b341028a7c942005481f (diff)
downloadarfnet2-web-fbe5c00a1685923da64d7f98deda5a2d96b738fc.tar.gz
arfnet2-web-fbe5c00a1685923da64d7f98deda5a2d96b738fc.zip
PHP PGP, contact, index reordering
-rw-r--r--contact.html6
-rw-r--r--index.html6
-rw-r--r--php/pgp.php64
3 files changed, 70 insertions, 6 deletions
diff --git a/contact.html b/contact.html
index 3bca0e0..209a953 100644
--- a/contact.html
+++ b/contact.html
@@ -14,14 +14,14 @@
<hr>
<main>
<h2 class="center">Contact</h2>
- <p>Where to contact ARFNET's head system administrator</p>
+ <h3>Where to contact ARFNET's head system administrator</h3>
<ul>
<li>e-mail: arf20@arf20.com, webmaster@arf20.com, dmca@arf20.com, arfnet@proton.me, aruizfernandez05@gmail.com
- <a href="/arf20.ecc.asc">PGP</a></li>
+ <a href="/arf20.ecc.asc">PGP</a> <a href="/php/pgp.php">Verify &amp; encrypt</a></li>
<li>Mobile phone: +34 637 63 21 36</li>
<li>Office operator: +34 868 92 55 54 (press 1 for IVR, press 2 for V.34 BBS)</li>
<li>Brandmeister DMR: 2149160 (EA5JGX)</li>
- <li>Page me (DAPNET): ea5jgx@ea-all or 710534@148.625MHz</li>
+ <li><a href="/php/pager.php">Page me</a> (DAPNET): ea5jgx@ea-all or 710534@148.625MHz</li>
<li><a href="https://github.com/arf20">GitHub</a></li>
<li><a href="https://www.linkedin.com/in/%C3%A1ngel-ruiz-fernandez-562470229/">LinkedIn</a></li>
<li>Discord: arf20</li>
diff --git a/index.html b/index.html
index 14b21ec..7b6161a 100644
--- a/index.html
+++ b/index.html
@@ -68,6 +68,7 @@
<div class="item imgcont"><img src="/images/about-me/me2.jpg"></div>
<a href="/about-me.html">About me</a><br>
</div>
+ <a class="l3" href="/contact.html">Contact</a><br>
<div class="l2">
<div class="item imgcont"><img src="arfnet_logo.png"></div>
<a href="/about/">About ARFNET</a>
@@ -78,13 +79,11 @@
<div class="item imgcont"><img src="/images/icons/youtube.png"></div>
<a href="https://www.youtube.com/watch?v=lbsce1DniQA&list=PLhWQL9gpbCPb8JNtOFo760GUD4ekXiR-9">Youtube</a><br>
</div>
- <a class="l2" href="/contact.html">Contact</a><br>
- <a class="l2" href="http://lists.arf20.com">Mailing list</a><br>
- <a class="l2" href="http://grafana.arf20.com/public-dashboards/074973f696bd4d56afcddb08a3114041">Grafana</a><br>
<div class="l2">
<div class="item imgcont"><img src="/images/icons/discord.png"></div>
<a href="https://discord.gg/jy6AjN9ACP">Discord</a><br>
</div>
+ <a class="l2" href="http://grafana.arf20.com/public-dashboards/074973f696bd4d56afcddb08a3114041">Analytics</a><br>
<a class="l2" href="/donate.html">Donations and Accounting</a><br><br>
<span class="l1">Showcase</span><br>
@@ -125,6 +124,7 @@
<div class="item imgcont"><img src="/images/icons/squirrelmail.png"></div>
<a href="https://webmail.arf20.com">Webmail</a><br>
</div>
+ <a class="l3" href="http://lists.arf20.com">Mailing lists archive</a><br>
<div class="l2">
<div class="item imgcont"><img src="/images/icons/nextcloud.png"></div>
<a href="https://nextcloud.arf20.com">Nextcloud</a>
diff --git a/php/pgp.php b/php/pgp.php
new file mode 100644
index 0000000..ba6e18f
--- /dev/null
+++ b/php/pgp.php
@@ -0,0 +1,64 @@
+<?php
+
+$result = "kajsdhaskj";
+
+if (isset($_GET["op"])) {
+ if (!file_exists('/tmp/gpg')) {
+ mkdir('/tmp/gpg', 0700, true);
+ $result = shell_exec("gpg --homedir /tmp/gpg --import --trust-model always ../arf20.ecc.asc 2>&1");
+ echo "<pre>$result</pre>";
+ $result = shell_exec("echo \"071FD0F02A0292F08EE1A121EB74F0C93E429F8E:5\n6DDA5B0BF8F154C4C0542B92DEBF11CAEEFA5962:5\" | gpg --homedir /tmp/gpg --import-ownertrust 2>&1");
+ echo "<pre>$result</pre>";
+
+ }
+ $data = $_GET["data"];
+ if ($_GET["op"] == "Verify") {
+ if (preg_match("[^a-zA-Z0-9+/=- ]+", $data) == 1)
+ die("invalid message");
+ $result = shell_exec("echo \"".$data."\" | gpg --homedir /tmp/gpg --no-tty --trust-model always --verify 2>&1");
+ } else if ($_GET["op"] == "Encrypt") {
+ if (preg_match("[\"\''\\]+", $data) == 1)
+ die("invalid character(s)");
+
+ $result = shell_exec("echo \"".$data."\" | gpg --homedir /tmp/gpg --no-tty --always-trust --encrypt --armor -r 071FD0F02A0292F08EE1A121EB74F0C93E429F8E 2>&1");
+ }
+}
+
+?>
+
+
+<!DOCTYPE html>
+<html>
+ <head>
+ <meta charset="UTF-8">
+ <link rel="stylesheet" type="text/css" href="https://arf20.com/style.css">
+ <title>ARFNET</title>
+ </head>
+
+ <body>
+ <header><a href="/">
+ <img src="http://arf20.com/arfnet_logo.png" width="64"><span class="title"><strong>ARFNET</strong></span>
+ </a></header>
+ <hr>
+ <main>
+ <h2 class="center">OpenPGP</h2>
+ <form action="/php/pgp.php" method="GET">
+ <h3>Verify something arf20 said, or encrypt something for arf20</h3>
+ <textarea name="data" rows="25" cols="80"><?php echo $_GET["data"]; ?></textarea><br>
+ <input type="submit" name="op" value="Verify"><input type="submit" name="op" value="Encrypt"><br>
+
+ </form>
+<?php
+if (isset($result)) {
+ if ($result === null) {
+ echo "Null";
+ } else if ($result === false) {
+ echo "False";
+ } else {
+ echo "<textarea readonly rows=\"25\" cols=\"80\">\n$result\n</textarea>";
+ }
+} else echo "Unset";
+?>
+ </main>
+ </body>
+</html>