aboutsummaryrefslogtreecommitdiff
path: root/data
diff options
context:
space:
mode:
authorDarkelarious <darkelarious@333networks.com>2015-11-08 22:29:50 +0100
committerDarkelarious <darkelarious@333networks.com>2015-11-08 22:29:50 +0100
commitdc409b9cb6e92fd9ff9ef18ab2ca825bd247b419 (patch)
tree7c4b6cc56d02012a58635abe0be987bbe7f28ec6 /data
parent8b3d393e7755c167eebe4d9f7fc786074f12e9af (diff)
downloadMasterServer-Perl-dc409b9cb6e92fd9ff9ef18ab2ca825bd247b419.tar.gz
MasterServer-Perl-dc409b9cb6e92fd9ff9ef18ab2ca825bd247b419.zip
Access ciphers and games through database instead of keeping them in memory
Diffstat (limited to 'data')
-rwxr-xr-xdata/database/tables-Pg.sql9
-rwxr-xr-xdata/database/tables-SQLite.sql9
-rwxr-xr-xdata/database/tables-mysql.sql9
-rwxr-xr-xdata/supportedgames.pl41
4 files changed, 43 insertions, 25 deletions
diff --git a/data/database/tables-Pg.sql b/data/database/tables-Pg.sql
index abe5744..f5663ff 100755
--- a/data/database/tables-Pg.sql
+++ b/data/database/tables-Pg.sql
@@ -24,3 +24,12 @@ CREATE TABLE pending(
enctype INTEGER NOT NULL DEFAULT 0,
added timestamptz NOT NULL DEFAULT NOW()
);
+
+CREATE TABLE games(
+ gamename VARCHAR(50) NOT NULL,
+ cipher VARCHAR(10) NOT NULL DEFAULT ' ',
+ description VARCHAR(200) NOT NULL DEFAULT ' ',
+ default_qport INTEGER NOT NULL DEFAULT 0,
+ num_uplink INTEGER NOT NULL DEFAULT 0,
+ num_total INTEGER NOT NULL DEFAULT 0
+);
diff --git a/data/database/tables-SQLite.sql b/data/database/tables-SQLite.sql
index cd904ed..7d68786 100755
--- a/data/database/tables-SQLite.sql
+++ b/data/database/tables-SQLite.sql
@@ -24,3 +24,12 @@ CREATE TABLE pending(
enctype INTEGER NOT NULL DEFAULT 0,
added timestamptz NOT NULL DEFAULT CURRENT_TIMESTAMP
);
+
+CREATE TABLE games(
+ gamename VARCHAR(50) NOT NULL,
+ cipher VARCHAR(10) NOT NULL DEFAULT ' ',
+ description VARCHAR(200) NOT NULL DEFAULT ' ',
+ default_qport INTEGER NOT NULL DEFAULT 0,
+ num_uplink INTEGER NOT NULL DEFAULT 0,
+ num_total INTEGER NOT NULL DEFAULT 0
+);
diff --git a/data/database/tables-mysql.sql b/data/database/tables-mysql.sql
index 9c1d2fc..c460b1b 100755
--- a/data/database/tables-mysql.sql
+++ b/data/database/tables-mysql.sql
@@ -26,3 +26,12 @@ CREATE TABLE pending(
added TIMESTAMP NOT NULL DEFAULT NOW(),
PRIMARY KEY (id)
);
+
+CREATE TABLE games(
+ gamename VARCHAR(50) NOT NULL,
+ cipher VARCHAR(10) NOT NULL DEFAULT ' ',
+ description VARCHAR(200) NOT NULL DEFAULT ' ',
+ default_qport INTEGER NOT NULL DEFAULT 0,
+ num_uplink INTEGER NOT NULL DEFAULT 0,
+ num_total INTEGER NOT NULL DEFAULT 0
+);
diff --git a/data/supportedgames.pl b/data/supportedgames.pl
index 58a3fd6..941e287 100755
--- a/data/supportedgames.pl
+++ b/data/supportedgames.pl
@@ -1,14 +1,22 @@
-our %S = (%S, # do not overwrite the current config
-
-# Version: public-20150209
+our %S = (
+%S, # include other config files too if applicable
+#
+# last change 8 November 2015
+#
+# Changelog 8 Nov: migrated supportedgames.pl to database; after these are games
+# are loaded, the variables are cleared
+#
+# ChangeLog 5 Oct: moved "enc_chars" to Core::Secure.pm, in preparation to
+# migrate supportedgames.pl to the database instead.
+#
# Supported Games & Secure/Validate
# All GameSpy protocol games communicate according to a protocol that requires
# servers and clients to authenticate each other. As far as 333networks are
# concerned, the authentication ciphers (keys) are confidential and intellectual
# property.
#
-# If you have a configuration file with keys, you can simply import that list
+# If you have a version of this file with keys, you can simply import that list
# instead of this file. If you do not have the correct ciphers, you can choose
# to bypass the secure/validate challenge. This also allows hackers and
# opportunists to provide fake data or request the data without authorization.
@@ -17,6 +25,9 @@ our %S = (%S, # do not overwrite the current config
# For questions contact darkelarious@333networks.com or visit at irc.
# irc.synirc.net #333networks
#
+# NOTE: DUPLICATES MAY NOT EXIST. IN CASE OF DUPLICATES, ONE OF THE VALUES
+# WILL BE PICKED AT RANDOM!
+#
# Usage:
#
# game code => {key => "game key", label => "game name label", port => "default port number"}
@@ -3123,27 +3134,7 @@ our %S = (%S, # do not overwrite the current config
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
"333networks" => {key => "", label => "333networks Synchronization Protocol"},
},
-
- # rotations for encryption in the secure/validate challenge for challenges
- # with enctype 1 or 2. See README for more information.
- enc_chars => ( qw |
- 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000
- 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000
- 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000
- 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000
- 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000
- 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000
- 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000
- 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000
- 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000
- 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000
- 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000
- 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000
- 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000
- 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000
- 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000
- 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000
- |),
+
);
1;