From 981327c4af1a26781195483acedc3d3960de9436 Mon Sep 17 00:00:00 2001 From: MallocNull Date: Thu, 10 Jul 2014 16:51:35 -0500 Subject: [PATCH] javascript is a bad+ language jesus chrhrhrhrhrhr --- bot/bot/NavigationNode.cs | 38 +++++++ bot/bot/bot.csproj | 1 + www/config.php | 210 +++++++++++++++++++++++++++++++++++++- www/header.php | 1 + www/img/arrow_down.png | Bin 0 -> 379 bytes www/img/arrow_up.png | Bin 0 -> 372 bytes www/img/delete.png | Bin 0 -> 715 bytes www/index.php | 1 + www/style.css | 8 ++ 9 files changed, 258 insertions(+), 1 deletion(-) create mode 100644 bot/bot/NavigationNode.cs create mode 100644 www/img/arrow_down.png create mode 100644 www/img/arrow_up.png create mode 100644 www/img/delete.png diff --git a/bot/bot/NavigationNode.cs b/bot/bot/NavigationNode.cs new file mode 100644 index 0000000..e1ecaf8 --- /dev/null +++ b/bot/bot/NavigationNode.cs @@ -0,0 +1,38 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using OpenQA.Selenium.Firefox; +using OpenQA.Selenium; +using OpenQA.Selenium.Internal; +using OpenQA.Selenium.Support.UI; +using SuperSocket; +using SuperSocket.SocketBase; +using SuperWebSocket; +using MySql.Data.MySqlClient; +using System.Threading; + +namespace bot { + class NavigationNode { + public enum findTypes { + GOTOURL, BYLINKTEXT, + BYID, BYNAME, + BYCLASS, BYTAG, + }; + + public enum actionTypes { + CLICK, TYPE, + TEXTSELECT, + INDEXSELECT + }; + + + + public NavigationNode() { } + + public void performNavigation(FirefoxDriver d) { + + } + } +} diff --git a/bot/bot/bot.csproj b/bot/bot/bot.csproj index dabbf4c..048aa25 100644 --- a/bot/bot/bot.csproj +++ b/bot/bot/bot.csproj @@ -93,6 +93,7 @@ + diff --git a/www/config.php b/www/config.php index 7cd8ce0..e9dcea7 100644 --- a/www/config.php +++ b/www/config.php @@ -1,9 +1,185 @@ 0 && $_POST["cooldown"]) { + if(strlen($_POST["tzHour"]) == 2 && is_numeric($_POST["tzHour"]) && strlen($_POST["tzMins"]) == 2 && is_numeric($_POST["tzMins"]) && $_POST["tzHour"] && $_POST["tzMins"]) { + if(trim($_POST["name"])) { + if(trim($_POST["username"])) { + mysql_query("UPDATE `config` SET + `cooldown`='". $_POST['cooldown'] ."', + `name`='". mysql_real_escape_string(trim($_POST['name'])) ."', + `username`='". mysql_real_escape_string(trim($_POST['username'])) ."', + `dst`=". (($_POST['dst'])?"1":"0") .", + `timezone`='". $_POST['tzSign'] . $_POST['tzHour'] .":". $_POST['tzMins'] ."', + `parsechatbot`=". (($_POST['chatbot'])?"1":"0") ." + WHERE `id`=1") or die(mysql_error()); + mysql_query("UPDATE `updater` SET `config`=1 WHERE `id`=1"); + $config = mysql_fetch_object(mysql_query("SELECT * FROM `config` WHERE `id`=1")); + } else { + $configerr = "Chat username is empty!"; + } + } else { + $configerr = "Bot name is empty!"; + } + } else { + $configerr = "Timezone formatted incorrectly!"; + } + } else { + $configerr = "Cooldown is not a positive integer!"; + } +} + +$rowCount = mysql_num_rows(mysql_query("SELECT * FROM `navigate`")); + include("header.php"); ?> +
General Configuration
+ $configerr"; } ?>
@@ -20,11 +196,43 @@ include("header.php"); ?>
DST?dst) { ?> checked="true" /> - +
Default Cooldown: seconds
Chat Username:
Bot Name:
Bot Name:
+
+
+ Navigation Instructions +

In order for the bot to work, it needs to know how to both log into the website and get into the chat. The following is a user-defined method for the bot to perform this task.

+ + + +

Add instruction + + + +

+
+ \ No newline at end of file diff --git a/www/header.php b/www/header.php index 1554d24..fe324e7 100644 --- a/www/header.php +++ b/www/header.php @@ -1,3 +1,4 @@ + <?php echo $config->name; ?> Administration diff --git a/www/img/arrow_down.png b/www/img/arrow_down.png new file mode 100644 index 0000000000000000000000000000000000000000..2c4e279377bf348f9cf53894e76bb673ccf067bd GIT binary patch literal 379 zcmV->0fhdEP)RB*?~^j!LKVQ>(O&A{Xr%)RXLn#U zs4LtZ6rCMFY5|B2$)yG$6aaIF6w#wHUuW*nL5>vZR zlg{G&%mT~|kL3ei%GW0*UOHUMs5XI$4uxe-L?I@SAefq*207}Iqtjm#e5*fP53AiC z)C|RQfwzxx<#_WfANRGZx{+tFDl8~Q?;~Ve=lM^*8UTTnVL?HTDz8uta0D@d28E9S z_)i8aLz^UE6PPKymi;2GJ`34{eIia-CtfAt0H61rk0 SPTNud0000C4}Mrzlg<+1Y8PEBfUp0jJpx4B>@E+cy3`^(Gw`Mf+2&yxZm<$to~Vpgvg&QKNR z_f#1(r6svZt%iF?s+n<8X?B&!h3g9Dbb8_=MX}!;HiQSAh`bp^WMl~Z-44teO7W_Y zV4thSL{h;rJY7!l3%5J4H1!tIzB`Dv+YxO(haWeausGZYkI8^hWj6mzo=L0{%;yxzh{5!Htr?51 zvG|W62MzC8BZ76hRpCyO2zOn<%e)K>NHge!-~)Ap33OdWw6hsLYbCxGNt0%wk_2z7 zfyYvXheSG)5HRK1VB~%mq7Dmurw#bi@hEcOr3&G1ZiF*$M=&9nB#VNf&Q^r$4G5kp zTURh&s)E0%5&hyVD}sp<72~zmAY`Y(9aqO6CXF%=zFHGzO-A&I(pE}v70YQxCPJ{Y z4L+?5-crdLn3ZRPEs!A4ehEY3ZRpL~w9>@aMN+{F4dI@v&>(QDHQum!mG~E^$OS8l z!7?%Uwib*ROP67Hw`ika)gX-(8Ia`-u_IEhxG7U<13kSsMW+$lbb2dUMm5p6pa}cjgA+U$^mJ^AjD?&bdi)8~y+Q002ovPDHLkV1g8IMc@Dc literal 0 HcmV?d00001 diff --git a/www/index.php b/www/index.php index 0b5edfb..6645bf2 100644 --- a/www/index.php +++ b/www/index.php @@ -23,6 +23,7 @@ if($_GET["jew"] == "true")

Admin Login

+

Javascript must be enabled for proper functionality.

diff --git a/www/style.css b/www/style.css index 47798e9..f94685f 100644 --- a/www/style.css +++ b/www/style.css @@ -16,4 +16,12 @@ body { font-family: Times New Roman; font-size: 16px; +} + +.hide { + display: none; +} + +.fakelink:hover { + cursor: pointer; } \ No newline at end of file
Username: