summaryrefslogtreecommitdiff
path: root/ws2a
diff options
context:
space:
mode:
authorAlexander Pickering <alexandermpickering@gmail.com>2016-05-29 20:52:17 -0400
committerAlexander Pickering <alexandermpickering@gmail.com>2016-05-29 20:52:17 -0400
commit15fcc190319a3deaaeaa544833ea07475e790585 (patch)
tree25b9ad86998682bb0d270521ef9efa00c0047d8a /ws2a
parent785ac61778829e572556f4c9f40026e6b624e81e (diff)
downloadwebpage-15fcc190319a3deaaeaa544833ea07475e790585.tar.gz
webpage-15fcc190319a3deaaeaa544833ea07475e790585.tar.bz2
webpage-15fcc190319a3deaaeaa544833ea07475e790585.zip
re-synching
Diffstat (limited to 'ws2a')
-rw-r--r--ws2a/a.exebin69591 -> 0 bytes
-rw-r--r--ws2a/adj.txt201
-rw-r--r--ws2a/bugcomment.c186
-rw-r--r--ws2a/bugs.html81
-rw-r--r--ws2a/bugs.js57
-rw-r--r--ws2a/bugs/122
-rw-r--r--ws2a/bugs/212
-rw-r--r--ws2a/bugs/326
-rw-r--r--ws2a/bugs/419
-rw-r--r--ws2a/bugs/518
-rw-r--r--ws2a/bugs/610
-rw-r--r--ws2a/bugs/76
-rw-r--r--ws2a/bugs/86
-rw-r--r--ws2a/bugs/lastbug1
-rw-r--r--ws2a/bugsdata.c78
-rw-r--r--ws2a/bugview.html94
-rw-r--r--ws2a/bugview.js89
-rw-r--r--ws2a/gencaptcha.c91
-rw-r--r--ws2a/help.css54
-rw-r--r--ws2a/help.html98
-rw-r--r--ws2a/index.html2
-rw-r--r--ws2a/newbug.c183
-rw-r--r--ws2a/nouns.txt1525
-rw-r--r--ws2a/showbug.c51
-rwxr-xr-xws2a/test.txt0
-rw-r--r--ws2a/testcaptcha.pngbin10151 -> 0 bytes
-rw-r--r--ws2a/testhtmlreplace.c108
-rw-r--r--ws2a/writetest.c10
28 files changed, 153 insertions, 2875 deletions
diff --git a/ws2a/a.exe b/ws2a/a.exe
deleted file mode 100644
index 2b28d5e..0000000
--- a/ws2a/a.exe
+++ /dev/null
Binary files differ
diff --git a/ws2a/adj.txt b/ws2a/adj.txt
deleted file mode 100644
index e83f470..0000000
--- a/ws2a/adj.txt
+++ /dev/null
@@ -1,201 +0,0 @@
-adorable
-beautiful
-clean
-drab
-elegant
-fancy
-glamorous
-handsome
-long
-magnificent
-old-fashioned
-plain
-quaint
-sparkling
-ugliest
-unsightly
-wide-eyed
-alive
-better
-careful
-clever
-dead
-easy
-famous
-gifted
-helpful
-important
-inexpensive
-mushy
-odd
-powerful
-rich
-shy
-tender
-uninterested
-vast
-wrong
-angry
-bewildered
-clumsy
-defeated
-embarrassed
-fierce
-grumpy
-helpless
-itchy
-jealous
-lazy
-mysterious
-nervous
-obnoxious
-panicky
-repulsive
-scary
-thoughtless
-uptight
-worried
-agreeable
-brave
-calm
-delightful
-eager
-faithful
-gentle
-happy
-jolly
-kind
-lively
-nice
-obedient
-proud
-relieved
-silly
-thankful
-victorious
-witty
-zealous
-broad
-chubby
-crooked
-curved
-deep
-flat
-high
-hollow
-low
-narrow
-round
-shallow
-skinny
-square
-steep
-straight
-wide
-big
-colossal
-fat
-gigantic
-great
-huge
-immense
-large
-little
-mammoth
-massive
-miniature
-petite
-puny
-scrawny
-short
-small
-tall
-teeny
-teeny-tiny
-tiny
-cooing
-deafening
-faint
-hissing
-loud
-melodic
-noisy
-purring
-quiet
-raspy
-screeching
-thundering
-voiceless
-whispering
-ancient
-brief
-early
-fast
-late
-long
-modern
-old
-old-fashioned
-quick
-rapid
-short
-slow
-swift
-young
-bitter
-delicious
-fresh
-greasy
-juicy
-hot
-icy
-loose
-melted
-nutritious
-prickly
-rainy
-rotten
-salty
-sticky
-strong
-sweet
-tart
-tasteless
-uneven
-weak
-wet
-wooden
-yummy
-boiling
-breeze
-broken
-bumpy
-chilly
-cold
-cool
-creepy
-crooked
-cuddly
-curly
-damaged
-damp
-dirty
-dry
-dusty
-filthy
-flaky
-fluffy
-freezing
-hot
-warm
-wet
-abundant
-empty
-few
-full
-heavy
-light
-many
-numerous
-sparse
-substantial
diff --git a/ws2a/bugcomment.c b/ws2a/bugcomment.c
deleted file mode 100644
index 38dd97d..0000000
--- a/ws2a/bugcomment.c
+++ /dev/null
@@ -1,186 +0,0 @@
-#include <stdio.h>
-#include <string.h>
-#include <stdlib.h>
-#include <stdint.h>
-
-char* replaceHTML(char* str){
- printf("Replaceing:%s\n",str);
- char* nstr = malloc((sizeof(char)*strlen(str)) + 1);
- if(nstr == NULL){
- printf("%s%c%c\n","Content-Type:text/html;charset=iso-8859-1",13,10);
- printf("Failed to allocate memory!\n");
- }
-
- int strp = 0;
- int nstrp = 0;
- while(str[strp] != '\0'){
- //printf("Strp=%d nstrp=%d\n",strp,nstrp);
- if(str[strp] == '+'){
- nstr[nstrp] = ' ';
- strp++;
- nstrp++;
- }else if(str[strp] == '%'){
- //printf("Hit encodeing!\n");
- int hex = 0;
- sscanf(str+strp,"%%%2x",&hex);
- //printf("Was:%c(%d)\n",(char)hex,hex);
- if(hex == 0x0D){
- strp+=3;
- continue;
- }
- if(hex == 0x0A){
- nstr[nstrp] = '\\';
- nstr[nstrp+1] = 'n';
- nstrp+=2;
- strp+=3;
- continue;
- }
- nstr[nstrp] = (char)hex;
- nstrp++;
- strp+=3;
- }else if(str[strp] == '\n'){
- nstr[nstrp] = '\\';
- nstr[nstrp+1] = 'n';
- nstrp+=2;
- strp++;
- }else{
- nstr[nstrp] = str[strp];
- nstrp++;
- strp++;
- }
- }
- nstr[nstrp] = '\0';
- printf("Done, str is now:%s\n",nstr);
- return nstr;
-}
-
-unsigned long hash(unsigned char *str){
- unsigned long hash = 5381;
- int c;
-
- while (c = *str++)
- hash = ((hash << 5) + hash) + c; /* hash * 33 + c */
-
- return hash;
-}
-
-char* useridhash(char* str){
- printf("useridhash\n");
- char* hash = calloc(sizeof(char)*20,sizeof(char));
- int i = (int)str[0];
- int len = strlen(str);
- int tloop = i*20;
- unsigned int hashp = 0;
- unsigned int strp = 0;
- i = 0;
- while(i < tloop){
- //printf("i:%d hashp:%u strp:%u tloop:%d\n",i,hashp,strp,tloop);
- char tchar = str[strp%len];
- hash[hashp%20] += str[strp%len];
- str[strp%len]+=1;
- hashp+=(int)tchar;
- strp+=(int)(hashp*hashp);
- i++;
- }
- i = 0;
- //printf("Before characterizeing the hash, it was: %s\n",hash);
- while(i < 20){
- //printf("Normalizeing %c(%u) as %c(%u)\n",hash[i],(unsigned int)hash[i],(hash[i] % 92) + 32,(hash[i] % 92) + 32);
- unsigned int hashnum = hash[i];
- unsigned int modedhashnum = hashnum % 92;
- //printf("hashnum was %u, after mod it is:%u\n",hashnum,modedhashnum);
- hash[i] = modedhashnum + 32;
- i++;
- }
- printf("Resulting hash was:%s\n",hash);
- return hash;
-}
-
-int main(){
- char* data = getenv("QUERY_STRING");
- //char data[20] = "?id=1";
- char* hardip = getenv("REMOTE_ADDR");
- //char data[] = "name=Apickx&id=test&comment=Can+I+comment+on+other+bugs%3F&captcha=clean+night&bugid=7";
-
- char name[15];
- char userid[20];
- char comment[2048];
- char captcha[30];
- char bugid[5];
-
- char* iname = strtok(data,"&");
- char* iuserid = strtok(NULL,"&");
- char* icomment = strtok(NULL,"&");
- char* icaptcha = strtok(NULL,"&");
- char* ibugid = strtok(NULL,"&");
-
- sscanf(iname,"name=%s",name);
- sscanf(iuserid,"id=%s",userid);
- sscanf(icomment,"comment=%s",comment);
- sscanf(icaptcha,"captcha=%s",captcha);
- sscanf(ibugid,"bugid=%s",bugid);
-
- /*
- char* name = "Apickx";
- char* userid = "ThestID";
- char* comment = "This+Is+My+Comment";
- char* captcha = "teeny-tiny+currency";
- char* bugid = "1";
- */
-
- //printf("<p>name:%s<p>userid:%s<p>comment:%s<p>captcha:%s<p>bugid:%s",name,userid,comment,captcha,bugid);
-
- //Check captcha
- char captchapath[100];
- char* captchadecoded = replaceHTML(captcha);
- sprintf(captchapath,"../ws2a/captchas/%s.txt",captchadecoded);
- //printf("Generated path...\n");
- FILE* captchafile = fopen(captchapath,"r");
- if(captchafile == NULL){
- printf("%s%c%c\n","Content-Type:text/html;charset=iso-8859-1",13,10);
- printf("Captcha incorrect");
- return;
- }
- //Hash of "teeny-tiny currency" is 2053680550
- unsigned long inputhash = hash(captchadecoded);
- free(captchadecoded);
- unsigned long filehash = 0;
- fscanf(captchafile,"%lu",&filehash);
- if(filehash != inputhash){
- printf("%s%c%c\n","Content-Type:text/html;charset=iso-8859-1",13,10);
- printf("Captcha incorrect");
- return;
- }
- fclose(captchafile);
- char command[100];
- sprintf(command,"rm \"%s\"",captchapath);
- system(command);
- //printf("After first command\n");
- sprintf(command,"rm \"../ws2a/captchas/%lu.png\"",inputhash);
- system(command);
- //printf("After second command\n");
-
- //Add comment to bug file
- char filepath[100];
- sprintf(filepath,"../ws2a/bugs/%s",bugid);
- FILE* bugfile = fopen(filepath,"a");
- if(bugfile == NULL){
- printf("%s%c%c\n","Content-Type:text/html;charset=iso-8859-1",13,10);
- printf("<p>Unable to find bug!");
- return;
- }
- char* dname = replaceHTML(name);
- char* duid = useridhash(userid);
- char* dcomment = replaceHTML(comment);
- //printf("%s%c%c\n","Content-Type:text/html;charset=iso-8859-1",13,10);
- printf("Location: ../ws2a/bugview.html?id=%s\n\n",bugid);
- //printf("<p>data:%s",data);
- //printf("<p>comment:%s<p>dcomment:%s",comment,dcomment);
- //printf("Everything ok, inserting comment!");
- fprintf(bugfile,"\n%s\n%s\n%s\n",dname,duid,dcomment);
- fclose(bugfile);
- free(dname);
- free(duid);
- free(dcomment);
- return 0;
-}
diff --git a/ws2a/bugs.html b/ws2a/bugs.html
deleted file mode 100644
index 248759b..0000000
--- a/ws2a/bugs.html
+++ /dev/null
@@ -1,81 +0,0 @@
-<!DOCTYPE html>
-<html lang="en">
- <head>
- <meta charset="utf-8">
- <meta http-equiv="X-UA-Compatible" content="IE=edge">
- <meta name="viewport" content="width=device-width, initial-scale=1">
- <!-- The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags -->
- <meta name="description" content="">
- <meta name="author" content="">
-
- <title>WS2A</title>
-
- <!-- Bootstrap core CSS -->
- <link href="../css/bootstrap.min.css" rel="stylesheet">
-
- <!-- Custom styles for this template -->
- <link href="jumbotron-narrow.css" rel="stylesheet">
-
- <script type="text/javascript" src="bugs.js"></script>
-
- <!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
- <!--[if lt IE 9]>
- <script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
- <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
- <![endif]-->
- </head>
-
- <body>
-
- <div class="container">
- <div class="header clearfix">
- <nav>
- <ul class="nav nav-pills pull-right">
- <li role="presentation"><a href="./index.html">Home</a></li>
- <li role="presentation" class="active"><a href="./bugs.html">Bugs</a></li>
- <li role="presentation"><a href="./help.html">Help</a></li>
- </ul>
- </nav>
- <h3 class="text-muted">Winter Survival 2 - Anarchy</h3>
- </div>
-
- <h2 class="sub-header">Recently submitted bugs</h2>
- <div class="table-responsive">
- <table class="table table-striped">
- <thead>
- <tr>
- <th> </th>
- <th>Submitter</th>
- <th>Date Submitted</th>
- <th>Description</th>
- <th>Status</th>
- </tr>
- </thead>
- <tbody id="bugstable">
-
- </tbody>
- </table>
- </div>
-
- <form class="form-signin" action="/cgi-bin/newbug.cgi">
- <h2 class="form-signin-heading">Create a bug report</h2>
- <label for="inputName" class="sr-only">Name</label>
- <input id="inputName" name="name" class="form-control" placeholder="Screen Name" required="" autofocus="" type="text">
- <label for="inputID" class="sr-only">Identifier</label>
- <input id="inputID" name="id" class="form-control" placeholder="Identifier" required="" type="password">
- <label for="shortdesc" class="sr-only">Short Description</label>
- <input id="shortdesc" name="shortdesc" class="form-control" placeholder="Short description" required="" type="text">
- <textarea class="form-control" name="longdesc" rows="5" cols="50" placeholder="Long description"></textarea>
- <div id="captcha"></div>
- <input id="solvecaptcha" name="captcha" class="form-control" placeholder="captcha" type="text">
- <button class="btn btn-lg btn-primary btn-block" type="Post">Post</button>
- </form>
-
- <footer class="footer">
- <p>Contact the admin at <a href="mailto:apickx@cogarr.org">Apickx@cogarr.org</a></p>
- </footer>
-
- </div> <!-- /container -->
-
- </body>
-</html>
diff --git a/ws2a/bugs.js b/ws2a/bugs.js
deleted file mode 100644
index 209b936..0000000
--- a/ws2a/bugs.js
+++ /dev/null
@@ -1,57 +0,0 @@
-function htmlEscape(str) {
- return String(str)
- .replace(/&/g, '&amp;')
- .replace(/"/g, '&quot;')
- .replace(/'/g, '&#39;')
- .replace(/</g, '&lt;')
- .replace(/>/g, '&gt;')
- .replace(/\//g, '&#x2F;');
-}
-
-function loadLastBugs() {
- var xhttp = new XMLHttpRequest();
- xhttp.onreadystatechange = function() {
- if (xhttp.readyState == 4 && xhttp.status == 200) {
- var parts = xhttp.response.split("\n");
- console.log(parts);
- var i = 0
- var table = document.getElementById("bugstable");
- while(i < (parts.length-2)){
- var newrow = document.createElement("tr");
- var submitter = htmlEscape(parts[i]);
- var submitterid = htmlEscape(parts[i+1]);
- var date = htmlEscape(parts[i+2]);
- var desc = htmlEscape(parts[i+3]);
- var status = htmlEscape(parts[i+4]);
- var comments = htmlEscape(parts[i+5]);
- var bugid = htmlEscape(parts[i+6]);
- if(bugid == null){
- return;
- }
- var statusicon = ""
- if(status == "0:"){
- statusicon = "<span class=\"label label-default\">Unassigned</span>";
- }else if(status.substring(0,2) == "1:"){
- statusicon = "<span class=\"label label-info\">" + status.substring(2) + "</span>";
- }else if(status == "2:"){
- statusicon = "<span class=\"label label-success\">Closed</span>";
- }
- newrow.innerHTML = "<tr><td><a href=\"./bugview.html?id=" + bugid + "\">View<span class=\"badge\">" + comments + "</span></a></td><td>" + submitter + "<b>" + submitterid + "</b>" + "</td><td>" + date + "</td><td>" + desc + "</td><td>" + statusicon + "</td></tr>";
- table.appendChild(newrow);
- i = i + 7;
- }
- }
- };
- xhttp.open("GET", "/cgi-bin/bugsdata.cgi", true);
- xhttp.send();
- var captcha = new XMLHttpRequest();
- captcha.onreadystatechange = function() {
- if (captcha.readyState == 4 && captcha.status == 200) {
- var id = captcha.response;
- document.getElementById("captcha").innerHTML = "<img src=\"./captchas/" + id + ".png\">";
- }
- }
- captcha.open("GET", "/cgi-bin/gencaptcha.cgi",true);
- captcha.send();
-}
-window.onload = loadLastBugs
diff --git a/ws2a/bugs/1 b/ws2a/bugs/1
deleted file mode 100644
index c3a3f0e..0000000
--- a/ws2a/bugs/1
+++ /dev/null
@@ -1,22 +0,0 @@
-Submitter 8
-lasdfjla1231
-Date_submitted
-Short Description
-0:
-Long description
-
-User person
-sdlfkj13221lkjl
-Comment
-
-Another User
-4234lkjsdf3234
-Their comment
-
-Apickx
-eD=$U&C]s&Ofyr6y^"{*cmd.Z�̺
-This Is My Comment
-
-Apickx
-YHOujV7o98Gqa%#o*w!ai
-<h1êAttempting injection</h1>
diff --git a/ws2a/bugs/2 b/ws2a/bugs/2
deleted file mode 100644
index 98718cb..0000000
--- a/ws2a/bugs/2
+++ /dev/null
@@ -1,12 +0,0 @@
-Submitter 7
-a;ljkasdf8213
-Date_submitted
-Short Description
-0:
-Long description
-
-Apickx
-` .%7,132),@83?)6 i
-This is a comment
-That in includes
-Newlines
diff --git a/ws2a/bugs/3 b/ws2a/bugs/3
deleted file mode 100644
index c0137e9..0000000
--- a/ws2a/bugs/3
+++ /dev/null
@@ -1,26 +0,0 @@
-Submitter 6
-alsdfkj19283
-Date_submitted
-Short Description
-1:Test User
-Long description
-
-Apickx
-` 47-:-@'6-%8->) i
-Comment
-
-Apickx
-` -6@0-%+9- ` i
-this\nIsªA\nMulti\nLine¬Comment
-
-Apickx
-` 0=@&)7)&)00 ` i
-this\nIsªA\nMulti\nLine¬Comment
-
-Apickx
-` <@7-/2%8=6) ` i
-This\nIsªAnother\nMulti\nLine¬Comment
-
-Apickx
-` 30-2/@%7;-78` i
-I\nThink\nI\nFinally\nFixed\nNew\nLine\nComments\nA\nB\nC
diff --git a/ws2a/bugs/4 b/ws2a/bugs/4
deleted file mode 100644
index 1c128f0..0000000
--- a/ws2a/bugs/4
+++ /dev/null
@@ -1,19 +0,0 @@
-Submitter 5
-alsdkfj89218379
-Date_submitted
-Short Description
-2:
-Long description
-
-Apicxk
-` A@467(9'< ` i
-This is ªA comment
-With a þFew Newlines
-
-Test comment
-` ` ` ` ` ‰
-How does this thing
-send new lines
-to the server? ªAre they ®Encoded with
-Some sort of
-html?
diff --git a/ws2a/bugs/5 b/ws2a/bugs/5
deleted file mode 100644
index 7a0dc06..0000000
--- a/ws2a/bugs/5
+++ /dev/null
@@ -1,18 +0,0 @@
-Submitter 4
-asldfj1283791287
-Date_submitted
-Short Description
-0:
-Long description
-
-Apickx
-` 78,@87='0303/= i
-This
-Is ªAnother
-Test
-To
-See
-If
-New
-Lines ªAre
-Working
diff --git a/ws2a/bugs/6 b/ws2a/bugs/6
deleted file mode 100644
index dc9666a..0000000
--- a/ws2a/bugs/6
+++ /dev/null
@@ -1,10 +0,0 @@
-Submitter 3
-alsdkfj1928379
-Date_submitted
-Short Description
-1:Another test user
-Long description
-
-Apickx
-U!Qw::&oa0EUB@sp+]N&i
-Createing a comment on this bug!
diff --git a/ws2a/bugs/7 b/ws2a/bugs/7
deleted file mode 100644
index 3df129f..0000000
--- a/ws2a/bugs/7
+++ /dev/null
@@ -1,6 +0,0 @@
-Submitter 2
-lasdkfj18923
-Date_submitted
-Short Description
-2:
-Long description
diff --git a/ws2a/bugs/8 b/ws2a/bugs/8
deleted file mode 100644
index cb01572..0000000
--- a/ws2a/bugs/8
+++ /dev/null
@@ -1,6 +0,0 @@
-Submitter 1
-lasdfjk12938
-Date_submitted
-Short Description
-2:
-Long description
diff --git a/ws2a/bugs/lastbug b/ws2a/bugs/lastbug
deleted file mode 100644
index 45a4fb7..0000000
--- a/ws2a/bugs/lastbug
+++ /dev/null
@@ -1 +0,0 @@
-8
diff --git a/ws2a/bugsdata.c b/ws2a/bugsdata.c
deleted file mode 100644
index 0370147..0000000
--- a/ws2a/bugsdata.c
+++ /dev/null
@@ -1,78 +0,0 @@
-#include <stdio.h>
-#include <string.h>
-#include <stdlib.h>
-#include <stdint.h>
-
-int main(){
- printf("%s%c%c\n",
- "Content-Type:text/html;charset=iso-8859-1",13,10);
- FILE* lastfilenum;
- lastfilenum = fopen("../ws2a/bugs/lastbug","r");
- if(lastfilenum == NULL){
- printf("Error reteriveing bugs, contact the admin!");
- return 1;
- }
- long long last = 0;
- fscanf(lastfilenum,"%lld",&last);
- fclose(lastfilenum);
- long long end = last-20;
-
- while(last > end && last > 0){
- char filestring[64] = "../ws2a/bugs/";
- char filename[10];
- sprintf(filename,"%lld",last);
- strcat(filestring,filename);
- FILE* thisbug;
- thisbug = fopen(filestring,"r");
- if(thisbug == NULL){
- printf("Error opening bug:%s\n",filestring);
- printf("<br/>");
- last--;
- continue;
- }
- printbug(thisbug);
- printf("%lld\n",last);
- fclose(thisbug);
- last--;
- }
-
- return 0;
-}
-/*Prints bugs, format:
- Submitter\n
- SubmitterID
- Date_submitted\n
- Short Description\n
- Status<Unassigned, Assigned, Closed>\n
- numcomments\n
- bugid
-*/
-void printbug(FILE* f){
-
- int line = 0;
- char tchar = ' ';
- while((tchar = fgetc(f)) && tchar != EOF){
- if(tchar == '\n')
- line++;
- if(line > 4)
- break;
- putchar(tchar);
- }
-
- unsigned int comments = 0;
- while (EOF != (fscanf(f,"%*[^\n]"), fscanf(f,"%*c")))
- ++comments;
- printf("\n%u\n",(comments-1)/4);
-}
-
-/*
-function htmlEscape(str) {
- return String(str)
- .replace(/&/g, '&amp;')
- .replace(/"/g, '&quot;')
- .replace(/'/g, '&#39;')
- .replace(/</g, '&lt;')
- .replace(/>/g, '&gt;')
- .replace(/\//g, '&#x2F;');
-}
-*/
diff --git a/ws2a/bugview.html b/ws2a/bugview.html
deleted file mode 100644
index c0cf3fa..0000000
--- a/ws2a/bugview.html
+++ /dev/null
@@ -1,94 +0,0 @@
-<!DOCTYPE html>
-<html lang="en">
- <head>
- <meta charset="utf-8">
- <meta http-equiv="X-UA-Compatible" content="IE=edge">
- <meta name="viewport" content="width=device-width, initial-scale=1">
- <!-- The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags -->
- <meta name="description" content="">
- <meta name="author" content="">
-
- <title>WS2A</title>
-
- <!-- Bootstrap core CSS -->
- <link href="../css/bootstrap.min.css" rel="stylesheet">
-
- <!-- Custom styles for this template -->
- <link href="jumbotron-narrow.css" rel="stylesheet">
-
- <script type="text/javascript" src="bugview.js"></script>
-
- <!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
- <!--[if lt IE 9]>
- <script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
- <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
- <![endif]-->
- </head>
-
- <body>
-
- <div class="container">
- <div class="header clearfix">
- <nav>
- <ul class="nav nav-pills pull-right">
- <li role="presentation"><a href="./index.html">Home</a></li>
- <li role="presentation" class="active"><a href="./bugs.html">Bugs</a></li>
- <li role="presentation"><a href="./help.html">Help</a></li>
- </ul>
- </nav>
- <h3 class="text-muted">Winter Survival 2 - Anarchy</h3>
- </div>
-
- <h2 class="sub-header" id="bugid">Bugid</h2>
-
-
- <div class="panel panel-primary">
- <div class="panel-heading">
- <div class="row">
- <div class="col-sm-4">
- Submitter:<h3><id id="submitter">Loading...</id></h3><h5><b id="subid">Loading...</b></h5>
- </div>
- <div class="col-sm-4">
- Date submited:<h2><id id="date">Loading...</id></h2>
- </div>
- <div class="col-sm-4">
- Status:<h1><id id="status">Loading...</id></h1>
- </div>
- </div>
- </div>
-
- <div class="panel-body">
- <h3 id="shortdesc">Loading...</h3>
- <div id="longdesc">
- Loading...
- </div>
- </div>
- </div>
-
- <div id="comments">
-
- </div>
-
- <div class="container">
- <form class="form-signin" action="/cgi-bin/bugcomment.cgi">
- <h2 class="form-signin-heading">Leave a comment</h2>
- <label for="inputName" class="sr-only">Name</label>
- <input id="inputName" name="name" class="form-control" placeholder="Screen Name" required="" autofocus="" type="text">
- <label for="inputID" class="sr-only">Identifier</label>
- <input id="inputID" name="id" class="form-control" placeholder="Identifier" required="" type="password">
- <textarea class="form-control" name="comment" rows="5" cols="50"></textarea>
- <div id="captcha"></div>
- <input class="form-group" id="solvecaptcha" name="captcha" class="form-control" placeholder="captcha" type="text">
- <input type="hidden" name="bugid" id=bgid>
- <button class="btn btn-lg btn-primary btn-block" type="Post">Post</button>
- </form>
- </div>
-
- <footer class="footer">
- <p>Contact the admin at <a href="mailto:apickx@cogarr.org">Apickx@cogarr.org</a></p>
- </footer>
-
- </div> <!-- /container -->
-
- </body>
-</html>
diff --git a/ws2a/bugview.js b/ws2a/bugview.js
deleted file mode 100644
index bad27f6..0000000
--- a/ws2a/bugview.js
+++ /dev/null
@@ -1,89 +0,0 @@
-function getQueryStrings() {
- var assoc = {};
- var decode = function (s) { return decodeURIComponent(s.replace(/\+/g, " ")); };
- var queryString = location.search.substring(1);
- var keyValues = queryString.split('&');
-
- for(var i in keyValues) {
- var key = keyValues[i].split('=');
- if (key.length > 1) {
- assoc[decode(key[0])] = decode(key[1]);
- }
- }
-
- return assoc;
-}
-
-function htmlEscape(str) {
- return String(str)
- .replace(/&/g, '&amp;')
- .replace(/"/g, '&quot;')
- .replace(/'/g, '&#39;')
- .replace(/</g, '&lt;')
- .replace(/>/g, '&gt;')
- .replace(/\//g, '&#x2F;')
- .replace(/\\n/g, '<br/>');
-}
-
-function loadLastBugs() {
- var xhttp = new XMLHttpRequest();
- xhttp.onreadystatechange = function() {
- if (xhttp.readyState == 4 && xhttp.status == 200) {
- var parts = xhttp.response.split("\n");
- var query = getQueryStrings();
- var bugnum = query["id"];
- document.getElementById("submitter").innerHTML = htmlEscape(parts[0]);
- document.getElementById("subid").innerHTML = htmlEscape(parts[1]);
- document.getElementById("date").innerHTML = htmlEscape(parts[2]);
- document.getElementById("bugid").innerHTML = "Bug #" + bugnum;
- document.getElementById("shortdesc").innerHTML = htmlEscape(parts[3]);
- var statustext = parts[4];
- var statusicon = ""
- if(statustext == "0:"){
- statusicon = "<span class=\"label label-default\">Unassigned</span>";
- }else if(statustext.substring(0,2) == "1:"){
- statusicon = "<span class=\"label label-info\">" + status.substring(2) + "</span>";
- }else if(statustext == "2:"){
- statusicon = "<span class=\"label label-success\">Closed</span>";
- }
-
- document.getElementById("status").innerHTML = statusicon;
- document.getElementById("longdesc").innerHTML = htmlEscape(parts[5]);
- console.log(parts);
- var i = 6;
- var commentsec = document.getElementById("comments");
- while(i < (parts.length-2)){
- var commentnode = document.createElement("div");
- commentnode.setAttribute("class","panel panel-info");
- var commenter = htmlEscape(parts[i+1]);
- var commentid = htmlEscape(parts[i+2]);
- var commenttext = htmlEscape(parts[i+3]);
- if(commenttext == null){
- return;
- }
- commentnode.innerHTML = "<div class=\"panel-heading\">" + commenter + "<b>" + commentid + "</b></div><div class=\"panel-body\">" + commenttext + "</div>";
- commentsec.appendChild(commentnode);
- i = i + 4;
- }
- //document.getElementById("longdesc").innerHTML = xhttp.responseText;
- }
- };
- var query = getQueryStrings();
- var bugnum = query["id"];
- xhttp.open("GET", "/cgi-bin/showbug.cgi?id="+bugnum, true);
- xhttp.send();
- var captcha = new XMLHttpRequest();
- captcha.onreadystatechange = function() {
- if (captcha.readyState == 4 && captcha.status == 200) {
- var id = captcha.response;
- document.getElementById("captcha").innerHTML = "<img src=\"./captchas/" + id + ".png\">";
- var query = getQueryStrings();
- var bugnum = query["id"];
- document.getElementById("bgid").setAttribute("value",bugnum);
- console.log("Added hidden field to form:" + bugnum);
- }
- }
- captcha.open("GET", "/cgi-bin/gencaptcha.cgi",true);
- captcha.send();
-}
-window.onload = loadLastBugs
diff --git a/ws2a/gencaptcha.c b/ws2a/gencaptcha.c
deleted file mode 100644
index cc57651..0000000
--- a/ws2a/gencaptcha.c
+++ /dev/null
@@ -1,91 +0,0 @@
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <time.h>
-//convert label.png -virtual-pixel White -distort Arc 60 arctest.png
-
-//convert -background gray -fill cyan -pointsize 72 label:Alex label.png
-
-//convert label.png -virtual-pixel white -distort Barrel "0.2 0.0 0.0 1.0" barrel.png
-#define ADJNUM 200
-#define NOUNUM 1524
-#define AVGADJ 7
-#define AVGNOU 7
-#define LONGADJ 14
-#define LONGNOU 15
-
-void createRandomWords(char* buf){
- long adjnum = rand() % ADJNUM;
- long nounum = rand() % NOUNUM;
- FILE* adjfile;
- FILE* noufile;
- adjfile = fopen("../ws2a/adj.txt","r");
- noufile = fopen("../ws2a/nouns.txt","r");
- //Instead of getting a particular line, seek an average length, and find the next word.
- if(adjfile == NULL || noufile == NULL){
- printf("Something has gone serirously wrong!");
- }
- fseek(adjfile,adjnum*AVGADJ,0);
- fseek(noufile,nounum*AVGNOU,0);
-
- while(fgetc(adjfile) != '\n'){}
- while(fgetc(noufile) != '\n'){}
- int pos = 0;
- char tchar = fgetc(adjfile);
- do{
- buf[pos] = tchar;
- pos++;
- tchar = fgetc(adjfile);
- }while(tchar != '\n');
- buf[pos] = ' ';
- pos++;
- tchar = fgetc(noufile);
- do{
- buf[pos] = tchar;
- pos++;
- tchar = fgetc(noufile);
- }while(tchar != '\n');
- buf[pos] = '\0';
-}
-
-
-unsigned long hash(unsigned char *str){
- unsigned long hash = 5381;
- int c;
-
- while (c = *str++)
- hash = ((hash << 5) + hash) + c; /* hash * 33 + c */
-
- return hash;
-}
-
-int main(){
-
- srand(time(NULL));
- char randwords[LONGADJ+LONGNOU+1];
- createRandomWords(randwords);
-
- int barraldis1 = rand()%10;
- int barraldis2 = rand()%10;
- int arcdis = (rand()%45)+45;
- char command[1024];
- unsigned long rhash = hash(randwords);
- sprintf(command,"convert -background white -fill black -pointsize 48 label:\"%s\" \"../ws2a/captchas/%lu.png\"",randwords,rhash);
- system(command);
- sprintf(command,"convert \"../ws2a/captchas/%lu.png\" -distort Barrel \"0.0%d 0.0 0.0%d\" \"../ws2a/captchas/%lu.png\"",rhash,barraldis1,barraldis2,rhash);
- system(command);
- sprintf(command,"convert \"\"../ws2a/captchas/%lu.png\" -virtual-pixel White -distort Arc %d \"../ws2a/captchas/%lu.png\"",rhash,arcdis,rhash);
- system(command);
-
- printf("%s%c%c\n","Content-Type:text/html;charset=iso-8859-1",13,10);
- printf("%lu",rhash);
-
- FILE* tfile;
- char filepath[100];
- sprintf(filepath,"../ws2a/captchas/%s.txt",randwords);
- tfile = fopen(filepath,"w");
- fprintf(tfile,"%lu",rhash);
- fclose(tfile);
-
- return 0;
-}
diff --git a/ws2a/help.css b/ws2a/help.css
new file mode 100644
index 0000000..3645ed7
--- /dev/null
+++ b/ws2a/help.css
@@ -0,0 +1,54 @@
+/* F.A.Q */
+
+div { position: relative; }
+input[type=checkbox] {
+ position: absolute;
+ top: 0;
+ left: 0;
+ width: 100%;
+ height: 100%;
+ opacity: 0;
+}
+h2 {
+ font-size: 30px;
+ font-weight: 400;
+ margin: 60px 0 10px 0;
+}
+label {
+ cursor: pointer;
+}
+label {
+ position: relative;
+ display: block;
+ padding-left: 30px;
+}
+label:before {
+ content: "";
+ position: absolute;
+ width: 0;
+ height: 0;
+ top: 50%;
+ left: 10px;
+ border-left: 8px solid black;
+ border-top: 8px solid transparent;
+ border-bottom: 8px solid transparent;
+ margin-top: -8px;
+}
+input[type=checkbox]:checked ~ h2 label:before {
+ border-left: 8px solid transparent;
+ border-top: 8px solid black;
+ border-right: 8px solid transparent;
+ margin-left: -4px;
+ margin-top: -4px
+}
+
+p {
+ max-height: 100;
+ overflow: hidden;
+ padding-left: 30px;
+ transition: max-height 0.4s ease;
+ font-family: 'Habibi', serif;
+}
+input[type=checkbox]:checked ~ h2 ~ p {
+ max-height: 80px;
+}
diff --git a/ws2a/help.html b/ws2a/help.html
new file mode 100644
index 0000000..e6dc6b5
--- /dev/null
+++ b/ws2a/help.html
@@ -0,0 +1,98 @@
+<!DOCTYPE html>
+<html lang="en">
+ <head>
+ <meta charset="utf-8">
+ <meta http-equiv="X-UA-Compatible" content="IE=edge">
+ <meta name="viewport" content="width=device-width, initial-scale=1">
+ <!-- The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags -->
+ <meta name="description" content="">
+ <meta name="author" content="">
+
+ <title>WS2A</title>
+
+ <!-- Bootstrap core CSS -->
+ <link href="../css/bootstrap.min.css" rel="stylesheet">
+
+ <!-- Custom styles for this template -->
+ <link href="jumbotron-narrow.css" rel="stylesheet">
+ <link href="./help.css" rel="stylesheet">
+
+ <!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
+ <!--[if lt IE 9]>
+ <script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
+ <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
+ <![endif]-->
+ </head>
+
+ <body>
+
+ <div class="container">
+ <div class="header clearfix">
+ <nav>
+ <ul class="nav nav-pills pull-right">
+ <li role="presentation"><a href="">Home</a></li>
+ <li role="presentation"><a href="./bugs.html">Bugs</a></li>
+ <li role="presentation" class="active"><a href="./help.html">Help</a></li>
+ </ul>
+ </nav>
+ <h3 class="text-muted">Winter Survival 2 - Anarchy</h3>
+ </div>
+
+ <div class="masthead">
+ <nav>
+ <ul class="nav nav-justified">
+ <li><a href="s1">For Server Owners</a></li>
+ <li><a href="s2">For Server Admins</a></li>
+ <li><a href="s3">For Developers</a></li>
+ </ul>
+ </nav>
+ </div>
+
+ <div id="#s1">
+ <h2>For Server Owners</h2>
+ <p>To intall, simply drop the wintersurvival2 folder into the /gamemodes/ folder of your server, located at /garrysmod/gamemodes/. Then, add the folowing line to /garrysmod/cfg/server.cfg
+ <p><pre><br/><code>gamemode wintersurvival2</code><br/></pre>
+ <p>The gamemode should be able to use admin mods like ULX, but they haven't been tested. In addition, Winter Survival 2 - Anarchy comes with it's own admin system, see "For Server Admins" below
+ <p>Admins must be added by adding the name/steamid to the garrysmod/settings/users.txt file like so
+ <pre>
+ "admin"
+ {
+ "Apickx" "STEAM_0:0:13641699"
+ }
+ </pre>
+ </div>
+
+ <div id="#s2">
+ <h2>For Server Admins</h2>
+ This is a breif list of admin commands that can be used.
+ <br/><code>mas_goto string_playername</code><br/>
+ Teleports you to another player
+ <br/><code>mas_sethp string_playername number_health</code><br/>
+ Sets a player health
+ <br/><code>mas_bring string_playername</code><br/>
+ Teleports another player to you
+ <br/><code>mas_god string_playername</code><br/>
+ Enables godmode for a player, they will not take dammage, and cannot die.
+ <br/><code>mas_ungod string_playername</code><br/>
+ Disables godmode for a player
+ <br/><code>mas_bansteamid string_steamid number_time string_reason</code><br/>
+ Bans a player for an ammount of time. If the time is 0, this will ban the player permenently. When the player tries to join, they will get a popup with "You are banned:string_reason" on their screen.
+ <br/><code>mas_unbansteamid string_steamid</code><br/>
+ Unbans the given steamid.
+ <br/><code>mas_printbannedplayers</code><br/>
+ Prints all banned players to console
+ <br/><code>mas_banplayer string_playername</code><br/>
+ Bans a player with the given playername. Translates the player's name to their steamid. If a player has a name changer, use mas_bansteamid instead. You can find a player's steamid with <code>status</code>
+ </pre></code><br/>
+ </div>
+
+
+
+ <footer class="footer">
+ <p>Contact the admin at <a href="mailto:apickx@cogarr.org">Apickx@cogarr.org</a></p>
+ </footer>
+
+ </div> <!-- /container -->
+
+ </body>
+</html>
diff --git a/ws2a/index.html b/ws2a/index.html
index adf04cc..bdf0a62 100644
--- a/ws2a/index.html
+++ b/ws2a/index.html
@@ -57,7 +57,7 @@
<div class="col-lg-6">
<h4>I want to help!</h4>
- <p>Feel free to get a copy of the source code and start hacking away <a href="/source/wintersurvival2">here</a></p>
+ <p>Feel free to get a copy of the source code and start hacking away <a href="http://cogarr.net/source/?p=wintersurvival2/.git;a=summary">here</a></p>
<h4>Where's the liscense?</h4>
<p>Although I like useing and publishing under copyleft liscenses, other people involved in development didn't give me much to work with! I can't bind their code under a liscense of my choice, but my code is free to use under the BSD 2-clause, and assets under Creative Commons Attribution</p>
diff --git a/ws2a/newbug.c b/ws2a/newbug.c
deleted file mode 100644
index cda4e38..0000000
--- a/ws2a/newbug.c
+++ /dev/null
@@ -1,183 +0,0 @@
-#include <stdio.h>
-#include <string.h>
-#include <stdlib.h>
-#include <stdint.h>
-
-char* replaceHTML(char* str){
- //printf("Replaceing:%s\n",str);
- char* nstr = malloc((sizeof(char)*strlen(str)) + 1);
- if(nstr == NULL){
- printf("%s%c%c\n","Content-Type:text/html;charset=iso-8859-1",13,10);
- printf("Failed to allocate memory!\n");
- }
-
- int strp = 0;
- int nstrp = 0;
- while(str[strp] != '\0'){
- //printf("Strp=%d nstrp=%d\n",strp,nstrp);
- if(str[strp] == '+'){
- nstr[nstrp] = ' ';
- strp++;
- nstrp++;
- }else if(str[strp] == '%'){
- //printf("Hit encodeing!\n");
- int hex = 0;
- sscanf(str+strp,"%%%2x",&hex);
- //printf("Was:%c(%d)\n",(char)hex,hex);
- if(hex == 0x0D){
- strp+=3;
- continue;
- }
- if(hex == 0x0A){
- nstr[nstrp] = '\\';
- nstr[nstrp+1] = 'n';
- nstrp+=2;
- strp+=3;
- continue;
- }
- nstr[nstrp] = (char)hex;
- nstrp++;
- strp+=3;
- }else if(str[strp] == '\n'){
- nstr[nstrp] = '\\';
- nstr[nstrp+1] = 'n';
- nstrp+=2;
- strp++;
- }else{
- nstr[nstrp] = str[strp];
- nstrp++;
- strp++;
- }
- }
- nstr[nstrp] = '\0';
- //printf("Done, str is now:%s\n",nstr);
- return nstr;
-}
-
-unsigned long hash(unsigned char *str){
- unsigned long hash = 5381;
- int c;
-
- while (c = *str++)
- hash = ((hash << 5) + hash) + c; /* hash * 33 + c */
-
- return hash;
-}
-
-char* useridhash(char* str){
- char* hash = calloc(sizeof(char)*20,sizeof(char));
- int i = (int)str[0];
- int len = strlen(str);
- int tloop = i*20;
- unsigned int hashp = 0;
- unsigned int strp = 0;
- i = 0;
- while(i < tloop){
- //printf("i:%d hashp:%u strp:%u tloop:%d\n",i,hashp,strp,tloop);
- char tchar = str[strp%len];
- hash[hashp%20] += str[strp%len];
- str[strp%len]+=1;
- hashp+=(int)tchar;
- strp+=(int)(hashp*hashp);
- i++;
- }
- i = 0;
- //printf("Before characterizeing the hash, it was: %s\n",hash);
- while(i < 20){
- //printf("Normalizeing %c(%u) as %c(%u)\n",hash[i],(unsigned int)hash[i],(hash[i] % 92) + 32,(hash[i] % 92) + 32);
- unsigned int hashnum = hash[i];
- unsigned int modedhashnum = hashnum % 92;
- //printf("hashnum was %u, after mod it is:%u\n",hashnum,modedhashnum);
- hash[i] = modedhashnum + 32;
- i++;
- }
- //printf("Resulting hash was:%s\n",hash);
- return hash;
-}
-
-int main(){
- char* data = getenv("QUERY_STRING");
- //char data[20] = "?id=1";
- char* hardip = getenv("REMOTE_ADDR");
- //char data[] = "name=Apickx&id=test&shortdesc=This&longdesc=This+is+the+first+ever+test+bug+to+be+created!&captcha=proud+pain";
-
- char name[20];
- char userid[20];
- char shortdesc[128];
- char longdesc[4096];
- char captcha[30];
-
- char* iname = strtok(data,"&");
- char* iuserid = strtok(NULL,"&");
- char* ishortdesc = strtok(NULL,"&");
- char* ilongdesc = strtok(NULL,"&");
- char* icaptcha = strtok(NULL,"&");
-
- sscanf(iname,"name=%s",name);
- sscanf(iuserid,"id=%s",userid);
- sscanf(ishortdesc,"shortdesc=%s",shortdesc);
- sscanf(ilongdesc,"longdesc=%s",longdesc);
- sscanf(icaptcha,"captcha=%s",captcha);
-
- //printf("name:%s\nid:%s\nshort:%s\nlong:%s\ncaptcha:%s\n",name,userid,shortdesc,longdesc,captcha);
-
- //Check captcha
- char captchapath[100];
- char* captchadecoded = replaceHTML(captcha);
- sprintf(captchapath,"../ws2a/captchas/%s.txt",captchadecoded);
-
- FILE* captchafile = fopen(captchapath,"r");
- if(captchafile == NULL){
- printf("%s%c%c\n","Content-Type:text/html;charset=iso-8859-1",13,10);
- printf("Captcha incorrect:No file found");
- return;
- }
- unsigned long inputhash = hash(captchadecoded);
- free(captchadecoded);
- unsigned long filehash = 0;
- fscanf(captchafile,"%lu",&filehash);
- if(filehash != inputhash){
- printf("%s%c%c\n","Content-Type:text/html;charset=iso-8859-1",13,10);
- printf("Captcha incorrect:Bad hash");
- return;
- }
-
- //If we had the correct captcha, remove it.
- char command[100];
- sprintf(command,"rm \"%s\"",captchapath);
- system(command);
-
- //Create new bug
- FILE* lastbugfile = fopen("../ws2a/bugs/lastbug","r+");
- if(lastbugfile == NULL){
- printf("Unable to open LastBugFile!");
- }
- unsigned long long lastbug = 0;
- fscanf(lastbugfile,"%llu",&lastbug);
- fseek(lastbugfile,0,SEEK_SET);
- lastbug++;
- fprintf(lastbugfile,"%llu",lastbug);
- fclose(lastbugfile);
-
- char* dname = replaceHTML(name);
- char* duid = useridhash(userid);
- time_t rawtime;
- struct tm * timeinfo;
- time(&rawtime);
- timeinfo = localtime(&rawtime);
- char* dshortd = replaceHTML(shortdesc);
- char* dlongd = replaceHTML(longdesc);
- printf("Location: ../ws2a/bugview.html?id=%s\n\n",lastbug);
- //printf("Right before printing to file\n");
- char newfilepath[100];
- sprintf(newfilepath,"../ws2a/bugs/%llu",lastbug);
- FILE* newfile = fopen(newfilepath,"w");
- fprintf(newfile,"%s\n%s\n%s%s\n0:\n%s\n",dname,duid,asctime(timeinfo),dshortd,dlongd);
- fclose(newfile);
- free(dname);
- free(duid);
- free(dshortd);
- free(dlongd);
-
- return 0;
-}
diff --git a/ws2a/nouns.txt b/ws2a/nouns.txt
deleted file mode 100644
index 672484c..0000000
--- a/ws2a/nouns.txt
+++ /dev/null
@@ -1,1525 +0,0 @@
-people
-history
-way
-art
-world
-information
-map
-two
-family
-government
-health
-system
-computer
-meat
-year
-thanks
-music
-person
-reading
-method
-data
-food
-understanding
-theory
-law
-bird
-literature
-problem
-software
-control
-knowledge
-power
-ability
-economics
-love
-internet
-television
-science
-library
-nature
-fact
-product
-idea
-temperature
-investment
-area
-society
-activity
-story
-industry
-media
-thing
-oven
-community
-definition
-safety
-quality
-development
-language
-management
-player
-variety
-video
-week
-security
-country
-exam
-movie
-organization
-equipment
-physics
-analysis
-policy
-series
-thought
-basis
-boyfriend
-direction
-strategy
-technology
-army
-camera
-freedom
-paper
-environment
-child
-instance
-month
-truth
-marketing
-university
-writing
-article
-department
-difference
-goal
-news
-audience
-fishing
-growth
-income
-marriage
-user
-combination
-failure
-meaning
-medicine
-philosophy
-teacher
-communication
-night
-chemistry
-disease
-disk
-energy
-nation
-road
-role
-soup
-advertising
-location
-success
-addition
-apartment
-education
-math
-moment
-painting
-politics
-attention
-decision
-event
-property
-shopping
-student
-wood
-competition
-distribution
-entertainment
-office
-population
-president
-unit
-category
-cigarette
-context
-introduction
-opportunity
-performance
-driver
-flight
-length
-magazine
-newspaper
-relationship
-teaching
-cell
-dealer
-finding
-lake
-member
-message
-phone
-scene
-appearance
-association
-concept
-customer
-death
-discussion
-housing
-inflation
-insurance
-mood
-woman
-advice
-blood
-effort
-expression
-importance
-opinion
-payment
-reality
-responsibility
-situation
-skill
-statement
-wealth
-application
-city
-county
-depth
-estate
-foundation
-grandmother
-heart
-perspective
-photo
-recipe
-studio
-topic
-collection
-depression
-imagination
-passion
-percentage
-resource
-setting
-ad
-agency
-college
-connection
-criticism
-debt
-description
-memory
-patience
-secretary
-solution
-administration
-aspect
-attitude
-director
-personality
-psychology
-recommendation
-response
-selection
-storage
-version
-alcohol
-argument
-complaint
-contract
-emphasis
-highway
-loss
-membership
-possession
-preparation
-steak
-union
-agreement
-cancer
-currency
-employment
-engineering
-entry
-interaction
-mixture
-preference
-region
-republic
-tradition
-virus
-actor
-classroom
-delivery
-device
-difficulty
-drama
-election
-engine
-football
-guidance
-hotel
-owner
-priority
-protection
-suggestion
-tension
-variation
-anxiety
-atmosphere
-awareness
-bath
-bread
-candidate
-climate
-comparison
-confusion
-construction
-elevator
-emotion
-employee
-employer
-guest
-height
-leadership
-mall
-manager
-operation
-recording
-sample
-transportation
-charity
-cousin
-disaster
-editor
-efficiency
-excitement
-extent
-feedback
-guitar
-homework
-leader
-mom
-outcome
-permission
-presentation
-promotion
-reflection
-refrigerator
-resolution
-revenue
-session
-singer
-tennis
-basket
-bonus
-cabinet
-childhood
-church
-clothes
-coffee
-dinner
-drawing
-hair
-hearing
-initiative
-judgment
-lab
-measurement
-mode
-mud
-orange
-poetry
-police
-possibility
-procedure
-queen
-ratio
-relation
-restaurant
-satisfaction
-sector
-signature
-significance
-song
-tooth
-town
-vehicle
-volume
-wife
-accident
-airport
-appointment
-arrival
-assumption
-baseball
-chapter
-committee
-conversation
-database
-enthusiasm
-error
-explanation
-farmer
-gate
-girl
-hall
-historian
-hospital
-injury
-instruction
-maintenance
-manufacturer
-meal
-perception
-pie
-poem
-presence
-proposal
-reception
-replacement
-revolution
-river
-son
-speech
-tea
-village
-warning
-winner
-worker
-writer
-assistance
-breath
-buyer
-chest
-chocolate
-conclusion
-contribution
-cookie
-courage
-dad
-desk
-drawer
-establishment
-examination
-garbage
-grocery
-honey
-impression
-improvement
-independence
-insect
-inspection
-inspector
-king
-ladder
-menu
-penalty
-piano
-potato
-profession
-professor
-quantity
-reaction
-requirement
-salad
-sister
-supermarket
-tongue
-weakness
-wedding
-affair
-ambition
-analyst
-apple
-assignment
-assistant
-bathroom
-bedroom
-beer
-birthday
-celebration
-championship
-cheek
-client
-consequence
-departure
-diamond
-dirt
-ear
-fortune
-friendship
-funeral
-gene
-girlfriend
-hat
-indication
-intention
-lady
-midnight
-negotiation
-obligation
-passenger
-pizza
-platform
-poet
-pollution
-recognition
-reputation
-shirt
-sir
-speaker
-stranger
-surgery
-sympathy
-tale
-throat
-trainer
-uncle
-youth
-time
-work
-film
-water
-money
-example
-while
-business
-study
-game
-life
-form
-air
-day
-place
-number
-part
-field
-fish
-back
-process
-heat
-hand
-experience
-job
-book
-end
-point
-type
-home
-economy
-value
-body
-market
-guide
-interest
-state
-radio
-course
-company
-price
-size
-card
-list
-mind
-trade
-line
-care
-group
-risk
-word
-fat
-force
-key
-light
-training
-name
-school
-top
-amount
-level
-order
-practice
-research
-sense
-service
-piece
-web
-boss
-sport
-fun
-house
-page
-term
-test
-answer
-sound
-focus
-matter
-kind
-soil
-board
-oil
-picture
-access
-garden
-range
-rate
-reason
-future
-site
-demand
-exercise
-image
-case
-cause
-coast
-action
-age
-bad
-boat
-record
-result
-section
-building
-mouse
-cash
-class
-nothing
-period
-plan
-store
-tax
-side
-subject
-space
-rule
-stock
-weather
-chance
-figure
-man
-model
-source
-beginning
-earth
-program
-chicken
-design
-feature
-head
-material
-purpose
-question
-rock
-salt
-act
-birth
-car
-dog
-object
-scale
-sun
-note
-profit
-rent
-speed
-style
-war
-bank
-craft
-half
-inside
-outside
-standard
-bus
-exchange
-eye
-fire
-position
-pressure
-stress
-advantage
-benefit
-box
-frame
-issue
-step
-cycle
-face
-item
-metal
-paint
-review
-room
-screen
-structure
-view
-account
-ball
-discipline
-medium
-share
-balance
-bit
-black
-bottom
-choice
-gift
-impact
-machine
-shape
-tool
-wind
-address
-average
-career
-culture
-morning
-pot
-sign
-table
-task
-condition
-contact
-credit
-egg
-hope
-ice
-network
-north
-square
-attempt
-date
-effect
-link
-post
-star
-voice
-capital
-challenge
-friend
-self
-shot
-brush
-couple
-debate
-exit
-front
-function
-lack
-living
-plant
-plastic
-spot
-summer
-taste
-theme
-track
-wing
-brain
-button
-click
-desire
-foot
-gas
-influence
-notice
-rain
-wall
-base
-damage
-distance
-feeling
-pair
-savings
-staff
-sugar
-target
-text
-animal
-author
-budget
-discount
-file
-ground
-lesson
-minute
-officer
-phase
-reference
-register
-sky
-stage
-stick
-title
-trouble
-bowl
-bridge
-campaign
-character
-club
-edge
-evidence
-fan
-letter
-lock
-maximum
-novel
-option
-pack
-park
-plenty
-quarter
-skin
-sort
-weight
-baby
-background
-carry
-dish
-factor
-fruit
-glass
-joint
-master
-muscle
-red
-strength
-traffic
-trip
-vegetable
-appeal
-chart
-gear
-ideal
-kitchen
-land
-log
-mother
-net
-party
-principle
-relative
-sale
-season
-signal
-spirit
-street
-tree
-wave
-belt
-bench
-commission
-copy
-drop
-minimum
-path
-progress
-project
-sea
-south
-status
-stuff
-ticket
-tour
-angle
-blue
-breakfast
-confidence
-daughter
-degree
-doctor
-dot
-dream
-duty
-essay
-father
-fee
-finance
-hour
-juice
-limit
-luck
-milk
-mouth
-peace
-pipe
-seat
-stable
-storm
-substance
-team
-trick
-afternoon
-bat
-beach
-blank
-catch
-chain
-consideration
-cream
-crew
-detail
-gold
-interview
-kid
-mark
-match
-mission
-pain
-pleasure
-score
-screw
-sex
-shop
-shower
-suit
-tone
-window
-agent
-band
-block
-bone
-calendar
-cap
-coat
-contest
-corner
-court
-cup
-district
-door
-east
-finger
-garage
-guarantee
-hole
-hook
-implement
-layer
-lecture
-lie
-manner
-meeting
-nose
-parking
-partner
-profile
-respect
-rice
-routine
-schedule
-swimming
-telephone
-tip
-winter
-airline
-bag
-battle
-bed
-bill
-bother
-cake
-code
-curve
-designer
-dimension
-dress
-ease
-emergency
-evening
-extension
-farm
-fight
-gap
-grade
-holiday
-horror
-horse
-host
-husband
-loan
-mistake
-mountain
-nail
-noise
-occasion
-package
-patient
-pause
-phrase
-proof
-race
-relief
-sand
-sentence
-shoulder
-smoke
-stomach
-string
-tourist
-towel
-vacation
-west
-wheel
-wine
-arm
-aside
-associate
-bet
-blow
-border
-branch
-breast
-brother
-buddy
-bunch
-chip
-coach
-cross
-document
-draft
-dust
-expert
-floor
-god
-golf
-habit
-iron
-judge
-knife
-landscape
-league
-mail
-mess
-native
-opening
-parent
-pattern
-pin
-pool
-pound
-request
-salary
-shame
-shelter
-shoe
-silver
-tackle
-tank
-trust
-assist
-bake
-bar
-bell
-bike
-blame
-boy
-brick
-chair
-closet
-clue
-collar
-comment
-conference
-devil
-diet
-fear
-fuel
-glove
-jacket
-lunch
-monitor
-mortgage
-nurse
-pace
-panic
-peak
-plane
-reward
-row
-sandwich
-shock
-spite
-spray
-surprise
-till
-transition
-weekend
-welcome
-yard
-alarm
-bend
-bicycle
-bite
-blind
-bottle
-cable
-candle
-clerk
-cloud
-concert
-counter
-flower
-grandfather
-harm
-knee
-lawyer
-leather
-load
-mirror
-neck
-pension
-plate
-purple
-ruin
-ship
-skirt
-slice
-snow
-specialist
-stroke
-switch
-trash
-tune
-zone
-anger
-award
-bid
-bitter
-boot
-bug
-camp
-candy
-carpet
-cat
-champion
-channel
-clock
-comfort
-cow
-crack
-engineer
-entrance
-fault
-grass
-guy
-hell
-highlight
-incident
-island
-joke
-jury
-leg
-lip
-mate
-motor
-nerve
-passage
-pen
-pride
-priest
-prize
-promise
-resident
-resort
-ring
-roof
-rope
-sail
-scheme
-script
-sock
-station
-toe
-tower
-truck
-witness
-a
-you
-it
-can
-will
-if
-one
-many
-most
-other
-use
-make
-good
-look
-help
-go
-great
-being
-few
-might
-still
-public
-read
-keep
-start
-give
-human
-local
-general
-she
-specific
-long
-play
-feel
-high
-tonight
-put
-common
-set
-change
-simple
-past
-big
-possible
-particular
-today
-major
-personal
-current
-national
-cut
-natural
-physical
-show
-try
-check
-second
-call
-move
-pay
-let
-increase
-single
-individual
-turn
-ask
-buy
-guard
-hold
-main
-offer
-potential
-professional
-international
-travel
-cook
-alternative
-following
-special
-working
-whole
-dance
-excuse
-cold
-commercial
-low
-purchase
-deal
-primary
-worth
-fall
-necessary
-positive
-produce
-search
-present
-spend
-talk
-creative
-tell
-cost
-drive
-green
-support
-glad
-remove
-return
-run
-complex
-due
-effective
-middle
-regular
-reserve
-independent
-leave
-original
-reach
-rest
-serve
-watch
-beautiful
-charge
-active
-break
-negative
-safe
-stay
-visit
-visual
-affect
-cover
-report
-rise
-walk
-white
-beyond
-junior
-pick
-unique
-anything
-classic
-final
-lift
-mix
-private
-stop
-teach
-western
-concern
-familiar
-fly
-official
-broad
-comfortable
-gain
-maybe
-rich
-save
-stand
-young
-fail
-heavy
-hello
-lead
-listen
-valuable
-worry
-handle
-leading
-meet
-release
-sell
-finish
-normal
-press
-ride
-secret
-spread
-spring
-tough
-wait
-brown
-deep
-display
-flow
-hit
-objective
-shoot
-touch
-cancel
-chemical
-cry
-dump
-extreme
-push
-conflict
-eat
-fill
-formal
-jump
-kick
-opposite
-pass
-pitch
-remote
-total
-treat
-vast
-abuse
-beat
-burn
-deposit
-print
-raise
-sleep
-somewhere
-advance
-anywhere
-consist
-dark
-double
-draw
-equal
-fix
-hire
-internal
-join
-kill
-sensitive
-tap
-win
-attack
-claim
-constant
-drag
-drink
-guess
-minor
-pull
-raw
-soft
-solid
-wear
-weird
-wonder
-annual
-count
-dead
-doubt
-feed
-forever
-impress
-nobody
-repeat
-round
-sing
-slide
-strip
-whereas
-wish
-combine
-command
-dig
-divide
-equivalent
-hang
-hunt
-initial
-march
-mention
-smell
-spiritual
-survey
-tie
-adult
-brief
-crazy
-escape
-gather
-hate
-prior
-repair
-rough
-sad
-scratch
-sick
-strike
-employ
-external
-hurt
-illegal
-laugh
-lay
-mobile
-nasty
-ordinary
-respond
-royal
-senior
-split
-strain
-struggle
-swim
-train
-upper
-wash
-yellow
-convert
-crash
-dependent
-fold
-funny
-grab
-hide
-miss
-permit
-quote
-recover
-resolve
-roll
-sink
-slip
-spare
-suspect
-sweet
-swing
-twist
-upstairs
-usual
-abroad
-brave
-calm
-concentrate
-estimate
-grand
-male
-mine
-prompt
-quiet
-refuse
-regret
-reveal
-rush
-shake
-shift
-shine
-steal
-suck
-surround
-anybody
-bear
-brilliant
-dare
-dear
-delay
-drunk
-female
-hurry
-inevitable
-invite
-kiss
-neat
-pop
-punch
-quit
-reply
-representative
-resist
-rip
-rub
-silly
-smile
-spell
-stretch
-stupid
-tear
-temporary
-tomorrow
-wake
-wrap
-yesterday
diff --git a/ws2a/showbug.c b/ws2a/showbug.c
deleted file mode 100644
index 27a01e6..0000000
--- a/ws2a/showbug.c
+++ /dev/null
@@ -1,51 +0,0 @@
-#include <stdio.h>
-#include <string.h>
-#include <stdlib.h>
-#include <stdint.h>
-
-int main(){
- char* data = getenv("QUERY_STRING");
- //char data[20] = "?id=1";
- char* hardip = getenv("REMOTE_ADDR");
- printf("%s%c%c\n",
- "Content-Type:text/html;charset=iso-8859-1",13,10);
- FILE* lastfilenum;
- lastfilenum = fopen("../ws2a/bugs/lastbug","r");
- if(lastfilenum == NULL){
- printf("Error reteriveing bugs, contact the admin!");
- return 1;
- }
- long long last = 0;
- if(fscanf(lastfilenum,"%lld",&last) < 1){
- printf("Error finding file id");
- return 1;
- }
- fclose(lastfilenum);
- long long thisid = 0;
- sscanf(data,"id=%lld",&thisid);
- if(thisid > last){
- printf("Invalid!");
- return 1;
- }
-
- char filestring[64] = "../ws2a/bugs/";
- char filename[10];
- sprintf(filename,"%lld",thisid);
- strcat(filestring,filename);
- FILE* bugfile;
- bugfile = fopen(filestring,"r");
- if(bugfile == NULL){
- printf("Unable to open bug file!");
- return 1;
- }
- while(!feof(bugfile)){
- char c = fgetc(bugfile);
- if(feof(bugfile)){
- break;
- }else{
- putchar(c);
- }
- }
- fclose(bugfile);
- return 0;
-}
diff --git a/ws2a/test.txt b/ws2a/test.txt
deleted file mode 100755
index e69de29..0000000
--- a/ws2a/test.txt
+++ /dev/null
diff --git a/ws2a/testcaptcha.png b/ws2a/testcaptcha.png
deleted file mode 100644
index 7e08ff3..0000000
--- a/ws2a/testcaptcha.png
+++ /dev/null
Binary files differ
diff --git a/ws2a/testhtmlreplace.c b/ws2a/testhtmlreplace.c
deleted file mode 100644
index 2106185..0000000
--- a/ws2a/testhtmlreplace.c
+++ /dev/null
@@ -1,108 +0,0 @@
-#include <stdio.h>
-#include <string.h>
-#include <stdlib.h>
-#include <stdint.h>
-
-char* replaceHTML(char* str){
- //printf("Replaceing:%s\n",str);
- char* nstr = malloc((sizeof(char)*strlen(str)) + 1);
- if(nstr == NULL){
- printf("%s%c%c\n","Content-Type:text/html;charset=iso-8859-1",13,10);
- printf("Failed to allocate memory!\n");
- }
-
- int strp = 0;
- int nstrp = 0;
- while(str[strp] != '\0'){
- //printf("Strp=%d nstrp=%d\n",strp,nstrp);
- if(str[strp] == '+'){
- nstr[nstrp] = ' ';
- strp++;
- nstrp++;
- }else if(str[strp] == '%'){
- //printf("Hit encodeing!\n");
- int hex = 0;
- sscanf(str+strp,"%%%2x",&hex);
- //printf("Was:%c(%d)\n",(char)hex,hex);
- if(hex == 0x0D){
- strp+=3;
- continue;
- }
- if(hex == 0x0A){
- nstr[nstrp] = '\\';
- nstr[nstrp+1] = 'n';
- nstrp+=2;
- strp+=3;
- continue;
- }
- nstr[nstrp] = (char)hex;
- nstrp++;
- strp+=3;
- }else if(str[strp] == '\n'){
- nstr[nstrp] = '\\';
- nstr[nstrp+1] = 'n';
- nstrp+=2;
- strp++;
- }else{
- nstr[nstrp] = str[strp];
- nstrp++;
- strp++;
- }
- }
- nstr[nstrp] = '\0';
- //printf("Done, str is now:%s\n",nstr);
- return nstr;
-}
-
-char* useridhash(char* str){
- char* hash = calloc(sizeof(char)*20,sizeof(char));
- int i = (int)str[0];
- int len = strlen(str);
- int tloop = i*20;
- unsigned int hashp = 0;
- unsigned int strp = 0;
- i = 0;
- while(i < tloop){
- printf("i:%d hashp:%u strp:%u tloop:%d\n",i,hashp,strp,tloop);
- char tchar = str[strp%len];
- hash[hashp%20] += str[strp%len];
- str[strp%len]+=1;
- hashp+=(int)tchar;
- strp+=(int)(hashp*hashp);
- i++;
- }
- i = 0;
- printf("Before characterizeing the hash, it was: %s\n",hash);
- while(i < 20){
- //printf("Normalizeing %c(%u) as %c(%u)\n",hash[i],(unsigned int)hash[i],(hash[i] % 92) + 32,(hash[i] % 92) + 32);
- unsigned int hashnum = hash[i];
- unsigned int modedhashnum = hashnum % 92;
- //printf("hashnum was %u, after mod it is:%u\n",hashnum,modedhashnum);
- hash[i] = modedhashnum + 32;
- i++;
- }
- printf("Resulting hash was:%s\n",hash);
- return hash;
-}
-
-int main(){
- char teststring[] = "Test";
- printf("Original:%s\n",teststring);
- char* parsed = useridhash(teststring);
- printf("%s\n",parsed);
-/*
- char teststring2[] = "Tost";
- printf("Original:%s\n",teststring2);
- char* parsed2 = useridhash(teststring2);
- printf("%s\n",parsed2);
-
- char teststring3[] = "This%0D%0AIs%0D%0AAnother%0D%0AMulti%0D%0ALine%0D%0AComment";
- printf("Original:%s\n",teststring3);
- char* parsed3 = useridhash(teststring3);
- printf("%s\n",parsed3);
- free(parsed);
- free(parsed2);
- free(parsed3);
- return 0;
-*/
-}
diff --git a/ws2a/writetest.c b/ws2a/writetest.c
deleted file mode 100644
index ccb5a61..0000000
--- a/ws2a/writetest.c
+++ /dev/null
@@ -1,10 +0,0 @@
-#include <stdio.h>
-
-int main(){
- FILE* tofile;
- tofile = fopen("../test.txt","w");
- fprintf(tofile,"This is some text");
- fclose(tofile);
- printf("%s%c%c\n","Content-Type:text/html;charset=iso-8859-1",13,10);
- printf("Completed without error!");
-}