Commit Diff
Diff:
4e4305b65bba125624cc243da5be3e45d8f341de
e72bf83fdc57c15dd0e7b891d2a1f4653ac6ba19
Commit:
e72bf83fdc57c15dd0e7b891d2a1f4653ac6ba19
Tree:
80d7c0d890055d7135ad4d57d483188437f34cef
Author:
jrmu <jrmu@ircnow.org>
Committer:
jrmu <jrmu@ircnow.org>
Date:
Sun Oct 11 12:44:51 2020 UTC
Message:
Use WWW
blob - 983672c85b4f1f7b62226161b3633226c3550254 (mode 644)
blob + /dev/null
--- Www.pm
+++ /dev/null
@@ -1,34 +0,0 @@
-#!/usr/bin/perl
-
-package Www;
-
-use strict;
-use warnings;
-use OpenBSD::Pledge;
-use OpenBSD::Unveil;
-our $wwwpath = "/var/www/htdocs/botnow"; # Web folder path
-our $dbpath = "/var/www/botnow/botnow.db";
-our $database = "/var/www/botnow/"; # database path
-our $records;
-our $dbh;
-our $verbose = 3;
-
-sub www {
- my( $username, $email, $password, $service )=@_;
- my $hash = sha256_hex("$username");
- my $filename = "$database/www";
- my $lines = "";
- my $fh;
- if (open($fh, '+<', $filename)) {
- while (my $line = <$fh>) {
- $lines .= $line;
- }
- close $fh;
- }
- open($fh, '>', "$filename") or die "Could not write to '$database/www' $!";
- print $fh $lines;
- print $fh "Hash: $hash, Username: $username, Email: $email, Password: $password\n";
- close $fh;
-}
-
-1; # MUST BE LAST STATEMENT IN FILE
blob - /dev/null
blob + 5d073a75c485252cfe0c559b21ead662a3afee2d (mode 644)
--- /dev/null
+++ WWW.pm
@@ -0,0 +1,34 @@
+#!/usr/bin/perl
+
+package WWW;
+
+use strict;
+use warnings;
+use OpenBSD::Pledge;
+use OpenBSD::Unveil;
+our $wwwpath = "/var/www/htdocs/botnow"; # Web folder path
+our $dbpath = "/var/www/botnow/botnow.db";
+our $database = "/var/www/botnow/"; # database path
+our $records;
+our $dbh;
+our $verbose = 3;
+
+sub www {
+ my( $username, $email, $password, $service )=@_;
+ my $hash = sha256_hex("$username");
+ my $filename = "$database/www";
+ my $lines = "";
+ my $fh;
+ if (open($fh, '+<', $filename)) {
+ while (my $line = <$fh>) {
+ $lines .= $line;
+ }
+ close $fh;
+ }
+ open($fh, '>', "$filename") or die "Could not write to '$database/www' $!";
+ print $fh $lines;
+ print $fh "Hash: $hash, Username: $username, Email: $email, Password: $password\n";
+ close $fh;
+}
+
+1; # MUST BE LAST STATEMENT IN FILE