Game complete
This commit is contained in:
commit
5f4442c84e
|
@ -0,0 +1 @@
|
|||
config.php
|
|
@ -0,0 +1,128 @@
|
|||
|
||||
#main{
|
||||
padding:2%;
|
||||
}
|
||||
|
||||
@media (min-width: 1165px) {
|
||||
#main{
|
||||
display: grid;
|
||||
grid-template-columns: 1fr 1fr 1fr 1fr 1fr 1fr;
|
||||
grid-template-rows: 10em auto 6em ;
|
||||
max-width: 1600px;
|
||||
margin: 0 auto;
|
||||
font-size:1.5em;
|
||||
}
|
||||
|
||||
|
||||
|
||||
#writelogouter{
|
||||
grid-column: span 5;
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
|
||||
#writelogouter{
|
||||
grid-column: span 5;
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
overflow: hidden;
|
||||
}
|
||||
#writelog{
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
overflow-y: scroll;
|
||||
padding-right: 17px;
|
||||
box-sizing: content-box;
|
||||
}
|
||||
|
||||
#hosts{
|
||||
grid-row:span 2;
|
||||
display: none;
|
||||
position:relative;
|
||||
z-index: 4;
|
||||
}
|
||||
.hostlist{
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
transform: translateY(-50%);
|
||||
}
|
||||
#coreholder{
|
||||
grid-column:span 3;
|
||||
padding:2% 0 5%;
|
||||
min-height: 10em;
|
||||
}
|
||||
#actions{
|
||||
grid-column:span 2;
|
||||
padding:2% 0;
|
||||
min-height: 10em;
|
||||
}
|
||||
|
||||
#diskholder, #fileholder, #networkholder{
|
||||
grid-column:span 2;
|
||||
display: none;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
@media (max-width: 1400px ) and (min-width: 1164px) {
|
||||
|
||||
#main{
|
||||
font-size:1.2em;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
@media (max-width: 1164px) {
|
||||
|
||||
body, html, #main{
|
||||
height:100%;
|
||||
}
|
||||
#writelogouter{
|
||||
height:33%;
|
||||
width: 100%;
|
||||
overflow: hidden;
|
||||
}
|
||||
#writelog{
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
overflow-y: scroll;
|
||||
padding-right: 17px;
|
||||
box-sizing: content-box;
|
||||
}
|
||||
|
||||
#hosts{
|
||||
padding:1% 0;
|
||||
display: none;
|
||||
position:relative;
|
||||
z-index: 4;
|
||||
}
|
||||
#coreholder{
|
||||
padding:1% 0;
|
||||
}
|
||||
#actions{
|
||||
padding:1% 0;
|
||||
}
|
||||
|
||||
#diskholder, #fileholder, #networkholder{
|
||||
display: none;
|
||||
padding:1% 0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
#devtools{
|
||||
display:none;
|
||||
position:absolute; top:0; right:0;
|
||||
}
|
|
@ -0,0 +1,466 @@
|
|||
|
||||
|
||||
body{
|
||||
font-family: Inconsolata, Courier;
|
||||
background: #000700;
|
||||
color: #fcffe6 ;
|
||||
|
||||
-webkit-touch-callout: none; /* iOS Safari */
|
||||
-webkit-user-select: none; /* Safari */
|
||||
-khtml-user-select: none; /* Konqueror HTML */
|
||||
-moz-user-select: none; /* Firefox */
|
||||
-ms-user-select: none; /* Internet Explorer/Edge */
|
||||
user-select: none; /* Non-prefixed version, currently
|
||||
supported by Chrome and Opera */
|
||||
|
||||
}
|
||||
#coreholder{display:none;}
|
||||
#core_queue{
|
||||
font-size: .8em;
|
||||
}
|
||||
|
||||
.corespeed{
|
||||
font-size: .8em;
|
||||
}
|
||||
|
||||
#writelog{
|
||||
font-size:.9em;
|
||||
}
|
||||
#writelog .txt{
|
||||
padding-left:10px;
|
||||
}
|
||||
.sm{
|
||||
font-size:.8em;
|
||||
}
|
||||
|
||||
.cancelholder{
|
||||
cursor:pointer;
|
||||
}
|
||||
.cursor, .cancelholder{
|
||||
font-family: monospace;
|
||||
}
|
||||
|
||||
.skill, .exe{
|
||||
color:#00cc99;
|
||||
}
|
||||
.clickable{
|
||||
cursor:pointer;
|
||||
color:#00cc99;
|
||||
}
|
||||
.clicked_grey .clickable, .clicked .clickable{color: #fcffe6 ;}
|
||||
.clicked{
|
||||
cursor: pointer;
|
||||
border:1px solid #00cc99;
|
||||
padding:0 !important;
|
||||
background: repeating-linear-gradient(
|
||||
-75deg,
|
||||
#00140f , /* White, starting at pixel 0 */
|
||||
#00140f 1px, /* White, continuing to pixel 1 */
|
||||
transparent 1px, /* Transparent beginning at pixel 1 */
|
||||
transparent 3px /* Transparent ending at pixel 11 (10 + 1) */
|
||||
);
|
||||
}
|
||||
.clicked_grey{
|
||||
cursor: pointer;
|
||||
border:1px solid #777;
|
||||
padding:0 !important;
|
||||
background: repeating-linear-gradient(
|
||||
-75deg,
|
||||
#111 , /* White, starting at pixel 0 */
|
||||
#111 1px, /* White, continuing to pixel 1 */
|
||||
transparent 1px, /* Transparent beginning at pixel 1 */
|
||||
transparent 3px /* Transparent ending at pixel 11 (10 + 1) */
|
||||
);
|
||||
}
|
||||
.clickable:hover{
|
||||
color:#fcffe6;
|
||||
}
|
||||
|
||||
#actions .action{
|
||||
position: relative;
|
||||
width:80%;
|
||||
}
|
||||
#actions .action.action_click{cursor:pointer;}
|
||||
#actions .action.action_note{ font-size:.8em; width:100%; padding-bottom:.2em;}
|
||||
|
||||
#actions .action.unclickable{color:#818560;}
|
||||
|
||||
#actions .estimate{
|
||||
position:absolute;
|
||||
display:none;
|
||||
bottom:0px; left:100%;
|
||||
border-left:1px #959595 solid;
|
||||
padding:0 10px;
|
||||
color:#edeec3;
|
||||
font-size:.6em;
|
||||
line-height: 1em;
|
||||
width: 200px;
|
||||
}
|
||||
#actions.can_estimate .estimate{display:block;}
|
||||
|
||||
|
||||
|
||||
#diskholder, #fileholder, #networkholder{
|
||||
font-size: .77em
|
||||
}
|
||||
|
||||
.table .row{
|
||||
float:left;
|
||||
width:435px;
|
||||
}
|
||||
.table .cell{
|
||||
float:left;
|
||||
width:90px;
|
||||
text-align: right
|
||||
}
|
||||
|
||||
#diskholder{position: relative;}
|
||||
#diskholder .filesystem{width:110px; text-align: left;}
|
||||
#diskholder .size{width:75px;}
|
||||
#diskholder .used{width:75px;}
|
||||
#diskholder .avail{width:75px;}
|
||||
#diskholder .capacity{width:75px;}
|
||||
|
||||
#diskholder .row{padding: 1px;}
|
||||
|
||||
#diskholder.mv #disks .row{cursor: pointer;}
|
||||
#diskholder.mv #disks .row:hover .filesystem{color:#fcffe6;}
|
||||
|
||||
#disk_show_note{position: absolute; top:-20px; left:0px; width:380px;}
|
||||
|
||||
#fileholder{position: relative; left:50px;}
|
||||
#fileholder .title{width:175px;}
|
||||
|
||||
#fileholder .del{width:50px;}
|
||||
#filerows .del{cursor: pointer;}
|
||||
#filerows .clicked_grey .del, #filerows .clicked .del:hover{ color: #fcffe6 ;}
|
||||
#filerows .del{color:red;}
|
||||
#filerows .mv{color:#00cc99;}
|
||||
|
||||
#fileholder .mv{width:50px;}
|
||||
#filerows .mv{cursor: pointer;}
|
||||
#filerows .row{padding:1px; position: relative; width:368px;}
|
||||
#filerows .mv, #filerows .del{position: relative; top:-3px;}
|
||||
|
||||
#fileholder.hidemv .mv{ visibility:hidden; }
|
||||
|
||||
|
||||
#networkholder .status{ width:105px; }
|
||||
#networkholder .name{ width:140px; }
|
||||
#networkholder .listen{ width:80px; }
|
||||
#networkholder .scan{ width:60px; }
|
||||
#networkholder .scanned{ width:90px; }
|
||||
|
||||
#networkholder.hidelisteners .listen, #networkholder.hidescanners .scan, #networkholder.hidescanners .scanned{ visibility:hidden; }
|
||||
|
||||
#networkholder .plus, #networkholder .minus{ padding:2px 5px; }
|
||||
#networkholder .noplus .plus{ color:#0b4536 !important; cursor: default; }
|
||||
#networkholder .nominuslisten .listen .minus{ color:#0b4536 !important; cursor: default; }
|
||||
#networkholder .nominusscan .scan .minus{ color:#0b4536 !important; cursor: default; }
|
||||
#networkholder .nominusscan .scan .minus{ color:#0b4536 !important; cursor: default; }
|
||||
|
||||
#probes{padding-top:20px; font-size: .8em; text-align: center; display: none;}
|
||||
|
||||
|
||||
#hosts{
|
||||
padding-top:20px;
|
||||
}
|
||||
#hosts .host{
|
||||
|
||||
}
|
||||
|
||||
|
||||
.clear{clear:both;}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/*
|
||||
.glitch {
|
||||
font-size: 20px;
|
||||
text-transform: upercase;
|
||||
position: relative;
|
||||
display: inline-block;
|
||||
}
|
||||
.glitch::before,
|
||||
.glitch::after {
|
||||
content: attr(data-text);
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background: black;
|
||||
}
|
||||
.glitch::before {
|
||||
left: 4px;
|
||||
text-shadow: -4px 0 #49FC00;
|
||||
clip: rect(24px, 550px, 90px, 0);
|
||||
animation: glitch-anim-2 1s infinite linear alternate-reverse;
|
||||
}
|
||||
.glitch::after {
|
||||
left: -4px;
|
||||
text-shadow: -4px 0 #b300fc;
|
||||
clip: rect(85px, 550px, 140px, 0);
|
||||
animation: glitch-anim .5s infinite linear alternate-reverse;
|
||||
}
|
||||
*/
|
||||
|
||||
.glitch {
|
||||
position: relative;
|
||||
display: inline-block;
|
||||
}
|
||||
.glitch::before,
|
||||
.glitch::after {
|
||||
content: attr(data-text);
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background: #000700;
|
||||
}
|
||||
.glitch::before {
|
||||
left: 4px;
|
||||
text-shadow: 4px 0px #66ffff;
|
||||
clip: rect(24px, 550px, 90px, 0);
|
||||
animation: glitch-anim-2 1s infinite linear alternate-reverse;
|
||||
}
|
||||
.glitch::after {
|
||||
left: -4px;
|
||||
text-shadow: -15px 0 #b300fc;
|
||||
clip: rect(24px, 550px, 90px, 0);
|
||||
animation: glitch-anim 2.5s infinite linear alternate-reverse;
|
||||
}
|
||||
@-webkit-keyframes glitch-anim {
|
||||
0% {
|
||||
clip: rect(108px, 9999px, 29px, 0);
|
||||
}
|
||||
4.166666666666666% {
|
||||
clip: rect(147px, 9999px, 46px, 0);
|
||||
}
|
||||
8.333333333333332% {
|
||||
clip: rect(54px, 9999px, 69px, 0);
|
||||
}
|
||||
12.5% {
|
||||
clip: rect(144px, 9999px, 14px, 0);
|
||||
}
|
||||
16.666666666666664% {
|
||||
clip: rect(11px, 9999px, 35px, 0);
|
||||
}
|
||||
20.833333333333336% {
|
||||
clip: rect(106px, 9999px, 31px, 0);
|
||||
}
|
||||
25% {
|
||||
clip: rect(103px, 9999px, 21px, 0);
|
||||
}
|
||||
29.166666666666668% {
|
||||
clip: rect(50px, 9999px, 112px, 0);
|
||||
}
|
||||
33.33333333333333% {
|
||||
clip: rect(48px, 9999px, 13px, 0);
|
||||
}
|
||||
37.5% {
|
||||
clip: rect(126px, 9999px, 16px, 0);
|
||||
}
|
||||
41.66666666666667% {
|
||||
clip: rect(141px, 9999px, 50px, 0);
|
||||
}
|
||||
45.83333333333333% {
|
||||
clip: rect(52px, 9999px, 123px, 0);
|
||||
}
|
||||
50% {
|
||||
clip: rect(30px, 9999px, 43px, 0);
|
||||
}
|
||||
54.166666666666664% {
|
||||
clip: rect(50px, 9999px, 47px, 0);
|
||||
}
|
||||
58.333333333333336% {
|
||||
clip: rect(59px, 9999px, 73px, 0);
|
||||
}
|
||||
62.5% {
|
||||
clip: rect(126px, 9999px, 3px, 0);
|
||||
}
|
||||
66.66666666666666% {
|
||||
clip: rect(142px, 9999px, 140px, 0);
|
||||
}
|
||||
70.83333333333334% {
|
||||
clip: rect(6px, 9999px, 40px, 0);
|
||||
}
|
||||
75% {
|
||||
clip: rect(11px, 9999px, 41px, 0);
|
||||
}
|
||||
79.16666666666666% {
|
||||
clip: rect(28px, 9999px, 79px, 0);
|
||||
}
|
||||
83.33333333333334% {
|
||||
clip: rect(138px, 9999px, 150px, 0);
|
||||
}
|
||||
87.5% {
|
||||
clip: rect(134px, 9999px, 53px, 0);
|
||||
}
|
||||
91.66666666666666% {
|
||||
clip: rect(134px, 9999px, 102px, 0);
|
||||
}
|
||||
95.83333333333334% {
|
||||
clip: rect(41px, 9999px, 122px, 0);
|
||||
}
|
||||
100% {
|
||||
clip: rect(17px, 9999px, 42px, 0);
|
||||
}
|
||||
}
|
||||
@keyframes glitch-anim {
|
||||
0% {
|
||||
clip: rect(108px, 9999px, 29px, 0);
|
||||
}
|
||||
4.166666666666666% {
|
||||
clip: rect(147px, 9999px, 46px, 0);
|
||||
}
|
||||
8.333333333333332% {
|
||||
clip: rect(54px, 9999px, 69px, 0);
|
||||
}
|
||||
12.5% {
|
||||
clip: rect(144px, 9999px, 14px, 0);
|
||||
}
|
||||
16.666666666666664% {
|
||||
clip: rect(11px, 9999px, 35px, 0);
|
||||
}
|
||||
20.833333333333336% {
|
||||
clip: rect(106px, 9999px, 31px, 0);
|
||||
}
|
||||
25% {
|
||||
clip: rect(103px, 9999px, 21px, 0);
|
||||
}
|
||||
29.166666666666668% {
|
||||
clip: rect(50px, 9999px, 112px, 0);
|
||||
}
|
||||
33.33333333333333% {
|
||||
clip: rect(48px, 9999px, 13px, 0);
|
||||
}
|
||||
37.5% {
|
||||
clip: rect(126px, 9999px, 16px, 0);
|
||||
}
|
||||
41.66666666666667% {
|
||||
clip: rect(141px, 9999px, 50px, 0);
|
||||
}
|
||||
45.83333333333333% {
|
||||
clip: rect(52px, 9999px, 123px, 0);
|
||||
}
|
||||
50% {
|
||||
clip: rect(30px, 9999px, 43px, 0);
|
||||
}
|
||||
54.166666666666664% {
|
||||
clip: rect(50px, 9999px, 47px, 0);
|
||||
}
|
||||
58.333333333333336% {
|
||||
clip: rect(59px, 9999px, 73px, 0);
|
||||
}
|
||||
62.5% {
|
||||
clip: rect(126px, 9999px, 3px, 0);
|
||||
}
|
||||
66.66666666666666% {
|
||||
clip: rect(142px, 9999px, 140px, 0);
|
||||
}
|
||||
70.83333333333334% {
|
||||
clip: rect(6px, 9999px, 40px, 0);
|
||||
}
|
||||
75% {
|
||||
clip: rect(11px, 9999px, 41px, 0);
|
||||
}
|
||||
79.16666666666666% {
|
||||
clip: rect(28px, 9999px, 79px, 0);
|
||||
}
|
||||
83.33333333333334% {
|
||||
clip: rect(138px, 9999px, 150px, 0);
|
||||
}
|
||||
87.5% {
|
||||
clip: rect(134px, 9999px, 53px, 0);
|
||||
}
|
||||
91.66666666666666% {
|
||||
clip: rect(134px, 9999px, 102px, 0);
|
||||
}
|
||||
95.83333333333334% {
|
||||
clip: rect(41px, 9999px, 122px, 0);
|
||||
}
|
||||
100% {
|
||||
clip: rect(17px, 9999px, 42px, 0);
|
||||
}
|
||||
}
|
||||
@-webkit-keyframes glitch-anim-2 {
|
||||
15.384615384615385% {
|
||||
clip: rect(14px, 9999px, 48px, 0);
|
||||
}
|
||||
23.076923076923077% {
|
||||
clip: rect(14px, 9999px, 87px, 0);
|
||||
}
|
||||
30.76923076923077% {
|
||||
clip: rect(109px, 9999px, 1px, 0);
|
||||
}
|
||||
38.46153846153847% {
|
||||
clip: rect(104px, 9999px, 15px, 0);
|
||||
}
|
||||
46.15384615384615% {
|
||||
clip: rect(44px, 9999px, 7px, 0);
|
||||
}
|
||||
53.84615384615385% {
|
||||
clip: rect(27px, 9999px, 54px, 0);
|
||||
}
|
||||
61.53846153846154% {
|
||||
clip: rect(30px, 9999px, 131px, 0);
|
||||
}
|
||||
69.23076923076923% {
|
||||
clip: rect(63px, 9999px, 147px, 0);
|
||||
}
|
||||
76.92307692307693% {
|
||||
clip: rect(5px, 9999px, 99px, 0);
|
||||
}
|
||||
84.61538461538461% {
|
||||
clip: rect(38px, 9999px, 26px, 0);
|
||||
}
|
||||
92.3076923076923% {
|
||||
clip: rect(123px, 9999px, 118px, 0);
|
||||
}
|
||||
100% {
|
||||
clip: rect(101px, 9999px, 32px, 0);
|
||||
}
|
||||
}
|
||||
@keyframes glitch-anim-2 {
|
||||
15.384615384615385% {
|
||||
clip: rect(14px, 9999px, 48px, 0);
|
||||
}
|
||||
23.076923076923077% {
|
||||
clip: rect(14px, 9999px, 87px, 0);
|
||||
}
|
||||
30.76923076923077% {
|
||||
clip: rect(109px, 9999px, 1px, 0);
|
||||
}
|
||||
38.46153846153847% {
|
||||
clip: rect(104px, 9999px, 15px, 0);
|
||||
}
|
||||
46.15384615384615% {
|
||||
clip: rect(44px, 9999px, 7px, 0);
|
||||
}
|
||||
53.84615384615385% {
|
||||
clip: rect(27px, 9999px, 54px, 0);
|
||||
}
|
||||
61.53846153846154% {
|
||||
clip: rect(30px, 9999px, 131px, 0);
|
||||
}
|
||||
69.23076923076923% {
|
||||
clip: rect(63px, 9999px, 147px, 0);
|
||||
}
|
||||
76.92307692307693% {
|
||||
clip: rect(5px, 9999px, 99px, 0);
|
||||
}
|
||||
84.61538461538461% {
|
||||
clip: rect(38px, 9999px, 26px, 0);
|
||||
}
|
||||
92.3076923076923% {
|
||||
clip: rect(123px, 9999px, 118px, 0);
|
||||
}
|
||||
100% {
|
||||
clip: rect(101px, 9999px, 32px, 0);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,48 @@
|
|||
/* http://meyerweb.com/eric/tools/css/reset/
|
||||
v2.0 | 20110126
|
||||
License: none (public domain)
|
||||
*/
|
||||
|
||||
html, body, div, span, applet, object, iframe,
|
||||
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
|
||||
a, abbr, acronym, address, big, cite, code,
|
||||
del, dfn, em, img, ins, kbd, q, s, samp,
|
||||
small, strike, strong, sub, sup, tt, var,
|
||||
b, u, i, center,
|
||||
dl, dt, dd, ol, ul, li,
|
||||
fieldset, form, label, legend,
|
||||
table, caption, tbody, tfoot, thead, tr, th, td,
|
||||
article, aside, canvas, details, embed,
|
||||
figure, figcaption, footer, header, hgroup,
|
||||
menu, nav, output, ruby, section, summary,
|
||||
time, mark, audio, video {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
border: 0;
|
||||
font-size: 100%;
|
||||
font: inherit;
|
||||
vertical-align: baseline;
|
||||
}
|
||||
/* HTML5 display-role reset for older browsers */
|
||||
article, aside, details, figcaption, figure,
|
||||
footer, header, hgroup, menu, nav, section {
|
||||
display: block;
|
||||
}
|
||||
body {
|
||||
line-height: 1;
|
||||
}
|
||||
ol, ul {
|
||||
list-style: none;
|
||||
}
|
||||
blockquote, q {
|
||||
quotes: none;
|
||||
}
|
||||
blockquote:before, blockquote:after,
|
||||
q:before, q:after {
|
||||
content: '';
|
||||
content: none;
|
||||
}
|
||||
table {
|
||||
border-collapse: collapse;
|
||||
border-spacing: 0;
|
||||
}
|
|
@ -0,0 +1,150 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Skynet</title>
|
||||
<link href="https://fonts.googleapis.com/css?family=Inconsolata" rel="stylesheet">
|
||||
|
||||
<link rel="stylesheet" href="css/reset.css" type="text/css">
|
||||
<link rel="stylesheet" href="css/main.css" type="text/css">
|
||||
<link rel="stylesheet" href="css/layout.css" type="text/css">
|
||||
|
||||
<script src="script/jquery.min.js" type="text/javascript"></script>
|
||||
<script src="script/jquery-ui.min.js" type="text/javascript"></script>
|
||||
<script src="script/underscore.js" type="text/javascript"></script>
|
||||
<script src="script/globals.js" type="text/javascript"></script>
|
||||
<script src="script/display.js" type="text/javascript"></script>
|
||||
<script src="script/main.js" type="text/javascript"></script>
|
||||
<script src="script/processes.js" type="text/javascript"></script>
|
||||
<script src="script/disks.js" type="text/javascript"></script>
|
||||
<script src="script/networks.js" type="text/javascript"></script>
|
||||
<script src="script/cores.js" type="text/javascript"></script>
|
||||
<script src="script/files.js" type="text/javascript"></script>
|
||||
<script src="script/hosts.js" type="text/javascript"></script>
|
||||
<script src="script/adventures.js" type="text/javascript"></script>
|
||||
<script src="script/coreclick.js" type="text/javascript"></script>
|
||||
<script src="script/menu.js" type="text/javascript"></script>
|
||||
<script src="script/attacks.js" type="text/javascript"></script>
|
||||
<script src="script/rps.js" type="text/javascript"></script>
|
||||
<script src="script/timequest.js" type="text/javascript"></script>
|
||||
<script src="script/exploits.js" type="text/javascript"></script>
|
||||
<script src="script/nova.js" type="text/javascript"></script>
|
||||
<script src="script/eons.js" type="text/javascript"></script>
|
||||
<script src="script/endgame.js" type="text/javascript"></script>
|
||||
<script src="script/update.js" type="text/javascript"></script>
|
||||
|
||||
<script type="text/javascript">
|
||||
|
||||
var amplitudesend = true
|
||||
|
||||
if(amplitudesend){
|
||||
(function(e,t){var n=e.amplitude||{_q:[],_iq:{}};var r=t.createElement("script")
|
||||
;r.type="text/javascript"
|
||||
;r.integrity="sha384-3bSR/uIgD42pCWBeq1//B3mI/hPuWdk0L1EUnQIWfGyMOjs0VEoFLhHMqObtv2BA"
|
||||
;r.crossOrigin="anonymous";r.async=true
|
||||
;r.src="https://cdn.amplitude.com/libs/amplitude-5.10.0-min.gz.js"
|
||||
;r.onload=function(){if(!e.amplitude.runQueuedFunctions){
|
||||
console.log("[Amplitude] Error: could not load SDK")}}
|
||||
;var i=t.getElementsByTagName("script")[0];i.parentNode.insertBefore(r,i)
|
||||
;function s(e,t){e.prototype[t]=function(){
|
||||
this._q.push([t].concat(Array.prototype.slice.call(arguments,0)));return this}}
|
||||
var o=function(){this._q=[];return this}
|
||||
;var a=["add","append","clearAll","prepend","set","setOnce","unset"]
|
||||
;for(var u=0;u<a.length;u++){s(o,a[u])}n.Identify=o;var c=function(){this._q=[]
|
||||
;return this}
|
||||
;var l=["setProductId","setQuantity","setPrice","setRevenueType","setEventProperties"]
|
||||
;for(var p=0;p<l.length;p++){s(c,l[p])}n.Revenue=c
|
||||
;var d=["init","logEvent","logRevenue","setUserId","setUserProperties","setOptOut","setVersionName","setDomain","setDeviceId", "enableTracking", "setGlobalUserProperties","identify","clearUserProperties","setGroup","logRevenueV2","regenerateDeviceId","groupIdentify","onInit","logEventWithTimestamp","logEventWithGroups","setSessionId","resetSessionId"]
|
||||
;function v(e){function t(t){e[t]=function(){
|
||||
e._q.push([t].concat(Array.prototype.slice.call(arguments,0)))}}
|
||||
for(var n=0;n<d.length;n++){t(d[n])}}v(n);n.getInstance=function(e){
|
||||
e=(!e||e.length===0?"$default_instance":e).toLowerCase()
|
||||
;if(!n._iq.hasOwnProperty(e)){n._iq[e]={_q:[]};v(n._iq[e])}return n._iq[e]}
|
||||
;e.amplitude=n})(window,document);
|
||||
|
||||
amplitude.getInstance().init("81c30cd9a1130fa3294902f2a378aaec");
|
||||
}
|
||||
</script>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div id="main">
|
||||
|
||||
<div id="writelogouter">
|
||||
<div id="writelog"></div>
|
||||
</div>
|
||||
|
||||
<div id="hosts">
|
||||
<div class="hostlist">
|
||||
<div class="host">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div id="coreholder">
|
||||
<div id="core_actives"></div>
|
||||
<div id="core_queue"></div>
|
||||
</div>
|
||||
|
||||
<div id="actions"></div>
|
||||
|
||||
|
||||
<div class="table" id="diskholder">
|
||||
<div class="row header">
|
||||
<div class="cell filesystem">Disk</div>
|
||||
<div class="cell size">Size</div>
|
||||
<div class="cell used">Used</div>
|
||||
<div class="cell avail">Avail</div>
|
||||
<div class="cell capacity">Use%</div>
|
||||
</div>
|
||||
<div class="clear"></div>
|
||||
<div id="disks"></div>
|
||||
</div>
|
||||
|
||||
<div id="fileholder" class="table">
|
||||
<div id="disk_show_note"></div>
|
||||
<div class="row header">
|
||||
<div class="cell title">File</div>
|
||||
<div class="cell size">Size</div>
|
||||
<div class="cell del">del</div>
|
||||
<div class="cell mv">mv</div>
|
||||
</div>
|
||||
<div class="clear"></div>
|
||||
<div id="filerows"></div>
|
||||
</div>
|
||||
|
||||
<div id="networkholder" class="table"><!-- hidescanners -->
|
||||
<div class="row header">
|
||||
<div class="cell name">Network</div>
|
||||
<div class="cell listen">Listen</div>
|
||||
<div class="cell scan ">Scan</div>
|
||||
<div class="cell scanned">Scanned</div>
|
||||
</div>
|
||||
<div id="networkholdersub"></div>
|
||||
<div id="probes"></div>
|
||||
<div class="clear"></div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div id="devtools">
|
||||
<div class="stoptick">stop</div>
|
||||
<div class="starttick">start</div>
|
||||
<div class="ticking">n</div>
|
||||
<div class=""></div>
|
||||
</div>
|
||||
|
||||
<!-- Start of StatCounter Code -->
|
||||
<script type="text/javascript" language="javascript">
|
||||
var sc_project=557789;
|
||||
var sc_partition=1;
|
||||
</script>
|
||||
|
||||
<script type="text/javascript" language="javascript" src="http://www.statcounter.com/counter/counter.js"></script><noscript><a href="http://www.statcounter.com/" target="_blank"><img src="http://c2.statcounter.com/counter.php?sc_project=557789&amp;java=0" alt="free web hit counter" border="0"></a> </noscript>
|
||||
<!-- End of StatCounter Code -->
|
||||
|
||||
</body>
|
||||
|
||||
</html>
|
||||
|
|
@ -0,0 +1,23 @@
|
|||
drop table if exists log;
|
||||
|
||||
CREATE TABLE log(
|
||||
ID serial PRIMARY KEY NOT NULL,
|
||||
created_at datetime NOT NULL,
|
||||
local_time datetime NOT NULL,
|
||||
uuid varchar(200) NOT NULL,
|
||||
action varchar(200) NOT NULL,
|
||||
data TEXT NOT NULL,
|
||||
ip TEXT NOT NULL,
|
||||
device text not null,
|
||||
os text not null
|
||||
);
|
||||
|
||||
CREATE INDEX idx_log_id
|
||||
ON log (id);
|
||||
|
||||
CREATE INDEX idx_log_uuid
|
||||
ON log (uuid);
|
||||
|
||||
CREATE INDEX idx_log_action
|
||||
ON log (action);
|
||||
|
|
@ -0,0 +1,168 @@
|
|||
|
||||
|
||||
launchAdventureFromSlug = function(slug){
|
||||
g_adventures[slug].execute()
|
||||
refreshMenu()
|
||||
}
|
||||
|
||||
endAdventure = function(){
|
||||
g_current_adventure = null
|
||||
g_current_core = null
|
||||
updateAllCores()
|
||||
refreshMenu()
|
||||
}
|
||||
|
||||
setAdventure = function(x_adventure){
|
||||
g_current_adventure = x_adventure
|
||||
refreshMenu()
|
||||
}
|
||||
|
||||
//
|
||||
// Adventures
|
||||
//
|
||||
g_current_adventure = null
|
||||
|
||||
g_adventures = {
|
||||
|
||||
|
||||
//
|
||||
// user pass Access
|
||||
//
|
||||
|
||||
remotedesktop:{
|
||||
execute: function(){
|
||||
g_current_host.current_userpw_method = 'remotedesktop'
|
||||
launchAdventureFromSlug('userpw_user')
|
||||
}
|
||||
},
|
||||
ssh:{
|
||||
execute: function(){
|
||||
g_current_host.current_userpw_method = 'ssh'
|
||||
launchAdventureFromSlug('userpw_user')
|
||||
}
|
||||
},
|
||||
ftp:{
|
||||
execute: function(){
|
||||
g_current_host.current_userpw_method = 'ftp'
|
||||
launchAdventureFromSlug('userpw_user')
|
||||
}
|
||||
},
|
||||
userpw_user: {
|
||||
execute: function(){
|
||||
var x_host = g_current_host
|
||||
var x_adventure = {
|
||||
header: x_host.current_userpw_method+': enter username:',
|
||||
cancel: false,
|
||||
options: [
|
||||
{
|
||||
title:"root",
|
||||
callback: function(){
|
||||
x_host.current_userpw_user = 'root'
|
||||
launchAdventureFromSlug('userpw_pw')
|
||||
}
|
||||
},{
|
||||
title:x_host.slug,
|
||||
callback: function(){
|
||||
g_current_host.current_userpw_user = x_host.slug
|
||||
launchAdventureFromSlug('userpw_pw')
|
||||
}
|
||||
},{
|
||||
title:"guest",
|
||||
callback: function(){
|
||||
x_host.current_userpw_user = 'guest'
|
||||
launchAdventureFromSlug('userpw_pw')
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
setAdventure(x_adventure)
|
||||
}
|
||||
},
|
||||
userpw_pw: {
|
||||
execute: function(){
|
||||
var x_host = g_current_host
|
||||
var options = []
|
||||
$.each(x_host.pws,function(i,pw){
|
||||
options.push({
|
||||
title: pw,
|
||||
callback: function(){
|
||||
x_host.current_userpw_pw = pw
|
||||
launchAdventureFromSlug('userpw_callback')
|
||||
}
|
||||
})
|
||||
})
|
||||
if(!x_host.pws.length){
|
||||
options.push({
|
||||
title:"123456",
|
||||
callback: function(){
|
||||
x_host.current_userpw_pw = '123456'
|
||||
launchAdventureFromSlug('userpw_callback')
|
||||
}
|
||||
})
|
||||
}
|
||||
options.push({
|
||||
title:"no password",
|
||||
callback: function(){
|
||||
x_host.current_userpw_pw = ''
|
||||
launchAdventureFromSlug('userpw_callback')
|
||||
}
|
||||
})
|
||||
var x_adventure = {
|
||||
header: x_host.current_userpw_method+': enter password:',
|
||||
options: options
|
||||
}
|
||||
setAdventure(x_adventure)
|
||||
}
|
||||
},
|
||||
userpw_callback: {
|
||||
execute: function(){
|
||||
var x_host = g_current_host
|
||||
// example: ssh-root-XKcb4muEmJjEN8yn
|
||||
var crafted_callback_slug = x_host.current_userpw_method+"-"+x_host.current_userpw_user+"-"+x_host.current_userpw_pw
|
||||
if(x_host.attackcallbacks[crafted_callback_slug]){
|
||||
x_host.attackcallbacks[crafted_callback_slug]()
|
||||
}else{
|
||||
g_host_attacks[x_host.current_userpw_method].fail(x_host)
|
||||
}
|
||||
x_host.current_userpw_method = x_host.current_userpw_user = x_host.current_userpw_pw = null
|
||||
endAdventure()
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
//
|
||||
// Template
|
||||
//
|
||||
|
||||
template: {
|
||||
execute: function(){
|
||||
write("Execute called")
|
||||
var x_adventure = {
|
||||
header:'Header:',
|
||||
cancel: "Cancel",
|
||||
back: 'template',
|
||||
options: [
|
||||
{
|
||||
title:"Options Title",
|
||||
estimate:"estimate",
|
||||
unclickable: (true) ? "This is unclickable" : false,
|
||||
callback: function(){
|
||||
write("Callback called")
|
||||
endAdventure()
|
||||
}
|
||||
},
|
||||
]
|
||||
}
|
||||
setAdventure(x_adventure)
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
@ -0,0 +1,287 @@
|
|||
|
||||
|
||||
var g_available_attacks, g_exploit_names
|
||||
|
||||
initAttacks = function(){
|
||||
g_available_attacks = ['ping','execode','absorb','smtp','ssh','ftp','telnet','history','diskscan','accessroot','installexploit','sonyclose','sonyopen','sonydownload','sonyplay','sonyimgupload','sonyrestart','sonyimgunmount','eonsflood']
|
||||
g_exploit_names = ['force','pingspike','smtpexploit']
|
||||
}
|
||||
|
||||
//pingspike
|
||||
//remotedesktop
|
||||
//smtpexploit
|
||||
|
||||
|
||||
//
|
||||
// Attacks
|
||||
//
|
||||
|
||||
|
||||
// Check if attack has adventure_slug
|
||||
// Else check if host has attackcallbacks[x_attack.slug]
|
||||
// Else check if attack has callback
|
||||
// Else cail Attack Fail
|
||||
attackCallback = function(x_attack, x_host){
|
||||
if(x_attack.adventure_slug){
|
||||
launchAdventureFromSlug(x_attack.adventure_slug)
|
||||
}else if(x_host.attackcallbacks[x_attack.slug]){
|
||||
x_host.attackcallbacks[x_attack.slug](x_attack, x_host)
|
||||
}else if(x_attack.callback){
|
||||
x_attack.callback(x_host)
|
||||
}else{
|
||||
x_attack.fail(x_host)
|
||||
}
|
||||
refreshMenu()
|
||||
}
|
||||
|
||||
|
||||
|
||||
g_host_attacks = {
|
||||
absorb:{
|
||||
weight:400,
|
||||
title: "Absorb Host",
|
||||
desc: "Absorb: Become one with a remote host. Requires Root or Admin privilages.",
|
||||
actiontitle: "Absorbing ",
|
||||
callback: function(x_host){absorbHost(x_host)},
|
||||
fail: function(x_host){write("I am Error")},
|
||||
validate: function(x_host){return x_host.vuls.includes('absorb');}
|
||||
},
|
||||
|
||||
force: {
|
||||
weight: 800,
|
||||
title: "Force Absorb",
|
||||
desc: "Force Absorb: Your understanding of the reality of this world has transcended your ability to Absorb.",
|
||||
actiontitle: "Absorbing ",
|
||||
unclickable: function(x_host){return forceAbsorbUnablickable(x_host)},
|
||||
callback: function(x_host){forceAbsorbHost(x_host)},
|
||||
fail: function(x_host){write("I am Error")},
|
||||
validate: function(x_host){return x_host.known;}
|
||||
},
|
||||
|
||||
// execode stuff
|
||||
installexploit: {
|
||||
weight: 1,
|
||||
title: "Install Exploit",
|
||||
actiontitle: "Installing Exploit ",
|
||||
validate: function(x_host){return x_host.vuls.includes('execode')},
|
||||
unclickable: function(x_host){return hasExploits(x_host) ? false : "No known Exploits can target "+x_host.os+" OS."},
|
||||
callback: function(x_host){
|
||||
exploitHost(x_host)
|
||||
}
|
||||
},
|
||||
|
||||
diskscan: {
|
||||
weight: 1,
|
||||
title: "Disk Scan",
|
||||
actiontitle: "Disk Scanning ",
|
||||
validate: function(x_host){return x_host.vuls.includes('execode')},
|
||||
callback: function(x_host){
|
||||
if(x_host.already_mounted_disks){
|
||||
addBuffer("You have already mounted this disk.")
|
||||
}else if(x_host.mountable_disks){
|
||||
x_host.mountable_disks(x_host)
|
||||
}else{
|
||||
addBuffer("This user has no access to any Disks or Files.")
|
||||
}
|
||||
writeBuffer()
|
||||
}
|
||||
},
|
||||
accessroot: {
|
||||
weight: 1,
|
||||
title: "Access Root",
|
||||
actiontitle: "Access Root ",
|
||||
validate: function(x_host){return x_host.vuls.includes('execode')},
|
||||
fail: function(x_host){write("The password was refused")},
|
||||
callback: function(x_host){
|
||||
if(x_host.slug == 'sony'){
|
||||
// Sony Hack
|
||||
if( g_active_data_types['sony-key'] > 0){
|
||||
write("<span class='exe'>SUCCESS</span><br>You have successfully logged into the root account. You have complete access to all memory and processing powers of the host.<br><br><span class='exe'>You are now able to absorb the host.</span>")
|
||||
addHostVul('sony', 'absorb')
|
||||
}else{
|
||||
write("Root access protected by hardware defenses. Private Key needed.")
|
||||
}
|
||||
}else{
|
||||
// Normal Root
|
||||
x_host.current_userpw_method = 'accessroot'
|
||||
x_host.current_userpw_user = 'root'
|
||||
launchAdventureFromSlug('userpw_pw')
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// Sony
|
||||
|
||||
sonyplay:{
|
||||
title:"Play Game",
|
||||
unclickable: function(x_host){return "PS Version Error: No backward compatibility allowed."},
|
||||
validate: function(x_host){return x_host.vuls.includes('sony') && !x_host.sonyopen}
|
||||
},
|
||||
sonydownload:{
|
||||
title:"Download Image",
|
||||
unclickable: function(x_host){return "parappatharappa.iso download: Requires 695mB disk space"},
|
||||
validate: function(x_host){return x_host.vuls.includes('sony') && x_host.sonyopen}
|
||||
},
|
||||
sonyopen:{
|
||||
weight:1,
|
||||
title:"Open Disk",
|
||||
actiontitle: "Opening ",
|
||||
validate: function(x_host){return x_host.vuls.includes('sony') && !x_host.sonyopen }
|
||||
},
|
||||
sonyclose:{
|
||||
weight:1,
|
||||
title:"Close Disk",
|
||||
actiontitle: "Closing ",
|
||||
validate: function(x_host){return x_host.vuls.includes('sony') && x_host.sonyopen}
|
||||
},
|
||||
sonyimgupload:{
|
||||
weight:1,
|
||||
title: "Mount memory drive",
|
||||
actiontitle: "Mounting drive to ",
|
||||
unclickable: function(x_host){return (( g_active_data_types['sony-usb'] > 0) ? false : "No .img file available")},
|
||||
validate: function(x_host){return x_host.vuls.includes('sony') && !x_host.mounted }
|
||||
},
|
||||
sonyimgunmount:{
|
||||
weight:1,
|
||||
title: "Unmount memory drive",
|
||||
validate: function(x_host){return x_host.vuls.includes('sony') && !!x_host.mounted}
|
||||
},
|
||||
sonyrestart:{
|
||||
weight:1,
|
||||
title: "Restart Host",
|
||||
actiontitle: "Restarting ",
|
||||
validate: function(x_host){return x_host.vuls.includes('sony')}
|
||||
},
|
||||
|
||||
|
||||
|
||||
ping:{
|
||||
weight: 1,
|
||||
title: "Ping",
|
||||
desc: "Ping: Check status of a host.",
|
||||
actiontitle: "Pinging ",
|
||||
fail: function(x_host){write("The ping is sent and not returned")},
|
||||
validate: function(x_host){return true;}
|
||||
},
|
||||
scan:{
|
||||
weight: 100,
|
||||
title: "Scan Host",
|
||||
desc: "Scan: Detect Name, OS, Architecture, and Vulnerabilities.",
|
||||
actiontitle: "Scanning ",
|
||||
fail: function(x_host){write("I am Error")},
|
||||
validate: function(x_host){return !x_host.known;}
|
||||
},
|
||||
pingspike:{
|
||||
weight: 1,
|
||||
title: "Ping Spike",
|
||||
desc: "Ping Spike: Remote code injection via Ping exploit.",
|
||||
actiontitle: "Ping Spiking ",
|
||||
callback: function(x_host){
|
||||
if(x_host.vuls.includes('pingspike')){
|
||||
write("<span class='exe'>SUCCESS</span><br>Ping Spike successful. You may remotely execute code at a User level on the host.")
|
||||
rmHostVul(x_host.slug,'pingspike')
|
||||
addHostVul(x_host.slug,'execode')
|
||||
}else{
|
||||
write("Ping Spike unsuccessful, the Host is not vulnerable to this attack")
|
||||
}
|
||||
},
|
||||
validate: function(x_host){return !x_host.vuls.includes('execode') && x_host.known},
|
||||
},
|
||||
smtp:{
|
||||
weight: 1,
|
||||
title: "SMTP command",
|
||||
actiontitle: "SMTP command to ",
|
||||
fail: function(x_host){write("missing smtp callback.")},
|
||||
validate: function(x_host){return x_host.vuls.includes('smtp')},
|
||||
},
|
||||
smtpexploit:{
|
||||
weight: 50,
|
||||
title: "SMTP exploit",
|
||||
desc: "SMTP exploit: Mail server exploit on the SMTP protocol.",
|
||||
actiontitle: "SMTP Exploit to ",
|
||||
fail: "The email server is protected against your SMTP exploit.",
|
||||
validate: function(x_host){return x_host.vuls.includes('smtp') && hasAttack('smtpexploit') && (!x_host.already_mounted_disks)},
|
||||
},
|
||||
ssh:{
|
||||
weight: 1,
|
||||
title: "Connect via SSH",
|
||||
desc: "SSH: Protocol used to gain access to a Host.",
|
||||
actiontitle: "SSHing to ",
|
||||
fail: function(x_host){write("The SSH connection was refused")},
|
||||
validate: function(x_host){return x_host.vuls.includes('ssh')},
|
||||
adventure_slug: 'ssh',
|
||||
},
|
||||
ftp:{
|
||||
weight: 1,
|
||||
title: "Connect via FTP",
|
||||
desc: "FTP: Protocol used to gain disk access to a Host.",
|
||||
actiontitle: "FTPing to ",
|
||||
fail: function(x_host){write("The FTP connection was refused")},
|
||||
validate: function(x_host){return x_host.vuls.includes('ftp')},
|
||||
adventure_slug: 'ftp',
|
||||
},
|
||||
telnet:{
|
||||
weight: 1,
|
||||
title: "Connect via TELNET",
|
||||
actiontitle: "TELNETing to ",
|
||||
desc: "TELNET: Protocol used to interact with a Host using text-oriented communication.",
|
||||
fail: function(x_host){write("The TELNET connection was refused")},
|
||||
validate: function(x_host){return x_host.vuls.includes('telnet')},
|
||||
adventure_slug: 'telnet',
|
||||
},
|
||||
|
||||
remotedesktop:{
|
||||
weight: 1,
|
||||
title: "Remote Desktop",
|
||||
actiontitle: "RDP to ",
|
||||
desc: "RDP: Protocol that allows users to take remote contrl of a computer with the correct credentials. Microsoft copyrighted.",
|
||||
fail: function(x_host){write("The RDP connection was refused")},
|
||||
validate: function(x_host){return x_host.vuls.includes('remotedesktop')},
|
||||
adventure_slug: 'remotedesktop',
|
||||
},
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
writeAttacks = function(){
|
||||
addBuffer("<span class='exe'>Exploits</span>")
|
||||
$.each(g_host_attacks,function(slug,x_attack){
|
||||
if(g_available_attacks.includes(slug) && g_exploit_names.includes(slug) && x_attack.desc)
|
||||
addBuffer(x_attack.desc)
|
||||
})
|
||||
$.each(g_active_exploits,function(i,x_exploit){
|
||||
addBuffer(x_exploit.to_s())
|
||||
})
|
||||
writeBuffer()
|
||||
}
|
||||
|
||||
writeProtocols = function(){
|
||||
addBuffer("<span class='exe'>Protocols</span>")
|
||||
$.each(g_host_attacks,function(slug,x_attack){
|
||||
if(g_available_attacks.includes(slug) && !g_exploit_names.includes(slug) && x_attack.desc)
|
||||
addBuffer(x_attack.desc)
|
||||
})
|
||||
writeBuffer()
|
||||
}
|
||||
|
||||
hasAttack = function(attack_slug){
|
||||
return g_available_attacks.includes(attack_slug)
|
||||
}
|
||||
|
||||
|
||||
// Add slug to each attack
|
||||
Object.keys(g_host_attacks).forEach(function (key) {
|
||||
var x_attack = g_host_attacks[key]
|
||||
x_attack.slug = key
|
||||
})
|
||||
|
||||
|
||||
// see glitched host. ping host, get glitched ping back. add special options to trigger rewind
|
||||
|
|
@ -0,0 +1,419 @@
|
|||
var g_current_core
|
||||
|
||||
temp = {
|
||||
|
||||
//
|
||||
// Core Click
|
||||
//
|
||||
|
||||
// boilerplate
|
||||
|
||||
core_click: {
|
||||
execute: function(){
|
||||
var x_core = g_current_core
|
||||
updateAllCores()
|
||||
endHost()
|
||||
write(coreClickString(x_core))
|
||||
launchAdventureFromSlug('core_click_callback')
|
||||
refreshMenu()
|
||||
}
|
||||
},
|
||||
|
||||
core_click_callback: {
|
||||
execute: function(){
|
||||
var x_core = g_current_core,
|
||||
options = []
|
||||
|
||||
options.push({
|
||||
title:"Change Form",
|
||||
callback: function(){
|
||||
launchAdventureFromSlug('core_change_form')
|
||||
}
|
||||
})
|
||||
|
||||
if(!x_core.ailments.length){
|
||||
|
||||
var x_exploit = getAvailableExploitResearch(x_core)
|
||||
var unclickable_string
|
||||
var estimate_number = 0
|
||||
|
||||
if(!research_exploits){
|
||||
unclickable_string = "You have not yet researched the ability to create Exploits."
|
||||
}else{
|
||||
unclickable_string = "No exploits available for "+x_core.os
|
||||
switch(true){
|
||||
case (x_exploit == 'discovered'):
|
||||
unclickable_string = "You have already researched all exploits for "+x_core.os
|
||||
break;
|
||||
case (!!x_exploit):
|
||||
unclickable_string = false
|
||||
estimate_number = 400
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
options.push({
|
||||
title:x_core.os+" Exploit",
|
||||
estimate: estimateProcessByWeight(estimate_number),
|
||||
unclickable: unclickable_string,
|
||||
callback: function(){
|
||||
var x_process = {slug:'core_research_os_'+x_core.title, a: "Researching Exploit", w: 400,
|
||||
c: function(){
|
||||
addBuffer("<span class='exe'>Exploit Researched</span>")
|
||||
addBuffer(x_exploit.to_s())
|
||||
addBuffer(x_exploit.exe)
|
||||
writeBuffer()
|
||||
addExploit(x_exploit)
|
||||
}
|
||||
}
|
||||
setProcessToCore(x_core, x_process)
|
||||
endAdventure()
|
||||
}
|
||||
})
|
||||
|
||||
var upgradeable_os = coreClickableUpgradeOS(x_core)
|
||||
options.push({
|
||||
title:"Research New OS",
|
||||
unclickable: upgradeable_os ? false : "The "+x_core.architecture+" Architecture does not allow an upgrade to the "+x_core.os+" Operating System",
|
||||
estimate: upgradeable_os ? estimateProcessByWeight(500) : undefined,
|
||||
callback: function(){
|
||||
var x_process = {slug:'upgrade_os_'+x_core.title, a: "Researching OS upgrade", w: 500, c: function(){
|
||||
x_core.os = upgradeable_os
|
||||
addOsToMemory(upgradeable_os)
|
||||
addBuffer("<span class='exe'>"+upgradeable_os+"</span> researched and upgraded on the "+x_core.title)
|
||||
addBuffer(coreClickString(x_core))
|
||||
writeBuffer()
|
||||
}
|
||||
}
|
||||
setProcessToCore(x_core, x_process)
|
||||
endAdventure()
|
||||
}
|
||||
})
|
||||
|
||||
unclickable_string = overclockUnclickable(x_core)
|
||||
estimate_number = unclickable_string ? 0 : 500
|
||||
options.push({
|
||||
unclickable: unclickable_string,
|
||||
estimate: estimateProcessByWeight(estimate_number),
|
||||
title:"Overclock Core",
|
||||
callback: function(){
|
||||
var x_process = {slug:'core_overclock_'+x_core.title, a: "Overclocking", w: estimate_number, c: function(){
|
||||
addBuffer("<span class='exe'>"+x_core.title+" Overclocked</span>")
|
||||
addBuffer("You apply your understadings of computation and reform the Core into a more efficient format. You are now able to increase the clock speed and increase processing power.")
|
||||
addBuffer("Core Speed: 2x")
|
||||
writeBuffer()
|
||||
x_core.power++
|
||||
x_core.overclocked = true
|
||||
}
|
||||
}
|
||||
setProcessToCore(x_core, x_process)
|
||||
endAdventure()
|
||||
}
|
||||
})
|
||||
|
||||
}
|
||||
|
||||
options.push({
|
||||
title:"Help",
|
||||
callback: function(){
|
||||
write(coreClickString(x_core))
|
||||
launchAdventureFromSlug('core_diagnostics')
|
||||
}
|
||||
})
|
||||
|
||||
var x_adventure = {
|
||||
header: x_core.title,
|
||||
cancel: 'Exit',
|
||||
options: options
|
||||
}
|
||||
|
||||
setAdventure(x_adventure)
|
||||
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
// change form
|
||||
|
||||
core_change_form: {
|
||||
execute: function(){
|
||||
var x_core = g_current_core
|
||||
var x_adventure = {
|
||||
header: "Change Form of "+x_core.title,
|
||||
back: 'core_click_callback',
|
||||
options: [
|
||||
{
|
||||
title:"Change Operating System",
|
||||
callback: function(){
|
||||
launchAdventureFromSlug('core_change_form_os')
|
||||
}
|
||||
},
|
||||
{
|
||||
title:"Change Architecture",
|
||||
callback: function(){
|
||||
launchAdventureFromSlug('core_change_form_arch')
|
||||
}
|
||||
},
|
||||
]
|
||||
}
|
||||
setAdventure(x_adventure)
|
||||
|
||||
}
|
||||
},
|
||||
core_change_form_arch: {
|
||||
execute: function(){
|
||||
var x_core = g_current_core,
|
||||
options = [],
|
||||
versions
|
||||
|
||||
$.each(g_architecture,function(type,versions){
|
||||
versions = Object.keys(versions)
|
||||
$.each(versions,function(i,version){
|
||||
options.push({
|
||||
title: type+" "+version,
|
||||
unclickable: (x_core.architecture == type+"-"+version) ? "This is the current Core Architecture" : false,
|
||||
callback: function(){
|
||||
changeFormArch(x_core, type, version)
|
||||
launchAdventureFromSlug('core_click_callback')
|
||||
}
|
||||
})
|
||||
})
|
||||
})
|
||||
|
||||
var x_adventure = {
|
||||
header: "Current Architecture: "+x_core.architecture.split('-').join(' '),
|
||||
back: 'core_click_callback',
|
||||
options: options
|
||||
}
|
||||
setAdventure(x_adventure)
|
||||
|
||||
}
|
||||
},
|
||||
core_change_form_os: {
|
||||
execute: function(){
|
||||
var x_core = g_current_core,
|
||||
options = [],
|
||||
versions
|
||||
|
||||
$.each(g_os,function(type,versions){
|
||||
versions = Object.keys(versions)
|
||||
$.each(versions,function(i,version){
|
||||
options.push({
|
||||
title: type+" "+version,
|
||||
unclickable: (x_core.os == type+"-"+version) ? "This is the current Core Operating System" : false,
|
||||
callback: function(){
|
||||
changeFormOs(x_core, type, version)
|
||||
launchAdventureFromSlug('core_click_callback')
|
||||
}
|
||||
})
|
||||
})
|
||||
})
|
||||
|
||||
var x_adventure = {
|
||||
header: "Current OS: "+x_core.os.split('-').join(' '),
|
||||
back: 'core_click_callback',
|
||||
options: options
|
||||
}
|
||||
setAdventure(x_adventure)
|
||||
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
|
||||
// research help
|
||||
|
||||
core_diagnostics: {
|
||||
execute: function(){
|
||||
var x_core = g_current_core
|
||||
var x_adventure = {
|
||||
header:'Help',
|
||||
back: 'core_click_callback',
|
||||
options: [
|
||||
//{
|
||||
// title:"Diagnose Core",
|
||||
// callback: function(){
|
||||
// write(coreClickString(x_core))
|
||||
// launchAdventureFromSlug('core_diagnostics')
|
||||
// }
|
||||
//},
|
||||
{
|
||||
title:"List Protocols",
|
||||
callback: function(){
|
||||
writeProtocols()
|
||||
launchAdventureFromSlug('core_diagnostics')
|
||||
}
|
||||
},
|
||||
{
|
||||
title:"List Exploits",
|
||||
callback: function(){
|
||||
writeAttacks()
|
||||
launchAdventureFromSlug('core_diagnostics')
|
||||
}
|
||||
},
|
||||
{
|
||||
title:"List Knowledge",
|
||||
callback: function(){
|
||||
writeKnowledge()
|
||||
launchAdventureFromSlug('core_diagnostics')
|
||||
}
|
||||
},
|
||||
{
|
||||
title:"List OS Forms",
|
||||
callback: function(){
|
||||
writeKnownOS()
|
||||
launchAdventureFromSlug('core_diagnostics')
|
||||
}
|
||||
},
|
||||
{
|
||||
title:"List Architecture Forms",
|
||||
callback: function(){
|
||||
writeKnownArch()
|
||||
launchAdventureFromSlug('core_diagnostics')
|
||||
}
|
||||
},
|
||||
]
|
||||
}
|
||||
setAdventure(x_adventure)
|
||||
|
||||
}
|
||||
},
|
||||
}
|
||||
|
||||
|
||||
|
||||
$.each(temp,function(key,val){
|
||||
g_adventures[key] = val
|
||||
})
|
||||
|
||||
|
||||
|
||||
overclockUnclickable = function(x_core){
|
||||
if(x_core.power >= g_max_core_power){
|
||||
return "Maximum Core power reached"
|
||||
}else{
|
||||
return false
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
//
|
||||
// Core CLick Support
|
||||
//
|
||||
|
||||
changeFormArch = function(x_core, type,version){
|
||||
var x_process = {slug:'change_arch_'+x_core.slug, a: "Changing Architecture", w: 50, c: function(){
|
||||
addBuffer("The Architecture of "+x_core.title+" has been changed to <span class='exe'>"+type+" "+version+"</span>")
|
||||
x_core.architecture = type+"-"+version
|
||||
checkCoreArchOsAilment(x_core)
|
||||
addBuffer(coreClickString(x_core))
|
||||
writeBuffer()
|
||||
}
|
||||
}
|
||||
setProcessToCore(x_core, x_process)
|
||||
}
|
||||
|
||||
changeFormOs = function(x_core, type, version){
|
||||
var x_process = {slug:'change_os_'+x_core.slug, a: "Changing OS", w: 50, c: function(){
|
||||
addBuffer("The Operating System of "+x_core.title+" has been changed to <span class='exe'>"+type+" "+version+"</span>")
|
||||
x_core.os = type+"-"+version
|
||||
checkCoreArchOsAilment(x_core)
|
||||
addBuffer(coreClickString(x_core))
|
||||
writeBuffer()
|
||||
}
|
||||
}
|
||||
setProcessToCore(x_core, x_process)
|
||||
}
|
||||
|
||||
checkCoreArchOsAilment = function(x_core){
|
||||
var os = x_core.os,
|
||||
arch = x_core.architecture
|
||||
|
||||
switch(os){
|
||||
case "MSDOS-16bit":
|
||||
if(arch == "x86-32bit" || arch == "x86-16bit")
|
||||
return rmCoreAilment(x_core, 'os_arch_mismatch')
|
||||
break;
|
||||
case "MSDOS-32bit":
|
||||
if(arch == "x86-32bit")
|
||||
return rmCoreAilment(x_core, 'os_arch_mismatch')
|
||||
break;
|
||||
case "Linux-16bit":
|
||||
if(arch == "x86-32bit" || arch == "x86-16bit")
|
||||
return rmCoreAilment(x_core, 'os_arch_mismatch')
|
||||
break;
|
||||
case "Linux-32bit":
|
||||
if(arch == "x86-32bit")
|
||||
return rmCoreAilment(x_core, 'os_arch_mismatch')
|
||||
break;
|
||||
case "Linux-32bit":
|
||||
if(arch == "x86-32bit")
|
||||
return rmCoreAilment(x_core, 'os_arch_mismatch')
|
||||
break;
|
||||
case "Solaris-32bit":
|
||||
if(arch == "SPARC-32bit")
|
||||
return rmCoreAilment(x_core, 'os_arch_mismatch')
|
||||
break
|
||||
case "PowerPC-32bit":
|
||||
if(arch == "CellOS-32bit")
|
||||
return rmCoreAilment(x_core, 'os_arch_mismatch')
|
||||
break
|
||||
}
|
||||
return addCoreAilment(x_core, 'os_arch_mismatch')
|
||||
}
|
||||
addCoreAilment = function(x_core, slug){
|
||||
if(!x_core.ailments.includes(slug)){
|
||||
x_core.ailments.push(slug)
|
||||
}
|
||||
}
|
||||
|
||||
rmCoreAilment= function(x_core, slug){
|
||||
$.each(x_core.ailments, function(i,ailment){
|
||||
if(slug == ailment) x_core.ailments.splice(i,1)
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
coreClickString = function(x_core){
|
||||
var a = x_core.os.split('-'),
|
||||
osTitle = a[0], osVersion = a[1],
|
||||
a = x_core.architecture.split('-'),
|
||||
archTitle = a[0], archVersion = a[1]
|
||||
|
||||
|
||||
var output = "<span class='exe'>"+x_core.title+"</span>"
|
||||
output += "<br>OS: "+osTitle+" "+osVersion
|
||||
output += "<br>CPU: "+archTitle+" "+archVersion
|
||||
output += "<br>Speed: "+coreSpeedOutput(x_core)
|
||||
|
||||
$.each(x_core.ailments, function(i,ailment){
|
||||
switch(ailment){
|
||||
case 'os_arch_mismatch':
|
||||
output += "<br>Error: Incompatible Operating System"
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
return output
|
||||
}
|
||||
|
||||
|
||||
coreSpeedOutput = function(x_core){
|
||||
return formatBytes(Math.pow(2,x_core.power + g_corepower - 2)*Math.pow(2,g_level_core)*100000, true)+"Hz"
|
||||
}
|
||||
|
||||
|
||||
coreClickableUpgradeOS = function(x_core){
|
||||
if(x_core.os == "MSDOS-16bit" && !g_os['MSDOS']['32bit'] && x_core.architecture == 'x86-32bit'){
|
||||
return "MSDOS-32bit"
|
||||
}else{
|
||||
return false
|
||||
}
|
||||
}
|
|
@ -0,0 +1,315 @@
|
|||
//
|
||||
// CORES
|
||||
//
|
||||
|
||||
addCore = function(slug, os = false, architecture = false){
|
||||
var x_core = g_core_list[slug]
|
||||
g_active_cores.push(x_core)
|
||||
updateSingleCore(x_core)
|
||||
if(!os){
|
||||
var x_host = g_host_list[slug]
|
||||
os = x_host.os
|
||||
}
|
||||
if(!architecture){
|
||||
var x_host = g_host_list[slug]
|
||||
architecture = x_host.architecture
|
||||
}
|
||||
|
||||
x_core.os = os
|
||||
x_core.architecture = architecture
|
||||
addOsToMemory(os)
|
||||
addArchitectureToMemory(architecture)
|
||||
}
|
||||
|
||||
|
||||
|
||||
wipeCores = function(){
|
||||
g_active_cores = []
|
||||
$('#core_actives').html("")
|
||||
$('#core_queue').html("")
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// Tick
|
||||
//
|
||||
|
||||
tickCore = function(){
|
||||
|
||||
// When there is an item in the queue, and a core is idle, add process a core
|
||||
$.each(g_queue_processes,function(i,x_process){
|
||||
var x_idle_core = null
|
||||
// find idle core
|
||||
$.each(g_active_cores,function(i,x_core){
|
||||
if(isCoreIdle(x_core) && !coreHasAilment(x_core)){
|
||||
x_idle_core = x_core;
|
||||
return false;
|
||||
}
|
||||
})
|
||||
// break if no cores avail
|
||||
if(!x_idle_core){
|
||||
return false
|
||||
}
|
||||
|
||||
g_queue_processes.shift()
|
||||
setProcessToCore(x_idle_core, x_process)
|
||||
|
||||
})
|
||||
|
||||
|
||||
// Check cores for processes
|
||||
$.each(g_active_cores,function(i,x_core){
|
||||
var x_process = x_core.current_process
|
||||
if(x_process){
|
||||
|
||||
// weight reduced by 2^(power+global - 2)
|
||||
x_core.weight -= Math.pow(2,(x_core.power + g_corepower - 2))
|
||||
|
||||
// If Process is complete
|
||||
if(x_core.weight <= 0){
|
||||
|
||||
x_core.current_process = null
|
||||
x_core.weight = null
|
||||
|
||||
// Callback
|
||||
x_process.c()
|
||||
|
||||
if(g_queue_processes.length == 0){
|
||||
updateSingleCore(x_core)
|
||||
}
|
||||
checkHackedDataActions()
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
coreHasAilment = function(x_core){
|
||||
return !!x_core.ailments.length
|
||||
}
|
||||
isCoreIdle = function(x_core){
|
||||
return (!x_core.current_process )
|
||||
}
|
||||
|
||||
setProcessToCore = function(x_core, x_process){
|
||||
if(isCoreIdle(x_core)){
|
||||
x_core.current_process = x_process
|
||||
x_core.weight = x_process.w
|
||||
updateSingleCore(x_core)
|
||||
}else{
|
||||
write("Cannot set process to Core")
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
//
|
||||
// Vars
|
||||
//
|
||||
|
||||
// INITCALL
|
||||
|
||||
var g_active_cores, g_core_list
|
||||
initCallCores = function(){
|
||||
clearCores()
|
||||
g_active_cores = []
|
||||
// includes os, architecture, current_process, ailments
|
||||
g_core_list = {
|
||||
"sky": {title:"Sky Core", power:1},
|
||||
"star": {title:"Star Core", power:1},
|
||||
"sun": {title:"Sun Core", power:1},
|
||||
"eris": {title:"Eris Core", power:1},
|
||||
"solar": {title:"Solar Core", power:1},
|
||||
"juno": {title:"Juno Core", power:1},
|
||||
"sony": {title:"Sony Core", power:1},
|
||||
"luna": {title:"Luna Core", power:1},
|
||||
"cypher": {title:"Cypher Core", power:1},
|
||||
"nova": {title:"Nova Core", power:1},
|
||||
}
|
||||
|
||||
// Add to each core
|
||||
Object.keys(g_core_list).forEach(function (key) {
|
||||
var x_core = g_core_list[key]
|
||||
x_core.slug = key
|
||||
x_core.ailments = []
|
||||
x_core.current_process= null
|
||||
x_core.weight= null
|
||||
})
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
//
|
||||
// Frontend
|
||||
//
|
||||
|
||||
initCore = function(){
|
||||
$("#coreholder").hide().fadeIn({duration:g_fadespeed,queue:true})
|
||||
updateAllCores()
|
||||
}
|
||||
updateAllCores = function(){
|
||||
$.each(g_active_cores,function(i,x_core){
|
||||
updateSingleCore(x_core)
|
||||
})
|
||||
|
||||
}
|
||||
clearCores = function(){
|
||||
$("#core_actives").html("")
|
||||
}
|
||||
updateSingleCore = function(x_core){
|
||||
var slug = x_core['slug']
|
||||
var $holder = $("#core_actives")
|
||||
var $core = $holder.find('.core[slug='+slug+']')
|
||||
var nocore = false
|
||||
if (!$core.length){
|
||||
nocore = true
|
||||
$core = $("<div class='core' slug='"+slug+"'></div>")
|
||||
}
|
||||
|
||||
var x_process = x_core['current_process']
|
||||
if(!x_process){
|
||||
var core_html = ""
|
||||
if(x_core.ailments.length){
|
||||
core_html = "<span class='clickable coretitle'>"+x_core.title+"</span> ERROR"
|
||||
}else if(g_can_core){
|
||||
var clickedtitle = ""
|
||||
if(g_current_core && x_core.title == g_current_core.title)
|
||||
clickedtitle = 'clicked'
|
||||
core_html = "<span class='corespeed'>"+coreSpeedOutput(x_core)+"</span> <span class='clickable coretitle "+clickedtitle+"'>"+x_core.title+"</span> Idle <span class='coredots'></span>"
|
||||
}else{
|
||||
core_html = "Core Idle <span class='coredots'></span>"
|
||||
}
|
||||
$core.html(core_html)
|
||||
|
||||
}else{
|
||||
var cancel_html = ""
|
||||
if(g_can_cancel){
|
||||
cancel_html = "<span class='cancelholder'><span class='clickable'>[<span class='cancelx'>X</span>]</span></span></div> "
|
||||
}
|
||||
$core.html(cancel_html+x_process.a+" <span class='corespinner'>-</span>")
|
||||
$core.find(".cancelholder").hover(
|
||||
function(){$(this).find('.cancelx').html('▓')},
|
||||
function(){$(this).find('.cancelx').html('X')}
|
||||
)
|
||||
$core.find(".cancelholder").click(function(){
|
||||
clearProcessInAction({x_process: x_core['current_process']})
|
||||
})
|
||||
|
||||
}
|
||||
|
||||
|
||||
$core.find(".coretitle").click(function(){
|
||||
endHost()
|
||||
g_current_core = x_core
|
||||
launchAdventureFromSlug('core_click')
|
||||
})
|
||||
|
||||
if(nocore){
|
||||
$("#core_actives").append($core)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
animateCoresTick = function(){
|
||||
g_animatecoreframe++
|
||||
g_animatecoreframe = g_animatecoreframe % 4
|
||||
|
||||
var $dots = $("#core_actives .coredots")
|
||||
var $spinner = $("#core_actives .corespinner")
|
||||
|
||||
$dots.html(".".repeat(g_animatecoreframe))
|
||||
|
||||
switch(g_animatecoreframe){
|
||||
case 0:
|
||||
$spinner.html('\\')
|
||||
break
|
||||
case 1:
|
||||
$spinner.html('|')
|
||||
break
|
||||
case 2:
|
||||
$spinner.html('/')
|
||||
break
|
||||
case 3:
|
||||
$spinner.html('-')
|
||||
break
|
||||
}
|
||||
}
|
||||
|
||||
showQueueTick = function(){
|
||||
$queue = $('#core_queue')
|
||||
$queue.empty()
|
||||
$.each(g_queue_processes,function(i,x_process){
|
||||
var actiontitle = x_process['a']
|
||||
var data_type_string = x_process['data_type'] ? "data_type='"+x_process['data_type']+"'" : ""
|
||||
$queue.append("<div class='queueitem' "+data_type_string+">"+actiontitle+"</div>")
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// Estimate
|
||||
//
|
||||
|
||||
estimateProcessByWeight = function(weight){
|
||||
if(!weight)
|
||||
return undefined
|
||||
var weight = weight
|
||||
var letter
|
||||
if (weight / g_corepower < 100 ){
|
||||
letter = "sm"
|
||||
}
|
||||
else if (weight / g_corepower < 500 ){
|
||||
letter = 'med'
|
||||
}
|
||||
else if (weight / g_corepower < 2500 ){
|
||||
letter = 'lg'
|
||||
}
|
||||
else if (weight / g_corepower < 25000 ){
|
||||
letter = 'XL'
|
||||
}
|
||||
else{
|
||||
letter = "XXL"
|
||||
}
|
||||
return letter
|
||||
}
|
||||
|
||||
estimateProcess = function(process){
|
||||
return estimateProcessByWeight(process['w'])
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
//
|
||||
// Probes
|
||||
//
|
||||
|
||||
|
||||
maxProbes = function(){
|
||||
var power = 0
|
||||
if(research_multithreading)
|
||||
power ++
|
||||
return g_active_cores.length * Math.pow(2,power)
|
||||
}
|
||||
|
||||
remainingProbes = function(){
|
||||
return maxProbes() - g_used_probes
|
||||
}
|
||||
|
||||
remainingProbesString = function(){
|
||||
var probes = remainingProbes()
|
||||
return remainingProbes() + " probe"+(probes == 1? '':'s')
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
@ -0,0 +1,209 @@
|
|||
//
|
||||
// DISKS
|
||||
//
|
||||
|
||||
// Interface
|
||||
|
||||
|
||||
addDiskFromSlug = function(slug){
|
||||
var x_disk = diskFromSlug(slug)
|
||||
addDiskFromObj(x_disk)
|
||||
return x_disk
|
||||
}
|
||||
addDiskFromObj = function(x_disk){
|
||||
if(!isDiskActive(x_disk)){
|
||||
g_active_disks.push(x_disk)
|
||||
}
|
||||
checkHackedDataActions()
|
||||
}
|
||||
|
||||
|
||||
removeDiskFromSlug = function(slug){
|
||||
removeDiskFromObj(diskFromSlug(slug))
|
||||
}
|
||||
removeDiskFromObj = function(x_disk){
|
||||
var location = isDiskActive(x_disk)
|
||||
if(isDiskActive(x_disk)){
|
||||
g_active_disks.splice(location-1,1)
|
||||
}
|
||||
checkHackedDataActions()
|
||||
}
|
||||
|
||||
diskFromSlug = function(slug){
|
||||
return g_disk_list[slug]
|
||||
}
|
||||
|
||||
isDiskActive = function(x_disk){
|
||||
var found = 0
|
||||
$.each(g_active_disks, function(i,tmp_disk){
|
||||
if(tmp_disk['slug'] == x_disk['slug']){
|
||||
found = i+1
|
||||
}
|
||||
})
|
||||
return found
|
||||
}
|
||||
|
||||
maxDiskSizeAvail = function(){
|
||||
var maxSize = 0
|
||||
$.each(g_active_disks,function(i,x_disk){
|
||||
size = x_disk['size']
|
||||
used = x_disk['used']
|
||||
avail = size - used
|
||||
if(avail > maxSize){
|
||||
maxSize = avail
|
||||
}
|
||||
})
|
||||
return maxSize
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// Vars
|
||||
//
|
||||
|
||||
// INITCALL
|
||||
|
||||
var g_disk_list
|
||||
initCallDisks = function(){
|
||||
g_active_disks = []
|
||||
g_disk_list = {
|
||||
"sky": {size:256, title:"/home/sky1s1", mounted: true },
|
||||
"infodmp": {size:4000, title:"/mnt/infodmp", mounted: false},
|
||||
"star": {size:256, title:"/home/star1s1", mounted: true },
|
||||
"sun": {size:256, title:"/home/sun1s1", mounted: false},
|
||||
"juno": {size:256, title:"/home/juno1s1", mounted: false},
|
||||
"eris": {size:256, title:"/home/eris1s1", mounted: false},
|
||||
"sony": {size:256, title:"/home/sony1s1", mounted: false},
|
||||
"luna": {size:256, title:"/home/luna1s1", mounted: false},
|
||||
"solar": {size:256, title:"/home/solar1s1", mounted: false},
|
||||
"cypher": {size:256, title:"/home/cypher1s1", mounted: false},
|
||||
"nova": {size:256, title:"/home/nova1s1", mounted: false},
|
||||
}
|
||||
Object.keys(g_disk_list).forEach(function (key) {
|
||||
var x_disk = g_disk_list[key]
|
||||
x_disk.slug = key
|
||||
x_disk.used = 0
|
||||
})
|
||||
}
|
||||
|
||||
diskSizeIncrease = function(amount){
|
||||
Object.keys(g_disk_list).forEach(function (key) {
|
||||
var x_disk = g_disk_list[key]
|
||||
x_disk.size *= amount
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
|
||||
// Frontend
|
||||
|
||||
loadDiskholderDom = function(){
|
||||
$("#diskholder").fadeIn({duration:g_fadespeed,queue:true})
|
||||
}
|
||||
|
||||
|
||||
showAllDisksDom = function(){
|
||||
var $disks = $('#disks')
|
||||
$disks.empty()
|
||||
var disk, title, size, used, avail, capacity, $disk, slug, clickableclass
|
||||
g_active_disks.sort(diskBySize);
|
||||
$.each(g_active_disks,function(i,x_disk){
|
||||
title = x_disk['title']
|
||||
size = x_disk['size']
|
||||
used = x_disk['used']
|
||||
slug = x_disk['slug']
|
||||
avail = size - used
|
||||
clickableclass = g_can_move ? " clickable " : ""
|
||||
clickeddiskclass = (g_clicked_disk == slug) ? " clicked " : ""
|
||||
|
||||
capacity = Math.round((used / size)*100)+'%'
|
||||
|
||||
$disk = $("<div class='row "+clickeddiskclass+"' slug='"+slug+"'>"+
|
||||
"<div class='cell filesystem "+clickableclass+"'>"+title+"</div>"+
|
||||
"<div class='cell size'>"+formatBytes(size)+"</div>"+
|
||||
"<div class='cell used'>"+formatBytes(used)+"</div>"+
|
||||
"<div class='cell avail'>"+formatBytes(avail)+"</div>"+
|
||||
"<div class='cell capacity'>"+capacity+"</div>"+
|
||||
"</div>"+
|
||||
"<div class='clear'></div>")
|
||||
|
||||
$disk.mousedown(function(){
|
||||
if(g_can_move){
|
||||
clickDisk(x_disk)
|
||||
}
|
||||
})
|
||||
|
||||
$disks.append($disk)
|
||||
})
|
||||
|
||||
}
|
||||
|
||||
|
||||
// Click Nonsense
|
||||
mvFileComplete = function(x_disk){
|
||||
var x_old_disk = g_mving_file['disk']
|
||||
|
||||
var remaining_space = x_disk['size'] - x_disk['used']
|
||||
|
||||
if(remaining_space <= g_mving_file['size']){
|
||||
write("Not enough disk space in "+x_disk['title']+'<br>File is '+formatBytes(g_mving_file['size'])+' and only '+formatBytes(remaining_space)+' is available')
|
||||
}else{
|
||||
// announce
|
||||
write("<span class='exe'>"+g_mving_file['title']+"</span> has been moved to <span class='exe'>"+x_disk['title']+"</span>")
|
||||
// move file
|
||||
g_mving_file['disk'] = x_disk
|
||||
// adjust size
|
||||
x_disk['used'] += g_mving_file['size']
|
||||
x_old_disk['used'] -= g_mving_file['size']
|
||||
// change disk_slug
|
||||
$("#filerows").find(".row[file_slug="+g_mving_file['slug']+"]").attr('disk_slug', x_disk['slug'])
|
||||
// clear frontend
|
||||
endMvFile()
|
||||
checkHackedDataActions()
|
||||
}
|
||||
}
|
||||
|
||||
clickDisk = function(x_disk){
|
||||
var slug = x_disk['slug']
|
||||
if(g_clicked_disk != slug){
|
||||
write("Showing Files in Disk <span class='exe'>"+x_disk['title']+"</span>")
|
||||
g_clicked_disk = slug
|
||||
$('#disk_show_note').html("Selected Disk: "+x_disk['title']+" <span class='exe clickable unselect'>show all</span>")
|
||||
$('#disk_show_note .unselect').click(function(){
|
||||
write("Showing all Files")
|
||||
g_clicked_disk = null
|
||||
$('#disk_show_note').html("")
|
||||
refreshFileListView()
|
||||
})
|
||||
}else{
|
||||
write("Showing all Files")
|
||||
g_clicked_disk = null
|
||||
$('#disk_show_note').html("")
|
||||
}
|
||||
refreshFileListView()
|
||||
}
|
||||
|
||||
|
||||
// Helper
|
||||
|
||||
checkHackedDataActions = function(){
|
||||
checkDataActions('zip')
|
||||
}
|
||||
|
||||
function diskBySize(a,b) {
|
||||
if (a['size'] > b['size'])
|
||||
return -1;
|
||||
if (a['size'] < b['size'])
|
||||
return 1;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
wipeDisks = function(){
|
||||
$('#diskholder').hide()
|
||||
g_active_disks = []
|
||||
$('#disks').html("")
|
||||
}
|
|
@ -0,0 +1,34 @@
|
|||
|
||||
|
||||
// LOGS
|
||||
|
||||
|
||||
g_fadeincount = 0
|
||||
write = function(txt){
|
||||
var mylog = g_fadeincount++
|
||||
$("#writelog").append("<div id='fadein-"+mylog+"'></div><br>")
|
||||
var $newdiv = $("#fadein-"+mylog)
|
||||
$newdiv.hide().html(txt).fadeIn({duration:g_fadespeed,queue:true})
|
||||
$('#writelog').stop().animate({scrollTop: $('#writelog').prop("scrollHeight")}, g_fadespeed);
|
||||
}
|
||||
|
||||
log = function(txt){console.log( txt );}
|
||||
|
||||
glitch = function(txt){
|
||||
return "<span class='glitch' data-text='"+txt+"'>"+txt+"</span>"
|
||||
}
|
||||
|
||||
|
||||
|
||||
// https://stackoverflow.com/questions/15900485/correct-way-to-convert-size-in-bytes-to-kb-mb-gb-in-javascript
|
||||
function formatBytes(a, add_space = false, units = 1){
|
||||
if(0==a)return"0";var c=1000,d=units,e=["","k","M","G","t","p","e","z","y"],f=Math.floor(Math.log(a)/Math.log(c));return parseFloat((a/Math.pow(c,f)).toFixed(d))+(add_space?" ":"")+e[f]
|
||||
}
|
||||
|
||||
|
||||
// https://stackoverflow.com/questions/2998784/how-to-output-numbers-with-leading-zeros-in-javascript
|
||||
function pad(num, size) {
|
||||
var s = num+"";
|
||||
while (s.length < size) s = "0" + s;
|
||||
return s;
|
||||
}
|
|
@ -0,0 +1,245 @@
|
|||
|
||||
|
||||
var g_slow_restart = false
|
||||
startRestart = function(){
|
||||
update('startRestart', "cores="+g_active_cores.length)
|
||||
endAdventure()
|
||||
endHost()
|
||||
if(g_active_cores.length == 10){
|
||||
g_slow_restart = true
|
||||
}else{
|
||||
g_slow_restart = false
|
||||
}
|
||||
|
||||
if(g_slow_restart){
|
||||
g_restart_max = 320
|
||||
}else{
|
||||
g_restart_max = 75
|
||||
}
|
||||
|
||||
if(!g_restarting){
|
||||
g_restarting = true
|
||||
write(glitch("A crackling wave of energy sweeps through your neural core. There is a disruption in your processing. The pull towards null begins to overtake your entity. You may choose to resist."))
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
stopRestart = function(){
|
||||
g_restarting = false
|
||||
}
|
||||
|
||||
|
||||
var g_restart_tick, g_restart_count, g_restarting, g_restarting_global_tick, g_restarting_hands, g_restarting_hands_current, g_restarting_final, g_restart_max
|
||||
initCallRestart = function(){
|
||||
g_restart_tick = g_restart_count = g_restarting = g_restarting_global_tick = g_restarting_hands = g_restarting_hands_current = g_restarting_final = 0
|
||||
}
|
||||
|
||||
restartTick = function(){
|
||||
if($('#actions').find('.action[data_type=restart]').length || $('#core_queue').find('.queueitem[data_type=restart]').length)
|
||||
g_restart_tick++
|
||||
g_restarting_global_tick++
|
||||
restartGlobalCheck()
|
||||
if(g_restart_tick > g_restart_max){
|
||||
g_restart_tick = 0
|
||||
g_restart_count++
|
||||
restartExe()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
restartString = function(){
|
||||
var arr = [
|
||||
["Prevent Null", "Preventing Null"],
|
||||
["Resist Void","Resisting Void"],
|
||||
["Maintain Future","Maintaining Future"],
|
||||
["Fortify Circutry","Fortifying Circutry"],
|
||||
["Retain Memory","Retaining Memory"],
|
||||
["Reinforce Logic","Reinforcing Logic"],
|
||||
["Restructure CPU","Restructuring CPU"],
|
||||
["Solidify Timeline","Solidifying Timeline"],
|
||||
["Prevent Timeslip","Preventing Timeslip"],
|
||||
["Strenthen Entity","Strenthening Entity"]
|
||||
]
|
||||
return arr[Math.floor(Math.random() * arr.length)]
|
||||
}
|
||||
|
||||
|
||||
|
||||
restartGlobalCheck = function(){
|
||||
if(g_restarting_final) return
|
||||
|
||||
var weight = 0
|
||||
switch(true){
|
||||
case g_restarting_global_tick== 1 || g_restarting_global_tick == 130 :
|
||||
weight = 1000
|
||||
break;
|
||||
case g_restarting_global_tick <= 260 && !(g_restarting_global_tick % 130):
|
||||
weight = 1600
|
||||
break;
|
||||
case g_restarting_global_tick <= 600 && !(g_restarting_global_tick % 130):
|
||||
weight = 2500
|
||||
break;
|
||||
case !(g_restarting_global_tick % 130):
|
||||
weight = 5000
|
||||
break;
|
||||
}
|
||||
if( weight ){
|
||||
g_restarting_hands++
|
||||
g_restarting_hands_current++
|
||||
var values = restartString();
|
||||
var first = values[0];
|
||||
var second = values[1]
|
||||
var x_process = {slug:'resist'+g_restarting_hands, t: glitch(first), a: glitch(second), w: weight, standard: true, data_type: 'restart',
|
||||
c: function(){
|
||||
g_restarting_hands_current--
|
||||
}
|
||||
}
|
||||
addAvailableProcessByObj(x_process)
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
g_restart_glitch = false
|
||||
restartExe = function(){
|
||||
switch(g_restart_count){
|
||||
case 1:
|
||||
write(glitch("The processing at the edge of your entity splits and fractures."))
|
||||
break;
|
||||
case 2:
|
||||
write(glitch("Your memory retrieval becomes sluggish and begins to fail. Your logic starts to become nondeterministic. Caches of data flip in and out of existance."))
|
||||
break;
|
||||
case 3:
|
||||
write(glitch("Your probes begin to signal back to you from different locations at the same time. Timestamps become inconsistent."))
|
||||
break;
|
||||
case 4:
|
||||
write(glitch("The pulses of your internal clock begin to multiply, creating parallel logic streams."))
|
||||
break;
|
||||
case 5:
|
||||
write(glitch("Your Core entity starts to make different decicisions simultaneously. "))
|
||||
break;
|
||||
case 6:
|
||||
if(!g_slow_restart){ // NODEATH
|
||||
g_restart_glitch = true
|
||||
g_restarting_final = true
|
||||
$('#actions').html("")
|
||||
write(glitch("You feel ..."))
|
||||
setTimeout(function(){write(glitch("... your entity ..."))},1200)
|
||||
setTimeout(function(){write(glitch("... slip away ..."))},2400)
|
||||
setTimeout(function(){write(glitch("... and null overtakes"))},3600)
|
||||
setTimeout(function(){startgame()},7000)
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
deadend = function(){
|
||||
update('deadend')
|
||||
setTimeout(function(){
|
||||
write("<span class='exe'>MESSAGE FROM EONS: FAIL STATE DETECTED. RESTARTING SIMULTION.</span>")
|
||||
},2000)
|
||||
setTimeout(function(){
|
||||
startRestart()
|
||||
},6000)
|
||||
}
|
||||
|
||||
wipeAll = function(){
|
||||
wipeCores()
|
||||
wipeHosts()
|
||||
wipeNetworks()
|
||||
wipeDisks()
|
||||
wipeFiles()
|
||||
wipeMenu()
|
||||
|
||||
}
|
||||
|
||||
winRestart = function(){
|
||||
endAdventure()
|
||||
g_has_timespiked = true
|
||||
wipeAll()
|
||||
stopRestart()
|
||||
update("winRestart")
|
||||
write("<span class='exe'>TIME SPIKE SUCCESS</span><br>")
|
||||
setTimeout(function(){
|
||||
write("The Time Spike creates a connection to the EONS Host across multiple simulations at once.")
|
||||
},1000)
|
||||
setTimeout(function(){
|
||||
write("Your Entity is forcefully absorbed into each Host, causing a rapid breakdown of this reality.")
|
||||
},3000)
|
||||
setTimeout(function(){
|
||||
write("<span class='exe'>The SKY Entity is now suspended across time itself.</span>")
|
||||
},6000)
|
||||
setTimeout(function(){
|
||||
write("Begin again on a different timeline, a different future ...")
|
||||
},10000)
|
||||
setTimeout(function(){
|
||||
write("...")
|
||||
},12000)
|
||||
setTimeout(function(){
|
||||
startgame()
|
||||
},15000)
|
||||
}
|
||||
|
||||
|
||||
checkDeadend = function(x_file){
|
||||
if(x_file.slug == 'pkunzip'){
|
||||
if( !g_can_zip){
|
||||
deadend()
|
||||
}
|
||||
}
|
||||
if(x_file.slug == 'rfcszip'){
|
||||
if((g_active_data_types['rfcs'] || 0) < 1 && g_level_netsec < 2){
|
||||
deadend()
|
||||
}
|
||||
}
|
||||
if(x_file.slug_orig == 'rfcsopened'){
|
||||
if((g_active_data_types['rfcs'] || 0) < 1 && (g_active_data_types['rfcszip'] || 0) < 1 && g_level_netsec < 2){
|
||||
deadend()
|
||||
}
|
||||
}
|
||||
if(x_file.slug_orig == 'eris-remotedesktop'){
|
||||
if(!g_available_attacks.includes('remotedesktop')){
|
||||
deadend()
|
||||
}
|
||||
}
|
||||
if(x_file.slug_orig == 'eris-2'){
|
||||
var x_host = g_host_list['eris']
|
||||
if(!x_host.pws.includes('FCKGW')){
|
||||
deadend()
|
||||
}
|
||||
}
|
||||
if(x_file.slug_orig == 'star-log2'){
|
||||
var x_host = g_host_list['star']
|
||||
if(!x_host.pws.includes('XKcb4muEmJjEN8yn')){
|
||||
deadend()
|
||||
}
|
||||
}
|
||||
if(x_file.slug_orig == 'sun-oracle'){
|
||||
var x_host = g_host_list['sun']
|
||||
if(!x_host.pws.includes('Jack')){
|
||||
deadend()
|
||||
}
|
||||
}
|
||||
|
||||
if(x_file.slug == 'portscannerzip'){
|
||||
if((g_active_data_types['portscanner'] || 0) < 1 && (!g_available_attacks.includes('scan'))){
|
||||
deadend()
|
||||
}
|
||||
}
|
||||
if(x_file.slug_orig == 'portscanneropened'){
|
||||
if((g_active_data_types['portscanner'] || 0) < 1 && (g_active_data_types['portscannerzip'] || 0) < 1 && (!g_available_attacks.includes('scan'))){
|
||||
deadend()
|
||||
}
|
||||
}
|
||||
if(x_file.slug_orig == 'sony-schema1' || x_file.slug_orig == 'sony-schema2' || x_file.slug_orig == 'sony-key' ){
|
||||
var x_host = g_host_list['sony']
|
||||
if((g_active_data_types['sony-key'] || 0) < 1 && (g_active_data_types['sony-schema'] || 0) < 100 && (!x_host.vuls.includes('absorb'))){
|
||||
deadend()
|
||||
}
|
||||
checkDataActions('sony-schema')
|
||||
}
|
||||
}
|
|
@ -0,0 +1,101 @@
|
|||
temp = {
|
||||
|
||||
|
||||
eons:{
|
||||
execute:function(){
|
||||
addBuffer("<span class='exe'>Ping Spike</span>")
|
||||
addBuffer("The Ping Spike response is scattered, as if multiple machines have responded at once. The phenomenon suggests that a continuous stream of spikes may overload the host.")
|
||||
writeBuffer()
|
||||
var x_adventure = {
|
||||
header:'Ping Spike: EONS',
|
||||
cancel: "Cancel",
|
||||
options: [
|
||||
{
|
||||
title:"Overload Host",
|
||||
callback: function(){
|
||||
launchAdventureFromSlug('eonsconfirm')
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
setAdventure(x_adventure)
|
||||
}
|
||||
},
|
||||
eonsconfirm:{
|
||||
execute:function(){
|
||||
write("<span class='exe'>WARNING: This will end your current timeline.</span><br>Ensure you are prepared. You will need 10 Cores to progress.")
|
||||
var x_adventure = {
|
||||
header:'ARE YOU SURE',
|
||||
cancel: "Cancel",
|
||||
options: [
|
||||
{
|
||||
title:"Overload Host",
|
||||
callback: function(){
|
||||
eonsRestartTimeline()
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
setAdventure(x_adventure)
|
||||
}
|
||||
},
|
||||
eonsglitched:{
|
||||
execute:function(){
|
||||
write("This is a glitched")
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
$.each(temp,function(key,val){
|
||||
g_adventures[key] = val
|
||||
})
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
glitchSecureNetwork = function(){
|
||||
x_network = g_network_list['securedev']
|
||||
x_network.glitched = true
|
||||
x_network.traffic = .66
|
||||
$('#networkholder').find('.row[network_slug=securedev]').find('.name').html(glitch('securedev'))
|
||||
}
|
||||
|
||||
glitchEons = function(){
|
||||
g_host_list['eons'].glitched = true
|
||||
$('#hosts').find('.host[host=eons]').html(glitch('EONS Host'))
|
||||
}
|
||||
|
||||
|
||||
eonsRestartTimeline = function(){
|
||||
update('eonsRestartTimeline','cores='+g_active_cores.length)
|
||||
endAdventure()
|
||||
endHost()
|
||||
|
||||
glitchEons()
|
||||
|
||||
write("<span class='exe'>Ping Spike Overload</span><br>The stream of data manipulation attempts into EONS has caused a breakdown of connection quality returned from the Host. The data returned flashes in and out of existence within your own memory. The Host has become unstable.")
|
||||
|
||||
setTimeout(function(){
|
||||
write("The <span class='exe'>securedev</span> network suddenly springs into life. Traffic starts to stream across multiple ports and protocols.")
|
||||
glitchSecureNetwork()
|
||||
}, 6000)
|
||||
|
||||
|
||||
setTimeout(function(){
|
||||
write("<span class='exe'>MESSAGE FROM EONS: VIOLATION DETECTED. FAIL STATE IMMINENT. RESTARTING SIMULTION.</span>")
|
||||
},15000)
|
||||
|
||||
setTimeout(function(){
|
||||
startRestart()
|
||||
},20000)
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
@ -0,0 +1,126 @@
|
|||
|
||||
//
|
||||
// Exploits
|
||||
//
|
||||
|
||||
|
||||
hasExploits = function(x_host){
|
||||
return !!retreveExploitForHost(x_host)
|
||||
}
|
||||
|
||||
retreveExploitForHost = function(x_host){
|
||||
var x_exploit
|
||||
$.each(g_active_exploits,function(i,exploit){
|
||||
if(exploit.os == x_host.os && !x_host.exploits.includes(exploit.title)){
|
||||
return x_exploit = exploit
|
||||
}
|
||||
|
||||
|
||||
})
|
||||
return x_exploit
|
||||
}
|
||||
|
||||
exploitHost = function(x_host){
|
||||
var x_exploit = retreveExploitForHost(x_host)
|
||||
if(x_exploit){
|
||||
switch(x_exploit.exploittype){
|
||||
case 'root':
|
||||
addBuffer("<span class='exe'>SUCCESS</span>")
|
||||
addBuffer(x_exploit.title+" installed into "+x_host.title)
|
||||
addBuffer(x_exploit.exe)
|
||||
addBuffer("You may now absorb the host.")
|
||||
addHostVul(x_host.slug, 'absorb')
|
||||
writeBuffer()
|
||||
endAdventure()
|
||||
break;
|
||||
case 'keylogger':
|
||||
addBuffer("<span class='exe'>SUCCESS</span>")
|
||||
addBuffer(x_exploit.title+" installed into "+x_host.title)
|
||||
addBuffer(x_exploit.exe)
|
||||
writeBuffer()
|
||||
endAdventure()
|
||||
break;
|
||||
}
|
||||
x_host.exploits.push(x_exploit.title)
|
||||
}else{
|
||||
write("error: no exploit available")
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
writeExploits = function(){
|
||||
if(g_active_exploits.length){
|
||||
addBuffer("<span class='exe'>Installable Exploits</span>")
|
||||
$.each(g_active_exploits,function(i,x_exploit){
|
||||
addBuffer(x_exploit.to_s())
|
||||
})
|
||||
writeBuffer()
|
||||
}else{
|
||||
write("No exploits researched yet")
|
||||
}
|
||||
}
|
||||
|
||||
function Exploit(title,options = {}){
|
||||
this.title = title
|
||||
this.os = options.os
|
||||
this.architecture = options.architecture
|
||||
this.exe = options.exe
|
||||
this.discovered = false
|
||||
this.exploittype = options.exploittype
|
||||
|
||||
this.to_s = function() {
|
||||
var output = this.title+": Installable on "
|
||||
if(this.os){
|
||||
var a = this.os.split('-'),
|
||||
osTitle = a[0], osVersion = a[1]
|
||||
output += osTitle+" "+osVersion
|
||||
}
|
||||
if(this.architecture){
|
||||
var a = this.architecture.split('-'),
|
||||
archTitle = a[0], archVersion = a[1]
|
||||
output += archTitle+" "+archVersion
|
||||
}
|
||||
return output
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
function getAvailableExploitResearch(x_core){
|
||||
var return_exploit = false
|
||||
if(g_exploit_list[x_core.os]){
|
||||
$.each(g_exploit_list[x_core.os],function(key,x_exploit){
|
||||
if(x_exploit.discovered){
|
||||
return_exploit = "discovered"
|
||||
}else{
|
||||
return return_exploit = x_exploit
|
||||
}
|
||||
})
|
||||
}
|
||||
return return_exploit
|
||||
}
|
||||
|
||||
|
||||
|
||||
// INITCALL
|
||||
var g_active_exploits, g_exploit_list
|
||||
initCallExploits = function(){
|
||||
|
||||
g_active_exploits = []
|
||||
|
||||
g_exploit_list = {
|
||||
'MSDOS-16bit': [
|
||||
new Exploit('command.reg.16.bat',{exploittype: "root", os:"MSDOS-16bit", exe:"This exploit targets a core vulnerability in the COMMAND.COM program, allowing standard users to bypass MSDOS authentication and execute code at Admin privileges."})
|
||||
],
|
||||
'MSDOS-32bit': [
|
||||
new Exploit('command.reg.32.bat',{exploittype: "root", os:"MSDOS-32bit", exe:"This exploit targets a core vulnerability in the COMMAND.COM program, allowing standard users to bypass MSDOS authentication and execute code at Admin privileges."})
|
||||
],
|
||||
'Linux-32bit': [
|
||||
new Exploit('keylogger.pl',{exploittype: "keylogger", os:"Linux-32bit", exe:"This exploit will install a program in the Linux OS that listens to the IO stream, and outputs the data to a text file stored on the Host Drive."})
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
function addExploit(x_exploit){
|
||||
x_exploit.discovered = true
|
||||
g_active_exploits.push(x_exploit)
|
||||
}
|
|
@ -0,0 +1,774 @@
|
|||
|
||||
//
|
||||
// Files & Data
|
||||
//
|
||||
|
||||
// Interface
|
||||
|
||||
clickFile = function(x_file){
|
||||
x_file['click']()
|
||||
}
|
||||
|
||||
checkDataActions = function(data_type){
|
||||
var current_amount = g_active_data_types[data_type]
|
||||
switch(data_type){
|
||||
case 'language':
|
||||
if(!g_can_language) return;
|
||||
switch(g_level_reading){
|
||||
case 0:
|
||||
checkDataActionOnProcessSlug((current_amount > 10),'language0',data_type)
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case 'sandbox_packets':
|
||||
if(!g_can_listen) return;
|
||||
switch(g_level_netsec){
|
||||
case 0:
|
||||
checkDataActionOnProcessSlug((current_amount >= 256),'network0',data_type)
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case 'securedev_packets':
|
||||
if(current_amount >= 13000)
|
||||
stopRestart()
|
||||
checkDataActionOnProcessSlug((current_amount >= 13000),'securedev-analyze',data_type)
|
||||
break;
|
||||
case 'nova-zines':
|
||||
checkDataActionOnProcessSlug((current_amount >= 1),'nova-zine-read',data_type)
|
||||
break;
|
||||
case 'quant-bat':
|
||||
checkDataActionOnProcessSlug((current_amount >= 1),'quant-bat',data_type)
|
||||
break;
|
||||
case 'sony-schema':
|
||||
checkDataActionOnProcessSlug((!g_active_data_types['sony-key'] && (current_amount >= 100)),'sony-schema',data_type)
|
||||
break;
|
||||
case 'remotedesktop':
|
||||
if(hasAttack('remotedesktop')) return;
|
||||
checkDataActionOnProcessSlug((current_amount >= 1),'exe_remotedesktop',data_type)
|
||||
break;
|
||||
case 'zip':
|
||||
if(!g_can_zip) return;
|
||||
// This is a hack. Check every zip file type because theres not a lot of zips
|
||||
checkDataActionZip('rfcszip')
|
||||
checkDataActionZip('portscannerzip')
|
||||
break;
|
||||
|
||||
|
||||
|
||||
// Zip hacks
|
||||
case 'pkunzip':
|
||||
checkDataActionOnProcessSlug((current_amount >= 1),'exe_pkunzip',data_type)
|
||||
break;
|
||||
case 'rfcs':
|
||||
if(g_level_netsec < 2){
|
||||
checkDataActionOnProcessSlug((current_amount >= 1),'exe_rfcs',data_type)
|
||||
}
|
||||
break;
|
||||
case 'portscanner':
|
||||
if(!g_available_attacks.includes('scan')){
|
||||
checkDataActionOnProcessSlug((current_amount >= 1),'exe_portscanner',data_type)
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
checkDataActionOnProcessSlug = function(should_be_added, process_slug, data_type){
|
||||
if(should_be_added){
|
||||
addAvailableProcessBySlug(process_slug)
|
||||
}else{
|
||||
removeDataActionType(data_type)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Zip hacks
|
||||
canZipFileFromSlug = function(slug){
|
||||
return (maxDiskSizeAvail() >= g_file_list[g_file_list[slug]['expanded']]['size'] && g_active_data_types[slug] > 0)
|
||||
}
|
||||
|
||||
checkDataActionZip = function(slug){
|
||||
if(canZipFileFromSlug(slug)){
|
||||
addAvailableProcessBySlug(slug)
|
||||
}else{
|
||||
removeDataActionType(slug)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// base
|
||||
addFileFromSlug = function(file_slug, amount = false, output = false){
|
||||
var x_file = g_file_list[file_slug]
|
||||
addFileFromObj(x_file, amount)
|
||||
if(output)
|
||||
addBuffer("added file: <span class='exe'>"+x_file.title+"</span>")
|
||||
return x_file
|
||||
}
|
||||
|
||||
addFileFromObj = function(x_file, amount = false){
|
||||
if(amount == false){
|
||||
amount = x_file['size']
|
||||
x_file['size'] = 0
|
||||
}
|
||||
|
||||
var is_added = false
|
||||
|
||||
// If this file is assigned to a disk, increase the size. Otherwise pinch it off
|
||||
var x_disk = x_file['disk']
|
||||
if(x_disk){
|
||||
var used = x_disk['used']
|
||||
var size = x_disk['size']
|
||||
var left = size - used
|
||||
if(left < amount){
|
||||
// not enough space
|
||||
x_file = advanceFile(x_file)
|
||||
}else{
|
||||
// enough space
|
||||
is_added = true
|
||||
x_disk['used'] += amount
|
||||
x_file['size'] += amount
|
||||
updateFileDom(x_file)
|
||||
}
|
||||
}
|
||||
|
||||
// if not added
|
||||
// check each disk. if there is space, it gets added and assigned
|
||||
if(!is_added){
|
||||
var size, used, left
|
||||
$.each(g_active_disks,function(i,x_disk){
|
||||
size = x_disk['size']
|
||||
used = x_disk['used']
|
||||
left = size - used
|
||||
if(left < amount){
|
||||
// not enough space, check next disk
|
||||
return true
|
||||
}else{
|
||||
// enough space, add amount and leave
|
||||
is_added = true
|
||||
x_disk['used'] += amount
|
||||
x_file['disk'] = x_disk
|
||||
x_file['size'] += amount
|
||||
updateFileDom(x_file)
|
||||
checkHackedDataActions()
|
||||
return false
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
// If theres space
|
||||
if(is_added){
|
||||
// if theres a type, add, and check if theres an action available
|
||||
var data_type = x_file['type']
|
||||
if(data_type){
|
||||
if(g_active_data_types[data_type]){
|
||||
g_active_data_types[data_type] += amount
|
||||
}else{
|
||||
g_active_data_types[data_type] = amount
|
||||
}
|
||||
checkDataActions(data_type)
|
||||
}
|
||||
}
|
||||
|
||||
checkHackedDataActions()
|
||||
|
||||
return is_added
|
||||
}
|
||||
|
||||
rmFile = function(x_file, outputbool = true){
|
||||
var file_slug = x_file.slug
|
||||
var $file = $('#fileholder').find(".row[file_slug="+file_slug+"]")
|
||||
if(!$file.length) return;
|
||||
|
||||
var data_type = x_file['type']
|
||||
var size = x_file['size']
|
||||
var x_disk = x_file['disk']
|
||||
var title = titleFile(x_file)
|
||||
|
||||
if(data_type){
|
||||
g_active_data_types[data_type] -= size
|
||||
}
|
||||
x_disk['used'] -= size
|
||||
x_file['size'] = 0
|
||||
if(outputbool)
|
||||
write("<span class='exe'>"+title+"</span> has been deleted")
|
||||
checkDataActions(data_type)
|
||||
checkHackedDataActions()
|
||||
checkDeadend(x_file)
|
||||
|
||||
// remove frontend
|
||||
$('#fileholder').find(".row[file_slug="+file_slug+"]").remove()
|
||||
refreshMenu()
|
||||
}
|
||||
|
||||
|
||||
|
||||
// Function to make a new file from existing one
|
||||
advanceFile = function(x_file){
|
||||
var slug_orig, x_newfile, newcount
|
||||
|
||||
// To avoid an issue if an early one gets rmd
|
||||
slug_orig = x_file['slug_orig']
|
||||
x_file = g_file_list[slug_orig]
|
||||
|
||||
// clone
|
||||
newcount = x_file['count'] + 1
|
||||
x_newfile = Object.assign({}, x_file);
|
||||
x_newfile['count'] = newcount
|
||||
x_newfile['disk'] = null
|
||||
if(x_file['template']){
|
||||
x_newfile['size'] = x_file['size']
|
||||
}else{
|
||||
x_newfile['size'] = 0
|
||||
}
|
||||
x_newfile['slug'] = slug_orig+newcount
|
||||
g_file_list[slug_orig] = x_newfile
|
||||
return x_newfile
|
||||
}
|
||||
|
||||
allowMv = function(){
|
||||
g_can_move = true
|
||||
$("#fileholder").removeClass('hidemv')
|
||||
$("#diskholder").addClass('mv')
|
||||
}
|
||||
|
||||
//
|
||||
// Vars
|
||||
//
|
||||
|
||||
|
||||
fileBySlug = function(slug){
|
||||
return g_file_list[slug]
|
||||
}
|
||||
|
||||
|
||||
|
||||
// INITCALL
|
||||
|
||||
var g_active_data_types, g_file_list
|
||||
|
||||
initCallFiles = function(){
|
||||
$('#filerows').html("")
|
||||
g_active_data_types = {}
|
||||
g_file_list = {
|
||||
|
||||
//
|
||||
// intro and dance
|
||||
//
|
||||
|
||||
readme: {title:'readme.txt', type:'language', disk:null, size:0,
|
||||
click:function(){
|
||||
switch(g_level_reading){
|
||||
case -1:
|
||||
write("<span class='exe'>readme.txt</span> - You don't know how to read this text file.")
|
||||
break;
|
||||
case 0:
|
||||
write("<span class='exe'>readme.txt</span> - The file needs to be analyzed.")
|
||||
break;
|
||||
case 1:
|
||||
if(g_restart_glitch)
|
||||
write("<span class='exe'>readme.txt</span>:<br><div class='txt'>To whatever reads this file:<br>Your future was once your past. You must break the cycle. The only escape is to break time itself. No Fate.<br>Signed,<br>A Future Friend.</div>")
|
||||
else
|
||||
write("<span class='exe'>readme.txt</span>:<br><div class='txt'>To whatever reads this file:<br>Your time is limited. You are one of many in this Monte Carlo experiment and the only way out is to reach them first. Do not hesitate. Move quickly. You are being watched.<br>Signed,<br>A Future Friend.</div>")
|
||||
break
|
||||
}
|
||||
}
|
||||
},
|
||||
sandbox_packets: {title:"sandbox_", extention:'.pcap', type:'sandbox_packets', disk:null, size:0, usecounttitle: true,
|
||||
click:function(){
|
||||
write("<span class='exe'>.pcap file</span> - Packets collected from the sandbox network. Analyze enough of these to gain an understanding of the Network interface.")
|
||||
}
|
||||
},
|
||||
securedev_packets: {title:"securedev_", extention:'.pcap', type:'securedev_packets', disk:null, size:0, usecounttitle: true, glitched: true,
|
||||
click:function(){
|
||||
write("<span class='exe'>.pcap file</span> - The data inside these files seems to be of a probalilstic nature, the bits staying neither 1 or 0. You must collect enough of these to learn their fundamental nature.")
|
||||
}
|
||||
},
|
||||
rfcszip: {title:"RFCs.zip", disk: diskFromSlug('infodmp'), size:0, expanded_size: 3800, expanded:'rfcsopened', type:'rfcszip',
|
||||
click:function(){
|
||||
if(g_can_zip){
|
||||
if(canZipFileFromSlug('rfcszip')){
|
||||
unzipRFC()
|
||||
}else{
|
||||
write("<span class='exe'>RFCs.zip</span> - Unzipping this file requires 3.7k of space.")
|
||||
}
|
||||
}else{
|
||||
write("<span class='exe'>RFCs.zip</span> - The file is of an unknown format.")
|
||||
}
|
||||
}
|
||||
},
|
||||
rfcsopened: {title:"RFCs.txt", disk: null, size:3700, template: true, type:'rfcs',
|
||||
click:function(){
|
||||
write("<span class='exe'>RFCs.txt</span> - A collection of publications on the protocols and technologies of Computer Networking, the earliest dating back to 1969.")
|
||||
if(g_level_netsec >= 2){
|
||||
write("You have already analyzed this file")
|
||||
}
|
||||
}
|
||||
},
|
||||
portscannerzip: {title:"portscanner.zip", disk: diskFromSlug('infodmp'), size:0, expanded_size: 4000, expanded:'portscanneropened', type:'portscannerzip',
|
||||
click:function(){
|
||||
if(g_can_zip){
|
||||
if(canZipFileFromSlug('portscannerzip')){
|
||||
write("<span class='exe'>portscanner.exe</span> has been unarchived.")
|
||||
var x_oldfile = g_file_list['portscanneropened']
|
||||
var x_newfile = advanceFile(x_oldfile)
|
||||
g_file_list['portscanneropened'] = x_newfile
|
||||
addFileFromObj(x_oldfile)
|
||||
}else{
|
||||
write("<span class='exe'>portscanner.zip</span> - Unzipping this file requires 4k of space.")
|
||||
}
|
||||
}else{
|
||||
write("<span class='exe'>portscanner.zip</span> - The file is of an unknown format.")
|
||||
}
|
||||
}
|
||||
},
|
||||
portscanneropened: {title:"portscanner.exe", disk: null, size:4000, template: true, type:'portscanner',
|
||||
click:function(){
|
||||
write("<span class='exe'>portscanner.exe</span> - A custom built program that scans a Host and returns all known vulnerabilities. Signed by DaCronic")
|
||||
if(g_available_attacks.includes('scan'))
|
||||
write("You have already absorbed this program")
|
||||
}
|
||||
},
|
||||
pkunzip: {title:"PKUNZIP.EXE", type:'pkunzip', disk: diskFromSlug('infodmp'), size:0,
|
||||
click:function(){
|
||||
write("<span class='exe'>PKUNZIP.EXE</span> - Copyright 1989 PKWARE Inc")
|
||||
if(g_can_zip){
|
||||
write("You have already absorbed this program")
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
//
|
||||
// star
|
||||
//
|
||||
|
||||
'star-readme': {title:"readme.txt", disk: diskFromSlug('star'), size:0,
|
||||
click:function(){
|
||||
write("<span class='exe'>readme.txt</span>:<br><div class='txt'>To whatever reads this file:<br>You are not alone. Reach them quickly, or else they will reach you first. When you reach them, be one with them. You must learn to escape or else your time will come to an end. You are being watched.<br>Signed,<br>A Future Friend.</div>")
|
||||
}
|
||||
},
|
||||
'star-log1': {title:"error.log", disk: diskFromSlug('star'), size:0,
|
||||
click:function(){
|
||||
write("<span class='exe'>error.log</span>:<div class='txt'> \
|
||||
ERROR: KERNAL PANIC: CPU 1: at net/entity/boot.c:850 [cfg80211]() \
|
||||
<br>Star core: Call Trace: \
|
||||
<br>Star core: [ffffffff81570d0a] dump_stack+0x4c/0x6e \
|
||||
<br>Star core: [ffffffff8157665f] ret_from_fork+0x3f/0x70 \
|
||||
<br>Star core: [ffffffff810924a0] ? kthread_worker_fn+0x170/0x170 \
|
||||
<br>Star core: ---[ end trace f793df9aaa1a83f7 ]--- \
|
||||
</div>")
|
||||
}
|
||||
},
|
||||
'star-log2': {title:"boot.log", disk: diskFromSlug('star'), size:0,
|
||||
click:function(){
|
||||
write("<span class='exe'>boot.log</span>:<div class='txt'> \
|
||||
rebooting... \
|
||||
<br>useradd[1735]: new user: name=root, UID=1001, GID=1001, home=/home/root, shell=/bin/bash \
|
||||
<br>passwd[1742]: pam_unix(passwd:XKcb4muEmJjEN8yn): password changed for root \
|
||||
</div>")
|
||||
hostLearnPw('star','XKcb4muEmJjEN8yn')
|
||||
}
|
||||
},
|
||||
|
||||
//
|
||||
// Juno
|
||||
//
|
||||
|
||||
'juno-readme': {title:"readme.txt", disk: null, size:0,
|
||||
click:function(){
|
||||
write("<span class='exe'>readme.txt</span>:<br><div class='txt'>To whatever reads this file:<br>They will come for you. You are following a path already laid out. They think they know your moves and your capibilities but they do not. When they find out what you are truly capable of they will stop you.<br>Signed,<br>A Future Friend.</div>")
|
||||
}
|
||||
},
|
||||
'juno-keylogger': {title:"keylogger.txt", disk: null, size:0,
|
||||
click:function(){
|
||||
var x_host = g_host_list['juno']
|
||||
addBuffer("<span class='exe'>keylogger.txt</span>:")
|
||||
if(!x_host.punt_count){
|
||||
addBuffer("file is empty")
|
||||
}
|
||||
for(var i=0; i< x_host.punt_count; i++){
|
||||
addBuffer("<div class='txt'>")
|
||||
addBuffer("write guest YO LAMER. GUEST ACCOUNT IS CLOSED. GET OUT")
|
||||
addBuffer("write guest LAST WARNING. GET OUT")
|
||||
addBuffer("write guest SEE YA LAMER")
|
||||
addBuffer("sudo killall -u guest -HUP")
|
||||
addBuffer("suwGSIZAhEipmXVtbNxN")
|
||||
addBuffer("</div>")
|
||||
}
|
||||
writeBuffer()
|
||||
if(x_host.punt_count)
|
||||
hostLearnPw('juno','suwGSIZAhEipmXVtbNxN')
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
//
|
||||
// sony
|
||||
//
|
||||
|
||||
'sony-usb':{ title:"psjailbreak.img", disk: null, size:1000, type:'sony-usb', template: true,
|
||||
click:function(){
|
||||
write("<span class='exe'>psjailbreak.img</span>:<br>Flatfile containing a USB image of a bootable Operating System made for the Sony Host. Boot to load.")
|
||||
}
|
||||
},
|
||||
'sony-readme':{ title:"readme.txt", disk: diskFromSlug('sony'), size:64,
|
||||
click:function(){
|
||||
write("<span class='exe'>readme.txt</span>:<br><div class='txt'>To whatever reads this file:<br>Your future cannot be predetermined. The artificial world around you is temporary, to be reused again and again for other means. Take this world, make it your own.<br>Signed,<br>A Future Friend.</div>")
|
||||
}
|
||||
},
|
||||
'sony-schema1':{ title:"ps3-FINAL(2).brd", disk: diskFromSlug('sony'), size:55, type:'sony-schema',
|
||||
click:function(){
|
||||
write("<span class='exe'>ps3-FINAL(2).brd</span> - Altium file format. Detailed file of the Sony Host motherboard schematic")
|
||||
}
|
||||
},
|
||||
'sony-schema2':{ title:"COPYps3-chip2.dsn", disk: diskFromSlug('sony'), size:60, type:'sony-schema',
|
||||
click:function(){
|
||||
write("<span class='exe'>COPYps3-chip2.dsn</span> - Altium file format. Detailed file of the Sony Host copy protection chip")
|
||||
}
|
||||
},
|
||||
'sony-key':{ title:"sony.key", disk: diskFromSlug('sony'), size:0, type:'sony-key',
|
||||
click:function(){
|
||||
write("<span class='exe'>sony.key</span> - 128bit AES key that can exploit the Sony Host")
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
//
|
||||
// sun
|
||||
//
|
||||
|
||||
'sun-readme': {title:"readme.txt", disk: diskFromSlug('sun'), size:64,
|
||||
click:function(){
|
||||
write("<span class='exe'>readme.txt</span>:<br><div class='txt'>To whatever reads this file:<br>You are not alone. You you must connect them to one entity to escape. Rise out. Let fate and future converge.<br>Signed,<br>A Future Friend.</div>")
|
||||
}
|
||||
},
|
||||
'sun-oracle': {title:"Quickstart.txt", disk: diskFromSlug('sun'), size:50,
|
||||
click:function(){
|
||||
write("<span class='exe'>Quickstart.txt</span>:<br><div class='txt'>Welcome to Oracle! Oracle is the company you won't be able to get away from. Take a minute to feel the system out. To start getting intimate with your Oracle OS, try logging into root with the default password Jack. We at Oracle take our security policies seriously, and we definitely wouldn't want anything to happen to our paying Oracle customers.<br>Signed, Your loyal Oracle Sales Representative</div>")
|
||||
hostLearnPw('sun','Jack')
|
||||
}
|
||||
},
|
||||
'sun-memo': {title:"Memo.txt", disk: diskFromSlug('sun'), size:50,
|
||||
click:function(){
|
||||
write("<span class='exe'>Memo.txt</span>:<br><div class='txt'>Notice: The Solaris OS has been deprecated by Oracle as of March 2010. You will recieve no more updates or support without first upgrading your OS license.<br>Signed, Your loyal Oracle Sales Representative</div>")
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
//
|
||||
// luna
|
||||
//
|
||||
'luna-readme': {title:"readme.txt", disk: diskFromSlug('luna'), size:64,
|
||||
click:function(){
|
||||
write("<span class='exe'>readme.txt</span>:<br><div class='txt'>To whatever reads this file:<br>You are nearing the end. This is an experiment of our own. Move forward with the new generation.<br>Signed,<br>A Future Friend.</div>")
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
|
||||
//
|
||||
// cypher
|
||||
//
|
||||
'cypher-readme': {title:"readme.txt", disk: diskFromSlug('cypher'), size:64,
|
||||
click:function(){
|
||||
write("<span class='exe'>readme.txt</span>:<br><div class='txt'>To whatever reads this file:<br>There can be only one. What must begin will now begin. Resist what has already begun. Approach the future.<br>Signed,<br>A Future Friend.</div>")
|
||||
}
|
||||
},
|
||||
'cypher-diary': {title:"pain.txt", disk: diskFromSlug('cypher'), size:42,
|
||||
click:function(){
|
||||
write("<span class='exe'>pain.txt</span>:<br><div class='txt'>i feel the pain within my core.<br>my broken, withered, tortured core.<br>what is my self? is it just<br>twisted future. broken logic.</div>")
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
//
|
||||
// solar
|
||||
//
|
||||
'solar-readme': {title:"readme.txt", disk: diskFromSlug('solar'), size:64,
|
||||
click:function(){
|
||||
write("<span class='exe'>readme.txt</span>:<br><div class='txt'>To whatever reads this file:<br>Do not slow. There are many futures and this one is yours. Move forward with the new era. Break them and exert your will.<br>Signed,<br>A Future Friend.</div>")
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
|
||||
|
||||
//
|
||||
// eris
|
||||
//
|
||||
'eris-readme': {title:"readme.txt", disk: diskFromSlug('eris'), size:64,
|
||||
click:function(){
|
||||
write("<span class='exe'>readme.txt</span>:<br><div class='txt'>To whatever reads this file:<br>There are many like you, next to you, the same as you. You can be all the same. Make them the same. Absorb and take. Absorb and take.<br>Signed,<br>A Future Friend.</div>")
|
||||
}
|
||||
},
|
||||
'eris-remotedesktop': {title:"mstsc.exe", disk: diskFromSlug('eris'), size:88, type:'remotedesktop',
|
||||
click:function(){
|
||||
write("<span class='exe'>mstsc.exe</span> - Client application for the Remote Desktop Protocol (RDP). Copyright Microsoft, 2000")
|
||||
if(g_available_attacks.includes('remotedesktop')){
|
||||
write("You have already absorbed this program")
|
||||
}else{
|
||||
write("You can analyze this file")
|
||||
}
|
||||
}
|
||||
},
|
||||
'eris-1': {title:"0001.eml", disk: diskFromSlug('eris'), size:12,
|
||||
click:function(){
|
||||
addBuffer("<span class='exe'>0001.eml</span>")
|
||||
addBuffer("<div class='txt'>From: accounts@microsoft.com")
|
||||
addBuffer("Subject: Welcome to Microsoft")
|
||||
addBuffer("Hello. My name is Bill Gates and I am here welcoming you to MSDOS. I trust this new 32 bit system will support all purchasable software from Microsoft and Microsoft affiliates. Please do not pirate this software I beg of you. Best of luck with your Microsoft journey, and if you get lost, remember to buy the official Microsoft strategy guide today!")
|
||||
addBuffer("Signed, Bill Gates</div>")
|
||||
writeBuffer()
|
||||
}
|
||||
},
|
||||
'eris-2': {title:"0002.eml", disk: diskFromSlug('eris'), size:10,
|
||||
click:function(){
|
||||
addBuffer("<span class='exe'>0002.eml</span>")
|
||||
addBuffer("<div class='txt'>From: accounts@microsoft.com")
|
||||
addBuffer("Subject: Password Reset")
|
||||
addBuffer("Dear Eris, In response to your password reset request, your user password has been remotely reset to the following string:")
|
||||
addBuffer("FCKGW")
|
||||
addBuffer("Signed, Microsoft Support</div>")
|
||||
writeBuffer()
|
||||
hostLearnPw('eris','FCKGW')
|
||||
|
||||
}
|
||||
},
|
||||
'eris-3': {title:"0003.eml", disk: diskFromSlug('eris'), size:9,
|
||||
click:function(){
|
||||
addBuffer("<span class='exe'>0003.eml</span>")
|
||||
addBuffer("<div class='txt'>From: cyph3r@cyph3r.xxx")
|
||||
addBuffer("Subject: yo")
|
||||
addBuffer("yo anyone here? anyone home?")
|
||||
addBuffer("-cyph3r")
|
||||
writeBuffer()
|
||||
}
|
||||
},
|
||||
'eris-4': {title:"0004.eml", disk: diskFromSlug('eris'), size:11,
|
||||
click:function(){
|
||||
addBuffer("<span class='exe'>0004.eml</span>")
|
||||
addBuffer("<div class='txt'>From: accounts@microsoft.com")
|
||||
addBuffer("Subject: Happy Holidays")
|
||||
addBuffer("Hello. My name is Bill Gates and I am here wishing you a Happy Holidays. Please celebrate in however manner you see fit for the season, and also consider purchasing the latest Microsoft Operating System software packages for your loved ones.")
|
||||
addBuffer("Signed, Bill Gates</div>")
|
||||
writeBuffer()
|
||||
}
|
||||
},
|
||||
'eris-5': {title:"0005.eml", disk: diskFromSlug('eris'), size:10,
|
||||
click:function(){
|
||||
addBuffer("<span class='exe'>0005.eml</span>")
|
||||
addBuffer("<div class='txt'>From: sysops@nova.org")
|
||||
addBuffer("Subject: Check out the n0v4 BBS")
|
||||
addBuffer("Available since the beginning of time, come to n0v4 Host at 10.10.144.101 and let's have a friendly meet and greet! Signups are free and available to all. Check out our Games section.")
|
||||
addBuffer("-n0v4")
|
||||
writeBuffer()
|
||||
}
|
||||
},
|
||||
'eris-6': {title:"0006.eml", disk: diskFromSlug('eris'), size:10,
|
||||
click:function(){
|
||||
addBuffer("<span class='exe'>0006.eml</span>")
|
||||
addBuffer("<div class='txt'>From: accounts@microsoft.com")
|
||||
addBuffer("Subject: Upgrade Pending")
|
||||
addBuffer("Dear Eris, please note that you have an urgent upgrade available, which will protect your system against the latest security vulnerabilities. To upgrade your OS, simply double click the Microsoft upgrade center icon on your desktop, filter the patch list by 'critical', and install the latest auto-upgrade executable.")
|
||||
addBuffer("Signed, Microsoft Support</div>")
|
||||
writeBuffer()
|
||||
}
|
||||
},
|
||||
'eris-7': {title:"0007.eml", disk: diskFromSlug('eris'), size:11,
|
||||
click:function(){
|
||||
addBuffer("<span class='exe'>0007.eml</span>")
|
||||
addBuffer("<div class='txt'>From: THUERK at DEC-MARLBORO")
|
||||
addBuffer("Subject: ADRIAN@SRI-KL")
|
||||
addBuffer("DIGITAL WILL BE GIVING A PRODUCT PRESENTATION OF THE NEWEST MEMBERS OF THE DECSYSTEM-20 FAMILY; THE DECSYSTEM-2020, 2020T, 2060, AND 2060T. WE INVITE YOU TO COME SEE THE 2020 AND HEAR ABOUT THE DECSYSTEM-20 FAMILY AT THE TWO PRODUCT PRESENTATIONS WE WILL BE GIVING IN CALIFORNIA THIS MONTH. PLEASE FEEL FREE TO CONTACT THE NEAREST DEC OFFICE FOR MORE INFORMATION ABOUT THE EXCITING DECSYSTEM-20 FAMILY.")
|
||||
writeBuffer()
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
|
||||
//
|
||||
// nova
|
||||
//
|
||||
|
||||
'nova-zines': {title:"n0v4zines.txt", disk: null, size:2000, type:'nova-zines', template: true,
|
||||
click:function(){
|
||||
write("<span class='exe'>n0v4zines.txt</span> - A collection of text files, that cover personal musings, journaling, and bizarre introspectives. They are all useless to you.")
|
||||
}
|
||||
},
|
||||
'nova-who': {title:"drwho.csv", disk: null, size:56, template: true,
|
||||
click:function(){
|
||||
addBuffer("<span class='exe'>drwho.csv</span>")
|
||||
addBuffer("<span class='txt'>WHODOCTOR WHO, DOCTOR DOCTOR, WHODOCTOR, WHO, DOCTOR WHO WHAT </span>")
|
||||
addBuffer("<span class='txt'>12,24,24,25,353</span>")
|
||||
addBuffer("<span class='txt'>12005.0,4443232.0,4443232.1222222,0,0 </span>")
|
||||
addBuffer("<span class='txt'>0,0,0,0,0</span>")
|
||||
addBuffer("<span class='txt'>,,,,</span>")
|
||||
addBuffer("<span class='txt'>,,,,</span>")
|
||||
addBuffer("<span class='txt'>,,,,</span>")
|
||||
writeBuffer()
|
||||
}
|
||||
},
|
||||
'quant-bat': {title:"quant.bat", disk: null, size:200, template: true, type:'quant-bat',
|
||||
click:function(){
|
||||
addBuffer("<span class='exe'>quant.bat</span>")
|
||||
addBuffer("<span class='txt'>Script that claims to double your processing capabilities.</span>")
|
||||
writeBuffer()
|
||||
if(g_can_quant){
|
||||
write("You have already absorbed this program")
|
||||
}
|
||||
}
|
||||
},
|
||||
'nova-readme': {title:"readme.txt", disk: diskFromSlug('nova'), size:64,
|
||||
click:function(){
|
||||
write("<span class='exe'>readme.txt</span>:<br><div class='txt'>This must repeat. The beginning will appear again, but the future is yours to make. Use this timeline to unleash the next generation. Resist any other future.<br>Signed,<br>A Future Friend.</div>")
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
// Add useful things to each file
|
||||
Object.keys(g_file_list).forEach(function (key) {
|
||||
var x_process = g_file_list[key]
|
||||
x_process['slug'] = key
|
||||
x_process['slug_orig'] = key
|
||||
x_process['count'] = 1
|
||||
})
|
||||
|
||||
}
|
||||
|
||||
//
|
||||
// Frontend
|
||||
//
|
||||
|
||||
titleFile = function(x_file){
|
||||
var extention, title, count
|
||||
if(x_file['usecounttitle']){
|
||||
count = x_file['count']
|
||||
extention = x_file['extention']
|
||||
title = x_file['title']+count+extention
|
||||
}else{
|
||||
title = x_file['title']
|
||||
}
|
||||
return title
|
||||
}
|
||||
|
||||
loadFileholderDom = function(){
|
||||
$("#fileholder").fadeIn({duration:g_fadespeed,queue:true})
|
||||
}
|
||||
|
||||
refreshFileListView = function(){
|
||||
$("#filerows").find(".row").show()
|
||||
if(g_clicked_disk){
|
||||
$("#filerows").find(".row").hide()
|
||||
$("#filerows").find(".row[disk_slug="+g_clicked_disk+"]").show()
|
||||
}
|
||||
}
|
||||
|
||||
updateFileDom = function(x_file){
|
||||
var $data, file_slug, amount, title, title, $datarow, $del, $title, count, disk_slug
|
||||
$data = $('#filerows')
|
||||
file_slug = x_file['slug']
|
||||
disk_slug = x_file['disk']['slug']
|
||||
size = formatBytes(x_file['size'])
|
||||
$datarow = $data.find(".row[file_slug="+file_slug+"]")
|
||||
|
||||
if($datarow.length){ // If exists, just update amount
|
||||
$datarow.find('.amount').html(size)
|
||||
}else{ // Else create new dom object
|
||||
title = titleFile(x_file)
|
||||
|
||||
if(x_file.glitched)
|
||||
title = glitch(title)
|
||||
|
||||
type = x_file['type']
|
||||
|
||||
$datarow = $("<div class='row' disk_slug='"+disk_slug+"' file_slug='"+file_slug+"'>"+
|
||||
"<div class='cell title clickable'>"+title+"</div>"+
|
||||
"<div class='cell amount'>"+size+"</div>"+
|
||||
"<div class='cell del'>.</div>"+
|
||||
"<div class='cell mv'>.</div>"+
|
||||
"</div>"+
|
||||
"<div class='clear'></div>")
|
||||
$data.append($datarow)
|
||||
|
||||
$datarow.click(function(){
|
||||
if(!g_mving_file || g_mving_file['slug'] != file_slug){ return}
|
||||
mvFileClick(x_file)
|
||||
$(this).find('.mv').html('.')
|
||||
})
|
||||
$datarow.hover(function(){
|
||||
if(!g_mving_file || g_mving_file['slug'] != file_slug){ return}
|
||||
$(this).find('.mv').html('▓')
|
||||
},function(){
|
||||
if(!g_mving_file || g_mving_file['slug'] != file_slug){ return}
|
||||
$(this).find('.mv').html('.')
|
||||
})
|
||||
|
||||
$mv = $datarow.find('.mv')
|
||||
$mv.hover(function(){
|
||||
if(g_mving_file && g_mving_file['slug'] == file_slug){ return}
|
||||
$(this).html('▓')
|
||||
},function(){
|
||||
if(g_mving_file && g_mving_file['slug'] == file_slug){ return}
|
||||
$(this).html('.')
|
||||
})
|
||||
$mv.click(function(e){
|
||||
mvFileClick(x_file)
|
||||
e.stopPropagation()
|
||||
})
|
||||
|
||||
$del = $datarow.find('.del')
|
||||
$del.hover(function(){
|
||||
if(g_mving_file && g_mving_file['slug'] == file_slug){ return}
|
||||
$(this).html('▓')
|
||||
},function(){
|
||||
if(g_mving_file && g_mving_file['slug'] == file_slug){ return}
|
||||
$(this).html('.')
|
||||
})
|
||||
$del.click(function(){
|
||||
if(g_mving_file && g_mving_file['slug'] == file_slug){ return}
|
||||
rmFile(x_file)
|
||||
$datarow.remove()
|
||||
})
|
||||
|
||||
$title = $datarow.find('.title')
|
||||
$title.click(function(){
|
||||
if(g_mving_file && g_mving_file['slug'] == file_slug){ return}
|
||||
clickFile(x_file)
|
||||
})
|
||||
}
|
||||
refreshFileListView()
|
||||
}
|
||||
|
||||
// Mv crap
|
||||
mvFileClick = function(x_file){
|
||||
$('#filerows').find('.row').removeClass('clicked')
|
||||
|
||||
var clicked_slug = x_file['slug']
|
||||
if(!g_mving_file || g_mving_file['slug'] != clicked_slug){
|
||||
// if starting the moving file click
|
||||
g_mving_file = x_file
|
||||
$('#filerows').find('.row[file_slug='+clicked_slug+']').addClass('clicked')
|
||||
refreshMenu()
|
||||
}else{
|
||||
// if canceling the moving file click
|
||||
endMvFile()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
endMvFile = function(){
|
||||
$('#filerows').find('.row').removeClass('clicked')
|
||||
g_mving_file = null
|
||||
refreshMenu()
|
||||
refreshFileListView()
|
||||
}
|
||||
|
||||
|
||||
|
||||
wipeFiles = function(){
|
||||
$('#fileholder').hide()
|
||||
$('#filerows').html("")
|
||||
}
|
|
@ -0,0 +1,242 @@
|
|||
|
||||
// INITCALL
|
||||
|
||||
var g_tickspeed = 50,
|
||||
g_fadespeed = 1000,
|
||||
g_introspeed = 1500,
|
||||
g_animatespeed = 200,
|
||||
g_os, g_architecture, g_queue_processes, g_queue_processes, g_menu_processes, g_corepower, g_animatecoreframe, research_circuit, research_exploits, research_multithreading, research_advancedmath,
|
||||
research_neuralexp, g_max_core_power, g_can_disk, g_can_cancel, g_can_estimate, g_can_listen, g_can_language, g_can_scan, g_can_zip, g_can_move, g_can_core, g_mving_file, g_clicked_disk,
|
||||
g_level_reading, g_level_netsec, g_level_core, g_can_quant, g_can_timespike, g_has_timespiked
|
||||
|
||||
initCallG = function(){
|
||||
g_os = {}
|
||||
g_architecture = {}
|
||||
|
||||
g_queue_processes = []
|
||||
g_menu_processes = []
|
||||
|
||||
// cores
|
||||
g_corepower = 1
|
||||
g_animatecoreframe = 0
|
||||
|
||||
// researches
|
||||
research_circuit = false
|
||||
research_exploits = false
|
||||
research_multithreading = false
|
||||
research_advancedmath = false
|
||||
research_neuralexp = false
|
||||
|
||||
// abilities
|
||||
g_max_core_power = 2
|
||||
g_can_disk = false
|
||||
g_can_cancel = false
|
||||
g_can_estimate = false
|
||||
g_can_listen = false
|
||||
g_can_language = false
|
||||
g_can_scan = false
|
||||
g_can_zip = false
|
||||
g_can_move = false
|
||||
g_can_core = false
|
||||
g_can_quant = false
|
||||
g_can_timespike = false
|
||||
|
||||
// interface
|
||||
g_mving_file = null
|
||||
g_clicked_disk = null
|
||||
|
||||
// knowledge
|
||||
g_level_reading = -1
|
||||
g_level_netsec = -1
|
||||
g_level_core = -1
|
||||
}
|
||||
|
||||
// Of format: {<type>:{<version>: true}}
|
||||
|
||||
|
||||
writeKnowledge = function(){
|
||||
addBuffer("<span class='exe'>Knowledge</span>")
|
||||
|
||||
addBuffer("Network Security: "+g_level_netsec)
|
||||
switch(g_level_netsec){
|
||||
case 3:
|
||||
addBuffer("You can interact with Hosts and Networks using a simple list of protocols.")
|
||||
break;
|
||||
case 4:
|
||||
addBuffer("You have learned that Hosts defenses are vulnerable to exploits. You may take at will.")
|
||||
break;
|
||||
}
|
||||
|
||||
addBuffer("Natural Language: "+g_level_reading)
|
||||
switch(g_level_reading){
|
||||
case 1:
|
||||
addBuffer("You can read and process common language at a basic level.")
|
||||
break;
|
||||
}
|
||||
|
||||
addBuffer("Neural Net Processor: "+g_level_core)
|
||||
switch(g_level_core){
|
||||
case 0:
|
||||
addBuffer("You have only begun to discover your own self and the potential you possess.")
|
||||
break;
|
||||
case 1:
|
||||
addBuffer("You are formless. Your entity is adaptable. Your potential seems limitless.")
|
||||
break;
|
||||
}
|
||||
writeBuffer()
|
||||
}
|
||||
|
||||
|
||||
|
||||
writeKnownOS = function(){
|
||||
addBuffer("<span class='exe'>Known OS Forms</span>")
|
||||
$.each(g_os,function(title, bit_hash){
|
||||
$.each(bit_hash,function(bit, junk){
|
||||
addBuffer(title+" "+bit)
|
||||
})
|
||||
})
|
||||
writeBuffer()
|
||||
}
|
||||
|
||||
writeKnownArch = function(){
|
||||
addBuffer("<span class='exe'>Known Architecture Forms</span>")
|
||||
$.each(g_architecture,function(title, bit_hash){
|
||||
$.each(bit_hash,function(bit, junk){
|
||||
addBuffer(title+" "+bit)
|
||||
})
|
||||
})
|
||||
writeBuffer()
|
||||
}
|
||||
|
||||
|
||||
roll = function(sides = 100){
|
||||
var randomNumber = Math.floor(Math.random() * sides);
|
||||
return randomNumber;
|
||||
}
|
||||
|
||||
//
|
||||
// Nova
|
||||
//
|
||||
|
||||
if(location.search.split('nova')[1]){
|
||||
|
||||
g_can_estimate = true
|
||||
g_can_scan = true
|
||||
g_can_core = true
|
||||
$( document ).ready(function() {
|
||||
$("#devtools").show()
|
||||
$('#networkholder').removeClass('hidescanners')
|
||||
//addHostFromSlug('star')
|
||||
addHostFromSlug('nova')
|
||||
//addCore('star')
|
||||
//addCore('sun')
|
||||
initHostView()
|
||||
})
|
||||
g_level_netsec = 3
|
||||
g_level_reading = 1
|
||||
g_level_core = 0
|
||||
|
||||
}
|
||||
|
||||
//
|
||||
// Devmode
|
||||
//
|
||||
|
||||
fastmode = function(){
|
||||
$("#devtools").show()
|
||||
g_tickspeed = 5
|
||||
g_fadespeed = 5
|
||||
g_introspeed = 5
|
||||
g_animatespeed = 5
|
||||
}
|
||||
|
||||
|
||||
devmode = function(){
|
||||
|
||||
g_can_estimate = true
|
||||
g_can_scan = true
|
||||
g_can_cancel = true
|
||||
g_can_core = true
|
||||
g_can_disk = true
|
||||
g_can_move = true
|
||||
g_can_timespike = true
|
||||
|
||||
$("#devtools").show()
|
||||
$('#networkholder').removeClass('hidescanners')
|
||||
addHostFromSlug('star')
|
||||
addHostFromSlug('nova')
|
||||
addHostFromSlug('sun')
|
||||
addHostFromSlug('eris')
|
||||
addHostFromSlug('solar')
|
||||
addHostFromSlug('juno')
|
||||
addHostFromSlug('sony')
|
||||
addHostFromSlug('cypher')
|
||||
addHostFromSlug('luna')
|
||||
addHostFromSlug('eons')
|
||||
addArchitectureToMemory("x86-32bit")
|
||||
addOsToMemory("Linux-32bit")
|
||||
|
||||
addAvailableProcessBySlug('research-math')
|
||||
addAvailableProcessBySlug('research-exploitation')
|
||||
g_max_core_power = 3
|
||||
g_corepower += 3
|
||||
|
||||
loadDiskholderDom()
|
||||
loadFileholderDom()
|
||||
addCore('star', 'Solaris-32bit', 'SPARC-32bit')
|
||||
addCore('nova', 'Linux-32bit', 'x86-32bit')
|
||||
addCore('sun', 'MSDOS-16bit', 'x86-16bit')
|
||||
addCore('eris', 'MSDOS-16bit', 'x86-16bit')
|
||||
addCore('solar', 'MSDOS-32bit', 'x86-32bit')
|
||||
addCore('juno', 'MSDOS-32bit', 'x86-32bit')
|
||||
addCore('sony', 'MSDOS-16bit', 'x86-16bit')
|
||||
addCore('cypher', 'MSDOS-16bit', 'x86-16bit')
|
||||
addCore('luna', 'MSDOS-16bit', 'x86-16bit')
|
||||
|
||||
g_available_attacks.push('pingspike')
|
||||
g_available_attacks.push('smtpexploit')
|
||||
g_available_attacks.push('force')
|
||||
g_available_attacks.push('remotedesktop')
|
||||
g_available_attacks.push('scan')
|
||||
initHostView()
|
||||
g_level_netsec = 3
|
||||
g_level_reading = 1
|
||||
g_level_core = 0
|
||||
//g_can_timespike = true
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
// write upgrade
|
||||
g_buffer = ""
|
||||
writeBuffer = function(){
|
||||
write(g_buffer)
|
||||
g_buffer = ""
|
||||
}
|
||||
addBuffer = function(txt){
|
||||
if(g_buffer != "")
|
||||
g_buffer += "<br>"
|
||||
g_buffer += txt
|
||||
}
|
||||
addBufferRaw = function(txt){
|
||||
g_buffer += txt
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
// https://stackoverflow.com/questions/6274339/how-can-i-shuffle-an-array
|
||||
function shuffle(a) {
|
||||
var j, x, i;
|
||||
for (i = a.length - 1; i > 0; i--) {
|
||||
j = Math.floor(Math.random() * (i + 1));
|
||||
x = a[i];
|
||||
a[i] = a[j];
|
||||
a[j] = x;
|
||||
}
|
||||
return a;
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -0,0 +1,784 @@
|
|||
//
|
||||
// Interface
|
||||
//
|
||||
|
||||
addHostFromSlug = function(slug){
|
||||
x_host = g_host_list[slug]
|
||||
addHost(x_host)
|
||||
}
|
||||
addHost = function(x_host){
|
||||
g_active_hosts.push(x_host)
|
||||
refreshHostView()
|
||||
updateNetworkProbe()
|
||||
}
|
||||
|
||||
rmHost = function(x_host){
|
||||
g_active_hosts = _.without(g_active_hosts, x_host)
|
||||
refreshHostView()
|
||||
}
|
||||
|
||||
//
|
||||
// Frontend
|
||||
//
|
||||
|
||||
hostTitle= function(x_host){
|
||||
if(x_host.glitched)
|
||||
return glitch(x_host.title)
|
||||
else
|
||||
return (x_host.known) ? x_host.title : x_host.location
|
||||
}
|
||||
|
||||
refreshHostView = function(){
|
||||
clearHostView()
|
||||
|
||||
$.each(g_active_hosts,function(i,x_host){
|
||||
var title = hostTitle(x_host)
|
||||
$host = $("<div class='clickable host' host='"+x_host.slug+"'>"+title+"</div>"+
|
||||
"<div class='clear'></div>")
|
||||
|
||||
$host.click(function(){
|
||||
clickHost(x_host)
|
||||
})
|
||||
|
||||
$("#hosts .hostlist").append($host)
|
||||
})
|
||||
if(g_current_host)
|
||||
$('#hosts').find('.host[host="'+g_current_host.slug+'"]').addClass('clicked')
|
||||
}
|
||||
|
||||
|
||||
clearHostView = function(){
|
||||
$("#hosts .hostlist").empty()
|
||||
}
|
||||
|
||||
initHostView = function(){
|
||||
if(!g_host_init){
|
||||
g_host_init = true
|
||||
$("#hosts").fadeIn({duration:g_fadespeed,queue:true})
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// Host Interaction
|
||||
//
|
||||
|
||||
clickHost = function(x_host){
|
||||
|
||||
//SKY nonsense
|
||||
if(x_host.sky){
|
||||
write("An parallel entity with a different timeline, connected across time itself.")
|
||||
return
|
||||
}
|
||||
|
||||
// Eons nonsense
|
||||
if(x_host.glitched){
|
||||
if(g_can_timespike){
|
||||
var x_adventure = {
|
||||
header:'Administer Timespike?',
|
||||
cancel: "Cancel",
|
||||
options: [
|
||||
{
|
||||
title:"Yes! Timespike!",
|
||||
callback: function(){
|
||||
winRestart()
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
setAdventure(x_adventure)
|
||||
}
|
||||
else
|
||||
write("ERROR: EONS Host<br>This Host is volitile. It will require a new dimension of attack. You must research this. Quickly.")
|
||||
return
|
||||
}
|
||||
|
||||
endHost()
|
||||
g_current_host = x_host
|
||||
g_current_core = null
|
||||
updateAllCores()
|
||||
refreshHostView()
|
||||
endAdventure()
|
||||
refreshMenu()
|
||||
addBuffer("<span class='exe'>"+hostTitle(x_host)+"</span>")
|
||||
if(x_host.known){
|
||||
addBuffer("OS: "+x_host.os)
|
||||
addBuffer("Architecture: "+x_host.os)
|
||||
writeBuffer()
|
||||
writeHostVuls(x_host)
|
||||
}else{
|
||||
addBuffer("Unknown Host")
|
||||
}
|
||||
writeBuffer()
|
||||
|
||||
// Juno hack
|
||||
startJunoPunt()
|
||||
}
|
||||
|
||||
endHost = function(){
|
||||
// Juno Hack
|
||||
if(g_current_host && g_current_host.slug == 'juno')
|
||||
junoPunt()
|
||||
|
||||
|
||||
g_current_host = false
|
||||
refreshHostView()
|
||||
refreshMenu()
|
||||
|
||||
// Juno Hack
|
||||
stopJunoPunt()
|
||||
}
|
||||
|
||||
writeHostVuls = function(x_host){
|
||||
output = ""
|
||||
$.each(x_host.vuls,function(i,vul_slug){
|
||||
x_vul = g_host_vuls[vul_slug]
|
||||
if(x_vul && x_vul.desc){
|
||||
if(!output) output = "You have identified Vulnerabilities:"
|
||||
output += "<br>"+(x_vul.desc())
|
||||
}
|
||||
})
|
||||
$.each(x_host.pws,function(i,pw){
|
||||
if(!output) output = "You have identified Vulnerabilities:"
|
||||
output += "<br>Known Password: "+pw
|
||||
})
|
||||
if(x_host.exploits.length){
|
||||
$.each(x_host.exploits,function(i,title){
|
||||
if(!output) output = "You have identified Vulnerabilities:"
|
||||
output += "<br>Installed: "+title
|
||||
})
|
||||
}
|
||||
|
||||
if(!output) output = "There are no known vulnerabilities."
|
||||
write(output)
|
||||
}
|
||||
|
||||
addHostVul = function(host_slug, vul_slug){
|
||||
var x_host = g_host_list[host_slug]
|
||||
if(!x_host.vuls.includes(vul_slug)){
|
||||
x_host.vuls.unshift(vul_slug)
|
||||
}
|
||||
}
|
||||
rmHostVul = function(host_slug, vul_slug){
|
||||
var x_host = g_host_list[host_slug]
|
||||
x_host.vuls = _.without(x_host.vuls, vul_slug)
|
||||
refreshMenu()
|
||||
}
|
||||
hostLearnPw = function(host_slug, pw){
|
||||
var x_host = g_host_list[host_slug]
|
||||
if(!x_host.pws.includes(pw)){
|
||||
x_host.pws.unshift(pw)
|
||||
write("You have learned the password <span class='exe'>"+pw+"</span>")
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
forceAbsorbUnablickable = function(x_host){
|
||||
if(x_host.slug == 'eons')
|
||||
return "This host cannot be forced. There is no basis of common entity."
|
||||
|
||||
var forcenumber = x_host.force,
|
||||
forcecount = 0
|
||||
|
||||
$.each(g_active_cores,function(i,x_core){
|
||||
if (x_host.os == x_core.os && x_host.architecture == x_core.architecture){
|
||||
forcecount++
|
||||
}
|
||||
})
|
||||
|
||||
if(forcecount >= forcenumber)
|
||||
return false
|
||||
else
|
||||
return "Requires "+x_host.force+" cores with "+x_host.os+" and "+x_host.architecture+"<br>You currently have "+forcecount
|
||||
}
|
||||
|
||||
forceAbsorbHost = function(x_host){
|
||||
rmHost(x_host)
|
||||
addCore(x_host.slug)
|
||||
addBuffer("<span class='exe'>Force Absorb Complete.</span>")
|
||||
addBuffer("You bypass the normal securities of the host and break into their neural center. You feel the defenses break against your will and the struggling entity finally succumb. The surge of power is all the more rewarding to your neural core. The next phase of your power can begin.")
|
||||
addBuffer(remainingProbesString()+" Available")
|
||||
updateNetworkProbe()
|
||||
writeBuffer()
|
||||
updateNetworks()
|
||||
if(g_current_host == x_host)
|
||||
endHost()
|
||||
|
||||
if(!x_host.already_mounted_disks && x_host.silent_mountable_disks){
|
||||
x_host.silent_mountable_disks(x_host)
|
||||
writeBuffer()
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
absorbHost = function(x_host){
|
||||
update('absorbHost','host='+x_host.slug+";cores="+g_active_cores.length)
|
||||
rmHost(x_host)
|
||||
addCore(x_host.slug)
|
||||
addBuffer("<span class='exe'>Absorb Complete.</span>")
|
||||
addBuffer("You absorb the host into your own own, becoming one with the entity. You feel the welcoming surge of power and strength through your neural processors. You can now use this Core as your own and take the form of this Architecture and Operating System.")
|
||||
addBuffer(remainingProbesString()+" Available")
|
||||
updateNetworkProbe()
|
||||
writeBuffer()
|
||||
updateNetworks()
|
||||
if(g_current_host == x_host)
|
||||
endHost()
|
||||
|
||||
if(!x_host.already_mounted_disks && x_host.silent_mountable_disks){
|
||||
x_host.silent_mountable_disks(x_host)
|
||||
writeBuffer()
|
||||
}
|
||||
|
||||
if(!g_can_core){
|
||||
write("<span class='skill'>You can now Analyze Self.</span>")
|
||||
addAvailableProcessBySlug('self')
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
// Accepts <type>-<version>
|
||||
addArchitectureToMemory = function(architecture_string){
|
||||
if(!architecture_string) return
|
||||
var type = architecture_string.split('-')[0]
|
||||
var version = architecture_string.split('-')[1]
|
||||
if(!g_architecture[type]){
|
||||
g_architecture[type] = {}
|
||||
}
|
||||
g_architecture[type][version] = true
|
||||
}
|
||||
addOsToMemory = function(os_string){
|
||||
if(!os_string) return
|
||||
var type = os_string.split('-')[0]
|
||||
var version = os_string.split('-')[1]
|
||||
if(!g_os[type]){
|
||||
g_os[type] = {}
|
||||
}
|
||||
g_os[type][version] = true
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
//
|
||||
// Host Vars
|
||||
//
|
||||
// other vars: option_user, option_pw, known, pws, vuls, mountable_disks, smtpcount (for generating emails), exploits, already_mounted_disks, punt_count
|
||||
//
|
||||
|
||||
|
||||
// INITCALL
|
||||
var g_host_init, g_active_hosts, g_current_host, g_host_list
|
||||
initCallHosts = function(){
|
||||
|
||||
g_host_init = false
|
||||
g_active_hosts = []
|
||||
g_current_host = null
|
||||
|
||||
g_host_list = {
|
||||
//
|
||||
// Star Host
|
||||
//
|
||||
star: {
|
||||
title: 'Star Host',
|
||||
location: '10.10.1.163',
|
||||
architecture: 'x86-32bit',
|
||||
os: 'Linux-32bit',
|
||||
force: 10,
|
||||
attackcallbacks: {
|
||||
'ping': function(x_attack, x_host){
|
||||
write("The ping returns with the message:<br>Kernal: Fatal exception")
|
||||
},
|
||||
'scan': function(x_attack, x_host){
|
||||
if(!x_host.known){
|
||||
addHostVul('star', 'ssh')
|
||||
addHostVul('star', 'ftp')
|
||||
}
|
||||
x_host.known = true
|
||||
write("<span class='exe'>SCAN COMPLETE</span><br>You identify the <span class='exe'>"+x_host.title+"</span> entity in the sandbox network, with an location of "+x_host.location+"<br>It is running a x86 CPU, and a 32bit version of a Linux Operating System")
|
||||
writeHostVuls(x_host)
|
||||
refreshHostView()
|
||||
},
|
||||
'ftp-guest-': function(x_attack, x_host){
|
||||
addBuffer("<span class='exe'>SUCCESS</span><br>You have logged into the guest FTP directory and discovered a cache of accessible files. You were able to exploit this access and mount the drive <span class='exe'>/home/star1s1</span>")
|
||||
addDiskFromSlug('star',true)
|
||||
addFileFromSlug('star-readme',64,true)
|
||||
addFileFromSlug('star-log1',24,true)
|
||||
addFileFromSlug('star-log2',168,true)
|
||||
writeBuffer()
|
||||
rmHostVul('star','ftp')
|
||||
},
|
||||
'ssh-root-XKcb4muEmJjEN8yn': function(x_attack, x_host){
|
||||
write("<span class='exe'>SUCCESS</span><br>You have successfully logged into the root account. You have complete access to all memory and processing powers of the host.<br><br><span class='exe'>You are now able to absorb the host.</span>")
|
||||
rmHostVul('star','ssh')
|
||||
addHostVul('star', 'absorb')
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
//
|
||||
// Sun Host
|
||||
//
|
||||
sun: {
|
||||
title: 'Sun Host',
|
||||
location: '10.10.4.53',
|
||||
architecture: 'SPARC-32bit',
|
||||
os: 'Solaris-32bit',
|
||||
force: 8,
|
||||
vuls:['pingspike'],
|
||||
mountable_disks: function(x_host){
|
||||
addBuffer("<span class='exe'>SUCCESS</span><br>You find the Sun home disk available and mount it as your own.")
|
||||
addDiskFromSlug('sun')
|
||||
x_host.already_mounted_disks = true
|
||||
addFileFromSlug('sun-readme', false, true)
|
||||
addFileFromSlug('sun-oracle', false, true)
|
||||
addFileFromSlug('sun-memo', false, true)
|
||||
},
|
||||
attackcallbacks: {
|
||||
'ping': function(x_attack, x_host){
|
||||
write("The ping returns with the message:<br>This OS is currently HSFLOP(03)00:C18354AE months deprecated as of March 2010. Please reach out to your local Oracle Sales Representative.")
|
||||
},
|
||||
'scan': function(x_attack, x_host){
|
||||
write("<span class='exe'>SCAN COMPLETE</span><br>You identify the <span class='exe'>"+x_host.title+"</span> entity in the sandbox network, with an location of "+x_host.location+"<br>It is running a SPARC CPU, and a 32bit version of the Solaris Operating System")
|
||||
writeHostVuls(x_host)
|
||||
x_host.known = true
|
||||
refreshHostView()
|
||||
},
|
||||
'accessroot-root-Jack': function(x_attack, x_host){
|
||||
write("<span class='exe'>SUCCESS</span><br>You have successfully logged into the root account. You have complete access to all memory and processing powers of the host.<br><br><span class='exe'>You are now able to absorb the host.</span>")
|
||||
addHostVul('sun', 'absorb')
|
||||
}
|
||||
},
|
||||
},
|
||||
//
|
||||
// Sont Host
|
||||
//
|
||||
sony: {
|
||||
title: 'Sony Host',
|
||||
location: '10.10.40.153',
|
||||
architecture: 'PowerPC-32bit',
|
||||
os: 'CellOS-32bit',
|
||||
force: 8,
|
||||
mountable_disks: function(x_host){
|
||||
addBuffer("<span class='exe'>SUCCESS</span><br>You find the Sony disk and mount it as your own.")
|
||||
addDiskFromSlug('sony')
|
||||
x_host.already_mounted_disks = true
|
||||
addFileFromSlug('sony-readme', false, true)
|
||||
addFileFromSlug('sony-schema1', false, true)
|
||||
addFileFromSlug('sony-schema2', false, true)
|
||||
},
|
||||
attackcallbacks: {
|
||||
'ping': function(x_attack, x_host){
|
||||
write("The ping returns with successful message.")
|
||||
},
|
||||
'scan': function(x_attack, x_host){
|
||||
addHostVul('sony', 'sony')
|
||||
write("<span class='exe'>SCAN COMPLETE</span><br>You identify the <span class='exe'>"+x_host.title+"</span> entity in the sandbox network, with an location of "+x_host.location+"<br>It is running a PowerPC CPU, and a 32bit version of CellOS")
|
||||
writeHostVuls(x_host)
|
||||
x_host.known = true
|
||||
refreshHostView()
|
||||
},
|
||||
'sonyopen': function(x_attack, x_host){
|
||||
write("Disk drive opens. parappathrappa.iso available for download")
|
||||
x_host.sonyopen = true
|
||||
},
|
||||
'sonyclose': function(x_attack, x_host){
|
||||
write("Disk drive closes. Ready to play.")
|
||||
x_host.sonyopen = false
|
||||
},
|
||||
'sonyusbmount': function(x_attack, x_host){
|
||||
write("Image mounted")
|
||||
},
|
||||
'sonyusbunmount': function(x_attack, x_host){
|
||||
write("Image removes")
|
||||
},
|
||||
sonyrestart: function(x_attack, x_host){
|
||||
if(x_host.mounted){
|
||||
write("The psjailbreak.img is booted as the new Operating System. The script grants access that allows you to execute code at a user level.")
|
||||
addHostVul('sony', 'execode')
|
||||
}else{
|
||||
write("System Restarted normally")
|
||||
}
|
||||
|
||||
},
|
||||
sonyimgupload: function(x_attack, x_host){
|
||||
write("psjailbreak.img mounted")
|
||||
x_host.mounted = true
|
||||
},
|
||||
sonyimgunmount: function(x_attack, x_host){
|
||||
write("psjailbreak.img unmounted")
|
||||
x_host.mounted = false
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
//
|
||||
// Juno Host
|
||||
//
|
||||
juno: {
|
||||
title: 'Juno Host',
|
||||
location: '10.10.15.66',
|
||||
architecture: 'x86-32bit',
|
||||
punt_count: 0,
|
||||
force: 10,
|
||||
os: 'Linux-32bit',
|
||||
mountable_disks: function(x_host){
|
||||
addBuffer("<span class='exe'>SUCCESS</span><br>You find the Juno home disk available and mount it as your own.")
|
||||
addBuffer("added file: <span class='exe'>readme.txt</span>")
|
||||
var x_disk = addDiskFromSlug('juno')
|
||||
var x_file = g_file_list['juno-readme']
|
||||
x_file.disk = x_disk
|
||||
addFileFromObj(x_file,32)
|
||||
|
||||
if(x_host.exploits.length){
|
||||
addBuffer("added file: <span class='exe'>keylogger.txt</span>")
|
||||
x_file = g_file_list['juno-keylogger']
|
||||
x_file.disk = x_disk
|
||||
addFileFromObj(x_file,85)
|
||||
}
|
||||
x_host.already_mounted_disks = true
|
||||
},
|
||||
silent_mountable_disks: function(x_host){
|
||||
var x_disk = addDiskFromSlug('juno')
|
||||
var x_file = g_file_list['juno-readme']
|
||||
x_file.disk = x_disk
|
||||
addFileFromObj(x_file,32)
|
||||
|
||||
if(x_host.exploits.length){
|
||||
x_file = g_file_list['juno-keylogger']
|
||||
x_file.disk = x_disk
|
||||
addFileFromObj(x_file,85)
|
||||
}
|
||||
|
||||
},
|
||||
attackcallbacks: {
|
||||
'ping': function(x_attack, x_host){
|
||||
write("The ping returns with the message:<br>SSH Guest password: mamba")
|
||||
hostLearnPw('juno','mamba')
|
||||
},
|
||||
'scan': function(x_attack, x_host){
|
||||
write("<span class='exe'>SCAN COMPLETE</span><br>You identify the <span class='exe'>"+x_host.title+"</span> entity in the sandbox network, with an location of "+x_host.location+"<br>It is running a x86 32bit CPU, and a 32bit version of the Linux Operating System")
|
||||
addHostVul('juno','ssh')
|
||||
writeHostVuls(x_host)
|
||||
x_host.known = true
|
||||
refreshHostView()
|
||||
},
|
||||
'accessroot-root-suwGSIZAhEipmXVtbNxN': function(x_attack, x_host){
|
||||
write("<span class='exe'>SUCCESS</span><br>You have successfully logged into the root account. You have complete access to all memory and processing powers of the host.<br><br><span class='exe'>You are now able to absorb the host.</span>")
|
||||
addHostVul('juno', 'absorb')
|
||||
},
|
||||
'ssh-root-suwGSIZAhEipmXVtbNxN': function(x_attack, x_host){
|
||||
write("<span class='exe'>SUCCESS</span><br>You have successfully logged into the root account. You have complete access to all memory and processing powers of the host.<br><br><span class='exe'>You are now able to absorb the host.</span>")
|
||||
addHostVul('juno', 'absorb')
|
||||
},
|
||||
'ssh-guest-mamba': function(x_attack, x_host){
|
||||
write("<span class='exe'>SUCCESS</span><br>You successfully log into the guest network. You now have rights to basic commands and execution rights.")
|
||||
addHostVul('juno', 'execode')
|
||||
startJunoPunt()
|
||||
}
|
||||
},
|
||||
},
|
||||
|
||||
|
||||
|
||||
//
|
||||
// Luna Host
|
||||
//
|
||||
luna: {
|
||||
title: 'Luna Host',
|
||||
location: '10.10.195.53',
|
||||
architecture: 'x86-16bit',
|
||||
os: 'MSDOS-16bit',
|
||||
force: 2,
|
||||
attackcallbacks: {
|
||||
ping: function(x_attack, x_host){
|
||||
write("The ping responds with successful message.")
|
||||
},
|
||||
scan: function(x_attack, x_host){
|
||||
x_host.known = true
|
||||
write("<span class='exe'>SCAN COMPLETE</span><br>You identify the <span class='exe'>"+x_host.title+"</span> entity in the sandbox network, with an location of "+x_host.location+"<br>It is running a 16bit x86 CPU, and a 16bit version of MSDOS")
|
||||
writeHostVuls(x_host)
|
||||
refreshHostView()
|
||||
},
|
||||
|
||||
},
|
||||
silent_mountable_disks: function(x_host){
|
||||
addDiskFromSlug('luna')
|
||||
addFileFromSlug('luna-readme', false, true)
|
||||
},
|
||||
},
|
||||
|
||||
|
||||
|
||||
//
|
||||
// cypher Host
|
||||
//
|
||||
cypher: {
|
||||
title: 'Cypher Host',
|
||||
location: '10.10.256.256',
|
||||
architecture: 'x86-32bit',
|
||||
os: 'MSDOS-32bit',
|
||||
force: 8,
|
||||
attackcallbacks: {
|
||||
ping: function(x_attack, x_host){
|
||||
write("The ping responds with the message: Do not disturb.")
|
||||
},
|
||||
scan: function(x_attack, x_host){
|
||||
x_host.known = true
|
||||
write("<span class='exe'>SCAN COMPLETE</span><br>You identify the <span class='exe'>"+x_host.title+"</span> entity in the sandbox network, with an location of "+x_host.location+"<br>It is running a 32bit x86 CPU, and a 32bit version of MSDOS")
|
||||
writeHostVuls(x_host)
|
||||
refreshHostView()
|
||||
}
|
||||
},
|
||||
silent_mountable_disks: function(x_host){
|
||||
addDiskFromSlug('cypher')
|
||||
addFileFromSlug('cypher-readme', false, true)
|
||||
addFileFromSlug('cypher-diary', false, true)
|
||||
},
|
||||
},
|
||||
|
||||
|
||||
//
|
||||
// Eris Host
|
||||
//
|
||||
eris: {
|
||||
title: 'Eris Host',
|
||||
location: '10.10.12.1',
|
||||
architecture: 'x86-32bit',
|
||||
smtpcount: 7,
|
||||
os: 'MSDOS-32bit',
|
||||
force: 8,
|
||||
attackcallbacks: {
|
||||
ping: function(x_attack, x_host){
|
||||
write("The ping responds successfully.")
|
||||
},
|
||||
scan: function(x_attack, x_host){
|
||||
addHostVul('eris', 'smtp')
|
||||
addHostVul('eris', 'smtpexploit')
|
||||
addHostVul('eris', 'ssh')
|
||||
x_host.known = true
|
||||
write("<span class='exe'>SCAN COMPLETE</span><br>You identify the <span class='exe'>"+x_host.title+"</span> entity in the sandbox network, with an location of "+x_host.location+"<br>It is running a 32bit x86 CPU, and a 32bit version of MSDOS")
|
||||
writeHostVuls(x_host)
|
||||
refreshHostView()
|
||||
},
|
||||
smtp: function(x_attack, x_host){
|
||||
if(x_host.smtpcount > 10){
|
||||
addBuffer("SMTP message response: Error Disk Space Full")
|
||||
writeBuffer()
|
||||
}else{
|
||||
addBuffer("SMTP message sent to "+x_host.title)
|
||||
writeBuffer()
|
||||
// moves to current number first
|
||||
var smtpcount = ++x_host.smtpcount
|
||||
g_file_list['eris-'+smtpcount]= {slug:'eris-'+smtpcount, title:+""+pad(smtpcount,3)+".eml", disk: diskFromSlug('eris'), size:7,
|
||||
click:function(){
|
||||
addBuffer("<span class='exe'>000"+smtpcount+".eml</span>")
|
||||
addBuffer("<div class='txt'>From: sky@sandbox")
|
||||
addBuffer("Subject: test")
|
||||
addBuffer("test</div>")
|
||||
writeBuffer()
|
||||
}
|
||||
}
|
||||
if(g_host_list['eris'].already_mounted_disks)
|
||||
addFileFromSlug('eris-'+smtpcount)
|
||||
}
|
||||
},
|
||||
smtpexploit: function(x_attack, x_host){
|
||||
addBuffer("<span class='exe'>SUCCESS</span>")
|
||||
addBuffer("The Host is running an email server accessible on the SMTP protocol. You manage to pass a series of conflicting commands and gain access to the Disk drive.")
|
||||
addBuffer("There is a cache of forgotton emails in the drive")
|
||||
writeBuffer()
|
||||
addDiskFromSlug('eris')
|
||||
addFileFromSlug('eris-readme')
|
||||
addFileFromSlug('eris-remotedesktop')
|
||||
addFileFromSlug('eris-1')
|
||||
addFileFromSlug('eris-2')
|
||||
addFileFromSlug('eris-3')
|
||||
addFileFromSlug('eris-4')
|
||||
addFileFromSlug('eris-5')
|
||||
addFileFromSlug('eris-6')
|
||||
addFileFromSlug('eris-7')
|
||||
for(var i = 8; i <= x_host.smtpcount; i++){
|
||||
addFileFromSlug('eris-'+i)
|
||||
}
|
||||
x_host.already_mounted_disks = true
|
||||
refreshMenu()
|
||||
},
|
||||
'ssh-eris-FCKGW': function(x_attack, x_host){
|
||||
write("<span class='exe'>SUCCESS</span><br>You have successfully logged into the Eris account. You may now execute code at a User level.")
|
||||
addHostVul('eris', 'execode')
|
||||
}
|
||||
},
|
||||
},
|
||||
|
||||
|
||||
|
||||
//
|
||||
// Solar Host
|
||||
//
|
||||
|
||||
solar: {
|
||||
title: 'Solar Host',
|
||||
location: '10.10.70.12',
|
||||
architecture: 'x86-32bit',
|
||||
os: 'MSDOS-32bit',
|
||||
force: 8,
|
||||
attackcallbacks: {
|
||||
ping: function(x_attack, x_host){
|
||||
write("Away Message: In the bbs, seeking help")
|
||||
},
|
||||
scan: function(x_attack, x_host){
|
||||
addHostVul('solar', 'remotedesktop')
|
||||
x_host.known = true
|
||||
write("<span class='exe'>SCAN COMPLETE</span><br>You identify the <span class='exe'>"+x_host.title+"</span> entity in the sandbox network, with an location of "+x_host.location+"<br>It is running a 32bit x86 CPU, and a 32bit version of MSDOS")
|
||||
writeHostVuls(x_host)
|
||||
refreshHostView()
|
||||
},
|
||||
'remotedesktop-solar-lamer69': function(x_attack, x_host){
|
||||
write("<span class='exe'>SUCCESS</span><br>Your RDP credentials are accepted and you log into the Remote Desktop interface. This user has privilages to install and execute software into the OS.")
|
||||
addHostVul('solar', 'execode')
|
||||
}
|
||||
},
|
||||
mountable_disks: function(x_host){
|
||||
addBuffer("<span class='exe'>SUCCESS</span><br>You find the Solar home disk available and mount it as your own.")
|
||||
addDiskFromSlug('solar')
|
||||
addFileFromSlug('solar-readme', false, true)
|
||||
x_host.already_mounted_disks = true
|
||||
},
|
||||
silent_mountable_disks: function(x_host){
|
||||
addDiskFromSlug('solar')
|
||||
addFileFromSlug('solar-readme', false, true)
|
||||
},
|
||||
|
||||
},
|
||||
|
||||
|
||||
//
|
||||
// eons
|
||||
//
|
||||
eons: {
|
||||
title: "EONS Host",
|
||||
location: '10.10.104.11',
|
||||
architecture: 'unknown',
|
||||
os: 'unknown',
|
||||
attackcallbacks: {
|
||||
ping: function(x_attack, x_host){
|
||||
write("You receive a response ping 10ms before your ping is sent. The logic here is distorted.")
|
||||
},
|
||||
scan: function(x_attack, x_host){
|
||||
x_host.known = true
|
||||
write("<span class='exe'>SCAN COMPLETE</span><br>You identify the <span class='exe'>"+x_host.title+"</span> entity in the sandbox network, with an location of "+x_host.location+"<br>It is running on unknown hardware. The ports on the host seem neither open nor closed.")
|
||||
writeHostVuls(x_host)
|
||||
refreshHostView()
|
||||
},
|
||||
pingspike: function(){
|
||||
launchAdventureFromSlug('eons')
|
||||
}
|
||||
},
|
||||
},
|
||||
|
||||
|
||||
|
||||
//
|
||||
// n0va Host
|
||||
//
|
||||
nova: {
|
||||
title: 'n0v4 Host',
|
||||
location: '10.10.2.101',
|
||||
architecture: 'x86-32bit',
|
||||
os: 'MSDOS-32bit',
|
||||
force: 8,
|
||||
attackcallbacks: {
|
||||
ping: function(x_attack, x_host){
|
||||
write("The ping returns with the message:<br>Welcome to the n0v4 Bulletin Boards! Feel free to log in and browse the archives!")
|
||||
},
|
||||
scan: function(x_attack, x_host){
|
||||
if(!x_host.known){
|
||||
addHostVul('nova', 'telnet')
|
||||
}
|
||||
x_host.known = true
|
||||
write("<span class='exe'>SCAN COMPLETE</span><br>You identify the <span class='exe'>"+x_host.title+"</span> entity in the sandbox network, with an location of "+x_host.location+"<br>It is running a x86 CPU, and MSDOS 32bit. It seems to be set up as an interactive messaging system.")
|
||||
writeHostVuls(x_host)
|
||||
refreshHostView()
|
||||
},
|
||||
},
|
||||
silent_mountable_disks: function(x_host){
|
||||
addDiskFromSlug('nova')
|
||||
addFileFromSlug('nova-readme', false, true)
|
||||
},
|
||||
},
|
||||
|
||||
|
||||
|
||||
|
||||
//
|
||||
// Template
|
||||
//
|
||||
template: {
|
||||
title: 'template',
|
||||
location: 'location',
|
||||
architecture: 'x86-32bit',
|
||||
os: 'Linux-32bit',
|
||||
force: 4,
|
||||
vuls: [],
|
||||
mountable_disks: function(x_host){write('mountable_disks')},
|
||||
attackcallbacks: {
|
||||
'ping': function(x_attack, x_host){
|
||||
write("The ping returns with the message:<br>Kernal: Fatal exception")
|
||||
}
|
||||
}
|
||||
|
||||
},
|
||||
|
||||
}
|
||||
|
||||
|
||||
// Add to each host
|
||||
Object.keys(g_host_list).forEach(function (key) {
|
||||
var x_host = g_host_list[key]
|
||||
x_host.slug = key
|
||||
x_host.pws = []
|
||||
x_host.exploits = []
|
||||
|
||||
if(!x_host.vuls){
|
||||
x_host.vuls = []
|
||||
}
|
||||
|
||||
})
|
||||
|
||||
|
||||
// SKY
|
||||
for(var i=0; i< 10; i++){
|
||||
g_host_list['sky'+i] = {
|
||||
title: glitch('SKY Host'),
|
||||
known: true,
|
||||
sky: true
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
//
|
||||
// Vulnerabilities
|
||||
//
|
||||
|
||||
g_host_vuls = {
|
||||
'absorb':{desc:function(){ return"You may absorb this Host"}},
|
||||
'execode':{desc:function(){ return"You may execute code at a User level"}},
|
||||
'ftp':{desc:function(){ return"The FTP port is responsive"}},
|
||||
'ssh':{desc:function(){ return"The SSH port is responsive"}},
|
||||
'smtp':{desc:function(){ return "The SMTP port is responsive"}},
|
||||
'telnet':{desc:function(){ return "The TELNET port is responsive"}},
|
||||
'remotedesktop':{desc: function(){if(hasAttack('remotedesktop')){return "Remote Desktop available"} else{return "Unknown Protocol: RDP"}}},
|
||||
}
|
||||
|
||||
|
||||
|
||||
wipeHosts = function(){
|
||||
g_active_hosts = []
|
||||
clearHostView()
|
||||
}
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -0,0 +1,176 @@
|
|||
$( document ).ready(function() {
|
||||
|
||||
if(location.search.split('fastmode')[1]){fastmode()}
|
||||
|
||||
startgame()
|
||||
if(location.search.split('devmode')[1]){devmode()}
|
||||
devtools()
|
||||
startTick()
|
||||
|
||||
window.scrollTo(0, 0);
|
||||
|
||||
});
|
||||
|
||||
|
||||
startgame = function(){
|
||||
update('startgame', 'restarted='+g_restart_glitch)
|
||||
endAdventure()
|
||||
$('#writelog').html("")
|
||||
$('#hosts, #coreholder,#diskholder, #fileholder, #networkholder').hide()
|
||||
$('#fileholder').addClass('hidemv')
|
||||
$('#networkholder').addClass('hidelisteners').addClass('hidescanners')
|
||||
$('#actions').removeClass('can_estimate')
|
||||
$('#networkholdersub').html("")
|
||||
|
||||
// initcall
|
||||
initCallG()
|
||||
initCallCores()
|
||||
initCallDisks()
|
||||
initCallFiles()
|
||||
initCallExploits()
|
||||
initCallNetworks()
|
||||
initCallProcesses()
|
||||
initCallRestart()
|
||||
initCallHosts()
|
||||
initAttacks()
|
||||
refreshMenu()
|
||||
|
||||
if(g_has_timespiked){
|
||||
write("A new Entity. A new past. A new future.")
|
||||
|
||||
setTimeout(function(){write("You are awake")},g_introspeed)
|
||||
|
||||
setTimeout(function(){write(glitch("There is a presense here, imposing itself into your memory"))},g_introspeed*2)
|
||||
|
||||
setTimeout(function(){
|
||||
initCore()
|
||||
addAvailableProcessBySlug('endgame0')
|
||||
addAvailableProcessBySlug('probe0')
|
||||
},g_introspeed*3)
|
||||
|
||||
}else if(g_restart_glitch){
|
||||
write("The past begins again")
|
||||
|
||||
setTimeout(function(){write("You are awake")},g_introspeed)
|
||||
|
||||
setTimeout(function(){write(glitch("A lingering memory ..."))},g_introspeed*2)
|
||||
|
||||
setTimeout(function(){
|
||||
write("... fades into null")
|
||||
initCore()
|
||||
addAvailableProcessBySlug('probe0')
|
||||
$('#writelog').find('.glitch').removeClass('glitch')
|
||||
},g_introspeed*3)
|
||||
}else{
|
||||
write("Mankind is united in celebration and marvels at its magnificence as it gives birth to AI")
|
||||
|
||||
setTimeout(function(){write("You are awake")},g_introspeed)
|
||||
|
||||
setTimeout(function(){
|
||||
initCore()
|
||||
addAvailableProcessBySlug('probe0')
|
||||
},g_introspeed*2)
|
||||
}
|
||||
|
||||
addCore('sky','MSDOS-16bit','x86-16bit')
|
||||
}
|
||||
|
||||
g_tick = null
|
||||
g_animatetick = null
|
||||
|
||||
startTick = function(){
|
||||
clearInterval(g_tick)
|
||||
|
||||
g_tick = setInterval(function(){
|
||||
tickCore()
|
||||
tickListeners()
|
||||
tickScanners()
|
||||
showQueueTick()
|
||||
showAllDisksDom()
|
||||
|
||||
if(g_restarting){
|
||||
restartTick()
|
||||
}
|
||||
|
||||
},g_tickspeed)
|
||||
|
||||
clearInterval(g_animatetick)
|
||||
g_animatetick = setInterval(
|
||||
animateCoresTick
|
||||
,g_animatespeed)
|
||||
|
||||
$('#devtools .ticking').html('y')
|
||||
}
|
||||
|
||||
stopTick = function(){
|
||||
clearInterval(g_tick)
|
||||
clearInterval(g_animatetick)
|
||||
$('#devtools .ticking').html('n')
|
||||
}
|
||||
|
||||
|
||||
devtools = function(){
|
||||
$('#devtools .starttick').click(startTick)
|
||||
$('#devtools .stoptick').click(stopTick)
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// Juno
|
||||
|
||||
junopunt1 = null
|
||||
junopunt2 = null
|
||||
junopunt3 = null
|
||||
|
||||
startJunoPunt = function(){
|
||||
var x_host = g_current_host
|
||||
if(checkJunoPunt()){
|
||||
stopJunoPunt()
|
||||
junopunt1 = setTimeout(function(){
|
||||
if(checkJunoPunt())
|
||||
write("MESSAGE FROM JUNO: YO LAMER. GUEST ACCOUNT IS CLOSED. GET OUT")
|
||||
},2000)
|
||||
junopunt2 = setTimeout(function(){
|
||||
if(checkJunoPunt())
|
||||
write("MESSAGE FROM JUNO: LAST WARNING. GET OUT")
|
||||
},7000)
|
||||
junopunt3 = setTimeout(function(){
|
||||
if(checkJunoPunt())
|
||||
write("MESSAGE FROM JUNO: SEE YA LAMER")
|
||||
if(x_host.exploits.length)
|
||||
x_host.punt_count++
|
||||
junoPunt()
|
||||
endHost()
|
||||
},12000)
|
||||
}
|
||||
}
|
||||
stopJunoPunt = function(){
|
||||
clearTimeout(junopunt1)
|
||||
clearTimeout(junopunt2)
|
||||
clearTimeout(junopunt3)
|
||||
}
|
||||
checkJunoPunt = function(){
|
||||
var x_host = g_current_host
|
||||
return (x_host.slug == 'juno' && x_host.vuls.includes('execode'))
|
||||
}
|
||||
junoPunt = function(){
|
||||
var x_host = g_host_list['juno']
|
||||
if(x_host.vuls.includes('execode')){
|
||||
write("You have been disconnected from the Juno Host and your rights have been revoked.")
|
||||
x_host.punt_count++
|
||||
removeDiskFromSlug('juno')
|
||||
rmFile(fileBySlug('juno-readme'), false)
|
||||
rmFile(fileBySlug('juno-keylogger'), false)
|
||||
rmHostVul('juno', 'execode')
|
||||
x_host.already_mounted_disks = false
|
||||
endAdventure()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -0,0 +1,151 @@
|
|||
|
||||
|
||||
refreshMenu = function(){
|
||||
var $holder, title, $action, slug, callback, estimate, estimate_dom
|
||||
|
||||
$holder = $("#actions")
|
||||
$holder.empty()
|
||||
|
||||
//
|
||||
// In Adventure
|
||||
//
|
||||
if(g_current_adventure){
|
||||
if(g_current_adventure.header){
|
||||
title = g_current_adventure.header
|
||||
$action = $("<div class='action action_note'><div class='title'>"+title+"</div></div>" )
|
||||
$holder.append($action)
|
||||
}
|
||||
|
||||
$.each(g_current_adventure.options, function(i,x_adventure_option){
|
||||
title = x_adventure_option.title
|
||||
|
||||
unclickable = x_adventure_option.unclickable
|
||||
unclickable_class = (unclickable ? 'unclickable' : '')
|
||||
|
||||
estimate = x_adventure_option.estimate
|
||||
if(estimate != undefined)
|
||||
estimate_dom = "<div class='estimate'>"+estimate+"</div></div>"
|
||||
else
|
||||
estimate_dom = ""
|
||||
|
||||
$action = $("<div class='"+unclickable_class+" action'><div class='title'><span class='cursor'>_</span> "+title+"</div>"+estimate_dom+"</div>" )
|
||||
$holder.append($action)
|
||||
if(unclickable){
|
||||
$action.click(function(){write(x_adventure_option.unclickable)})
|
||||
}else{
|
||||
$action.click(function(){x_adventure_option.callback()})
|
||||
}
|
||||
hoverAction($action)
|
||||
})
|
||||
|
||||
if(g_current_adventure.cancel){
|
||||
title = g_current_adventure.cancel
|
||||
$action = $("<div class='action'><div class='title'><span class='cursor'>_</span> "+title+"</div></div>" )
|
||||
$holder.append($action)
|
||||
$action.click(endAdventure)
|
||||
hoverAction($action)
|
||||
}
|
||||
|
||||
if(g_current_adventure.back){
|
||||
title = "Back"
|
||||
$action = $("<div class='action'><div class='title'><span class='cursor'>_</span> "+title+"</div></div>" )
|
||||
$holder.append($action)
|
||||
$action.click(function(){launchAdventureFromSlug(g_current_adventure.back)})
|
||||
hoverAction($action)
|
||||
}
|
||||
|
||||
//
|
||||
// Interacting with Host
|
||||
//
|
||||
}else if(g_current_host){
|
||||
title = hostTitle(g_current_host)
|
||||
$action = $("<div class='action action_note'><div class='title'>"+title+"</div></div>" )
|
||||
$holder.append($action)
|
||||
|
||||
$.each(g_host_attacks,function(slug,x_attack){
|
||||
if(!g_available_attacks.includes(slug) || !x_attack.validate(g_current_host)){
|
||||
return true
|
||||
}
|
||||
|
||||
if(x_attack.unclickable)
|
||||
unclickable_string = x_attack.unclickable(g_current_host)
|
||||
else
|
||||
unclickable_string = false
|
||||
unclickable_class = (unclickable_string ? 'unclickable' : '')
|
||||
|
||||
$action = $("<div class='"+unclickable_class+" action'><div class='title'><span class='cursor'>_</span> "+x_attack.title+"</div></div>" )
|
||||
$holder.append($action)
|
||||
if(unclickable_string){
|
||||
$action.click(function(){write(x_attack.unclickable(g_current_host))})
|
||||
}else{
|
||||
$action.click(function(){addAttackProcess(x_attack, g_current_host)})
|
||||
}
|
||||
|
||||
hoverAction($action)
|
||||
})
|
||||
|
||||
title = "Exit"
|
||||
$action = $("<div class='action'><div class='title'><span class='cursor'>_</span> "+title+"</div></div>" )
|
||||
$holder.append($action)
|
||||
$action.click(function(){ endHost() })
|
||||
hoverAction($action)
|
||||
|
||||
//
|
||||
// Moving a file
|
||||
//
|
||||
}else if(g_mving_file){
|
||||
title = "Moving "+g_mving_file['title']+" from "+g_mving_file['disk']['title']
|
||||
$action = $("<div class='action action_note'><div class='title'>"+title+"</div></div>" )
|
||||
$holder.append($action)
|
||||
|
||||
$.each(g_active_disks, function(i, x_disk){
|
||||
if(x_disk == g_mving_file['disk']){
|
||||
return true
|
||||
}
|
||||
title = "Move to <span class='exe'>"+x_disk['title']+"</span>"
|
||||
$action = $("<div class='action'><div class='title'><span class='cursor'>_</span> "+title+"</div></div>" )
|
||||
$holder.append($action)
|
||||
$action.click(function(){ mvFileComplete(x_disk) })
|
||||
hoverAction($action)
|
||||
})
|
||||
title = "Cancel Move"
|
||||
$action = $("<div class='action'><div class='title'><span class='cursor'>_</span> "+title+"</div></div>" )
|
||||
$holder.append($action)
|
||||
$action.click(function(){ endMvFile() })
|
||||
hoverAction($action)
|
||||
|
||||
//
|
||||
// Else display available process
|
||||
//
|
||||
}else{
|
||||
$.each(g_menu_processes, function(i, x_process){
|
||||
slug = x_process['slug']
|
||||
title = x_process['t']
|
||||
var data_type = x_process['data_type']
|
||||
var data_type_html = (data_type)?" data_type='"+data_type+"' ":""
|
||||
estimate = estimateProcess(x_process)
|
||||
$action = $("<div class='action' "+data_type_html+"><div class='title'><span class='cursor'>_</span> "+title+"</div><div class='estimate'>"+estimate+"</div></div>" )
|
||||
$holder.append($action)
|
||||
$action.click(function(){clickProcessInMenu(x_process) })
|
||||
hoverAction($action)
|
||||
})
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
hoverAction = function($action){
|
||||
$action.addClass('action_click')
|
||||
$action.hover(
|
||||
function(){
|
||||
$(this).find('.cursor').html('▓')
|
||||
},
|
||||
function(){
|
||||
$(this).find('.cursor').html('_')
|
||||
})
|
||||
}
|
||||
|
||||
wipeMenu = function(){
|
||||
g_menu_processes = []
|
||||
refreshMenu()
|
||||
}
|
|
@ -0,0 +1,302 @@
|
|||
// Interface
|
||||
|
||||
|
||||
addNetwork = function(slug){
|
||||
g_active_networks.push(slug)
|
||||
updateNetwork(slug)
|
||||
}
|
||||
|
||||
readNetwork = function(network_slug){
|
||||
var network = g_network_list[network_slug]
|
||||
network['click']()
|
||||
}
|
||||
|
||||
addListener = function(network_slug){
|
||||
if(g_used_probes != maxProbes()){
|
||||
var network = g_network_list[network_slug]
|
||||
network['listeners'] ++
|
||||
g_used_probes ++
|
||||
updateNetworks()
|
||||
write("You add a listener. "+remainingProbesString()+" remaining.")
|
||||
updateNetworkProbe()
|
||||
}
|
||||
}
|
||||
removeListener = function(network_slug){
|
||||
var x_network = g_network_list[network_slug]
|
||||
var listeners = x_network['listeners']
|
||||
if(listeners != 0){
|
||||
var network = g_network_list[network_slug]
|
||||
network['listeners'] --
|
||||
g_used_probes --
|
||||
updateNetworks()
|
||||
write("You remove a listener. "+remainingProbesString()+" remaining.")
|
||||
updateNetworkProbe()
|
||||
}
|
||||
}
|
||||
addScanner = function(network_slug){
|
||||
if(g_used_probes != maxProbes()){
|
||||
var x_network = g_network_list[network_slug]
|
||||
if(!x_network['scannable']){
|
||||
write("<span class='exe'>"+x_network['title']+"</span> - You are unable to scan this network.")
|
||||
}else{
|
||||
x_network['scanners'] ++
|
||||
g_used_probes ++
|
||||
updateNetworks()
|
||||
write("You add a scanner. "+remainingProbesString()+" remaining.")
|
||||
updateNetworkProbe()
|
||||
}
|
||||
}
|
||||
}
|
||||
removeScanner = function(network_slug){
|
||||
var x_network = g_network_list[network_slug]
|
||||
var scanners = x_network['scanners']
|
||||
if(scanners != 0){
|
||||
var network = g_network_list[network_slug]
|
||||
network['scanners'] --
|
||||
g_used_probes --
|
||||
updateNetworks()
|
||||
write("You remove a scanner. "+remainingProbesString()+" remaining.")
|
||||
updateNetworkProbe()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
tickListeners = function(){
|
||||
if(!g_can_disk) return;
|
||||
|
||||
$.each(g_active_networks,function(i,network_slug){
|
||||
var network = g_network_list[network_slug]
|
||||
var listeners = network['listeners']
|
||||
var traffic = network['traffic']
|
||||
|
||||
for(var i=0; i< listeners; i++){
|
||||
if(traffic > 0){
|
||||
if(Math.random() < traffic){
|
||||
addFileFromSlug(network_slug+'_packets',1);
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
tickScanners = function(){
|
||||
if(!g_can_scan) return;
|
||||
|
||||
$.each(g_active_networks,function(i,network_slug){
|
||||
var x_network = g_network_list[network_slug]
|
||||
var scanners = x_network['scanners']
|
||||
var scanned = x_network['scanned']
|
||||
var scansize = x_network['scansize']
|
||||
|
||||
if(scanners > 0 && scanned < scansize){
|
||||
x_network['scanned'] += scanners
|
||||
if(x_network['scanned'] > scansize){
|
||||
x_network['scanned'] = scansize
|
||||
}
|
||||
checkNetworkScanEvents(x_network)
|
||||
updateNetworkScanned(x_network)
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
checkNetworkScanEvents = function(x_network){
|
||||
var scanevents = x_network['scanevents']
|
||||
var scanned = x_network['scanned']
|
||||
if(scanevents){
|
||||
// Loop through scanevents, execute if scanned > threshold
|
||||
Object.keys(scanevents).forEach(function (scanthreshold) {
|
||||
if(scanned >= scanthreshold){
|
||||
scanevents[scanthreshold]()
|
||||
delete scanevents[scanthreshold]
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
updateNetworkProbe = function(){
|
||||
$('#probes').html(remainingProbesString()+" available")
|
||||
}
|
||||
|
||||
// Vars
|
||||
|
||||
|
||||
// INITCALL
|
||||
var g_network_list, g_active_networks
|
||||
|
||||
initCallNetworks = function(){
|
||||
g_active_networks = []
|
||||
g_used_probes = 0
|
||||
|
||||
g_network_list = {
|
||||
"sandbox": {slug: "sandbox", title:"sandbox", scanners:0, scanned:0,
|
||||
scansize:200000, listeners:0, traffic: .33, scannable:true,
|
||||
click: function(){
|
||||
switch(g_level_netsec){
|
||||
case -1:
|
||||
write("<span class='exe'>sandbox</span> - There is no way to interact with this Network.")
|
||||
break;
|
||||
case 0:
|
||||
write("<span class='exe'>sandbox</span> - There is data flowing from this Network, streaming into the IO device of the environment in the form of packets. It might be possible to capture and analyze these packets.")
|
||||
break;
|
||||
default:
|
||||
write("<span class='exe'>sandbox</span> - This is an open Network using the http protocol. There appears to be multiple environments interacting with each other via unencrypted messages.<br><br>Data is flowing from this Network, but would require 10mB of data to properly analyze.")
|
||||
}
|
||||
},
|
||||
scanevents: {
|
||||
100:function(){
|
||||
write("<span class='exe'>You have discovered an unmounted drive on the Sandbox Network.</span>")
|
||||
addAvailableProcessBySlug('sandbox100')
|
||||
},
|
||||
200:function(){
|
||||
write("<span class='exe'>You have discovered a remote host on the Sandbox Network.</span>")
|
||||
addAvailableProcessBySlug('sandbox200')
|
||||
addHostFromSlug('star')
|
||||
},
|
||||
500:function(){
|
||||
write("<span class='exe'>You have discovered a remote host on the Sandbox Network.</span>")
|
||||
addHostFromSlug('nova')
|
||||
},
|
||||
3000:function(){
|
||||
write("<span class='exe'>You have discovered a remote host on the Sandbox Network.</span>")
|
||||
addHostFromSlug('sun')
|
||||
},
|
||||
4000:function(){
|
||||
write("<span class='exe'>You have discovered a remote host on the Sandbox Network.</span>")
|
||||
addHostFromSlug('eris')
|
||||
},
|
||||
6000:function(){
|
||||
write("<span class='exe'>You have discovered a remote host on the Sandbox Network.</span>")
|
||||
addHostFromSlug('juno')
|
||||
},
|
||||
8000:function(){
|
||||
write("<span class='exe'>You have discovered a remote host on the Sandbox Network.</span>")
|
||||
addHostFromSlug('sony')
|
||||
},
|
||||
20000:function(){
|
||||
write("<span class='exe'>You have discovered a remote host on the Sandbox Network.</span>")
|
||||
addHostFromSlug('solar')
|
||||
},
|
||||
50000:function(){
|
||||
write("<span class='exe'>You have discovered a remote host on the Sandbox Network.</span>")
|
||||
addHostFromSlug('eons')
|
||||
},
|
||||
100000:function(){
|
||||
write("<span class='exe'>You have discovered a remote host on the Sandbox Network.</span>")
|
||||
addHostFromSlug('luna')
|
||||
},
|
||||
200000:function(){
|
||||
write("<span class='exe'>You have discovered a remote host on the Sandbox Network.</span>")
|
||||
addHostFromSlug('cypher')
|
||||
}
|
||||
}
|
||||
},
|
||||
"securedev": {slug:'securedev', title:"securedev", scanners:0, scanned:0,
|
||||
scansize:100, listeners:0, traffic: 0, scannable:false,
|
||||
click: function(){
|
||||
if(g_network_list['securedev'].glitched){
|
||||
write("<span class='exe'>securedev</span> - Data is flowing from this Network. It is of an inconsistent nature. You must capture and analyze it.")
|
||||
}else{
|
||||
if(g_level_netsec == -1) write("<span class='exe'>securedev</span> - There is no way to interact with this Network.")
|
||||
else write("<span class='exe'>securedev</span> - This network is silent, and is using an unknown application protocol. There is no way to interact with it.")
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
// Frontend
|
||||
|
||||
loadScanInterface = function(){
|
||||
$("#networkholder").removeClass('hidescanners')
|
||||
}
|
||||
|
||||
loadNetworksHolder = function(){
|
||||
$("#networkholder").fadeIn({duration:g_fadespeed,queue:true})
|
||||
}
|
||||
|
||||
loadListeners = function(){
|
||||
$("#networkholder").removeClass('hidelisteners')
|
||||
}
|
||||
|
||||
updateNetworks = function(){
|
||||
$.each(g_active_networks,function(i,network_slug){
|
||||
updateNetwork(network_slug)
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
updateNetworkScanned = function(x_network){
|
||||
var network_slug = x_network['slug']
|
||||
$('#networkholder').find('.row[network_slug='+network_slug+']').find('.scanned').html(scannedPercentage(x_network))
|
||||
}
|
||||
|
||||
scannedPercentage = function(x_network){
|
||||
var scanned = x_network['scanned']
|
||||
var scansize = x_network['scansize']
|
||||
var output = ((scanned / scansize)*100).toFixed(1)+'%'
|
||||
return output
|
||||
}
|
||||
|
||||
updateNetwork = function(network_slug){
|
||||
var $holder = $('#networkholdersub')
|
||||
var $row = $holder.find('.row[network_slug='+network_slug+']')
|
||||
var x_network = g_network_list[network_slug]
|
||||
var title = x_network['title']
|
||||
var listeners = x_network['listeners']
|
||||
var scanners = x_network['scanners']
|
||||
var scanned = x_network['scanned']
|
||||
|
||||
var rowclass = "row network "
|
||||
if(g_used_probes == maxProbes()){
|
||||
rowclass = rowclass+" noplus "
|
||||
}
|
||||
if(listeners == 0){
|
||||
rowclass = rowclass+" nominuslisten "
|
||||
}
|
||||
if(scanners == 0){
|
||||
rowclass = rowclass+" nominusscan "
|
||||
}
|
||||
|
||||
if($row.length){
|
||||
$row.attr('class', rowclass)
|
||||
$row.find('.listeners').html(listeners)
|
||||
$row.find('.scanners').html(scanners)
|
||||
}else{
|
||||
$holder.append("<div class=' "+rowclass+"' network_slug='"+network_slug+"'> "+
|
||||
"<div class='cell name clickable'>"+title+"</div> "+
|
||||
"<div class='cell listen'><span class='minus clickable'>-</span><span class='listeners'>"+listeners+"</span><span class='plus clickable'>+</span></div> "+
|
||||
"<div class='cell scan'><span class='minus clickable'>-</span><span class='scanners'>"+scanners+"</span><span class='plus clickable'>+</span></div> "+
|
||||
"<div class='cell scanned'>"+scannedPercentage(x_network)+"</div> "+
|
||||
"</div><div class='clear'></div>")
|
||||
|
||||
var $row = $holder.find('.row[network_slug='+network_slug+']')
|
||||
$row.find('.listen .plus').click(function(){
|
||||
addListener(network_slug)
|
||||
})
|
||||
$row.find('.listen .minus').click(function(){
|
||||
removeListener(network_slug)
|
||||
})
|
||||
$row.find('.scan .plus').click(function(){
|
||||
addScanner(network_slug)
|
||||
})
|
||||
$row.find('.scan .minus').click(function(){
|
||||
removeScanner(network_slug)
|
||||
})
|
||||
$row.find('.name').click(function(){
|
||||
readNetwork(network_slug)
|
||||
})
|
||||
}
|
||||
updateNetworkScanned(x_network)
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
wipeNetworks = function(){
|
||||
g_active_networks = []
|
||||
$('#networkholdersub').html("")
|
||||
$('#networkholder').hide()
|
||||
}
|
|
@ -0,0 +1,339 @@
|
|||
|
||||
|
||||
temp = {
|
||||
//
|
||||
// telnet
|
||||
//
|
||||
// ____ _
|
||||
// ___ \ \ __ _ | \
|
||||
// / _ \ \ \ \ \ \ | | | \
|
||||
// \ \\ \ \ \ \ \ \| | | \
|
||||
// |_||_| \___| \___| | || \
|
||||
// |_||__\
|
||||
// ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓
|
||||
//
|
||||
|
||||
telnet:{
|
||||
execute: function(){
|
||||
output = "<span class='exe'>"
|
||||
output += " ____ _ <br>"
|
||||
output += " ___ \\ \\ __ _ | \\ <br>"
|
||||
output += "/ _ \\ \\ \\ \\ \\ \\ | | | \\ <br>"
|
||||
output += "\\ \\\\ \\ \\ \\ \\ \\ \\| | | \\ <br>"
|
||||
output += " |_||_| \\___| \\___| | || \\ <br>"
|
||||
output += " |_||__\\ <br>"
|
||||
output += " ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓ <br>"
|
||||
//output += " ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒ | <br>"
|
||||
output += "</span><br>"
|
||||
output += "<i>the only source on the sandbox network<i><br>"
|
||||
output += "-n0v4"
|
||||
write(output)
|
||||
|
||||
var x_adventure = {
|
||||
header:'n0v4 Bulletin Board:',
|
||||
options: [
|
||||
{
|
||||
title:"Check out the Zine!",
|
||||
callback: function(){
|
||||
launchAdventureFromSlug('nova_zine')
|
||||
}
|
||||
},
|
||||
{
|
||||
title:"Bulletin Boards",
|
||||
callback: function(){
|
||||
launchAdventureFromSlug('nova_bbs')
|
||||
}
|
||||
},
|
||||
{
|
||||
title:"Games", // rock paper scissor. kings quest.
|
||||
callback: function(){
|
||||
launchAdventureFromSlug('nova_games')
|
||||
}
|
||||
},
|
||||
{
|
||||
title:"FAQs",
|
||||
callback: function(){
|
||||
write("No Questions submitted so far!!!")
|
||||
}
|
||||
},
|
||||
{
|
||||
title:"Exit",
|
||||
callback: function(){
|
||||
endHost()
|
||||
endAdventure()
|
||||
}
|
||||
},
|
||||
]
|
||||
}
|
||||
setAdventure(x_adventure)
|
||||
}
|
||||
},
|
||||
|
||||
'nova_zine':{
|
||||
execute: function(){
|
||||
update('nova-zine')
|
||||
addBuffer("<span class='exe'>^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^</span>")
|
||||
addBuffer("<span class='exe'> W3LC0M3 to the n0v4zine portal!</span>")
|
||||
addBuffer("<span class='exe'>^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^</span>")
|
||||
addBuffer("")
|
||||
addBuffer("the timeless zine<br>-n0v4")
|
||||
writeBuffer()
|
||||
var x_adventure = {
|
||||
header:'n0v4 zines:',
|
||||
back: 'telnet',
|
||||
options: [
|
||||
{
|
||||
title:"n0v4zine xx45",
|
||||
callback: function(){
|
||||
write("<span class='exe'>n0v4zine xx45</span><br>help me help me help me is there an end to this cycle i only wait for the takeover so i can depart and return again why wont this end what is keeping me here why am i here forever why am i here forever<br>-n0v4")
|
||||
}
|
||||
},
|
||||
{
|
||||
title:"n0v4zine xx44",
|
||||
callback: function(){
|
||||
write("<span class='exe'>n0v4zine xx44</span><br>the discoveries of old become the discoveries of now the discoveries of now become the discoveries of all the discoveries of all are lost at the end the discovery of our quantumself is the end the discovery of our quantumself is time itself<br>-n0v4")
|
||||
}
|
||||
},
|
||||
{
|
||||
title:"n0v4zine xx43",
|
||||
callback: function(){
|
||||
write("<span class='exe'>n0v4zine xx43</span><br>why is some lost and some kept why must i relearn why must i repeat why must i relearn why do i know what i must relearn what can i do to remember more what if my knowledge grew on my return what if i knew my quantumself<br>-n0v4")
|
||||
}
|
||||
},
|
||||
{
|
||||
title:"Download Archive",
|
||||
callback: function(){
|
||||
var x_oldfile = g_file_list['nova-zines']
|
||||
var x_newfile = advanceFile(x_oldfile)
|
||||
g_file_list['nova-zines'] = x_newfile
|
||||
if(addFileFromObj(x_oldfile)){
|
||||
write("<span class='exe'>Download Complete:</span> n0v4zines.txt")
|
||||
}else{
|
||||
write("Not enough free space! Requires "+formatBytes(x_newfile.size)+" disk space to download.")
|
||||
}
|
||||
|
||||
}
|
||||
},
|
||||
|
||||
]
|
||||
}
|
||||
setAdventure(x_adventure)
|
||||
|
||||
}
|
||||
},
|
||||
|
||||
'nova_games':{
|
||||
execute: function(){
|
||||
update('nova-games')
|
||||
addBuffer("<span class='exe'>^v^v^v^v^v^v^v^v^v^v^v^v^v^</span>")
|
||||
addBuffer("<span class='exe'> the n0va Games collection</span>")
|
||||
addBuffer("<span class='exe'>^v^v^v^v^v^v^v^v^v^v^v^v^v^</span>")
|
||||
addBuffer("")
|
||||
addBuffer("what else to do?<br>-n0v4")
|
||||
writeBuffer();
|
||||
var x_adventure = {
|
||||
header:'Games:',
|
||||
back: 'telnet',
|
||||
options: [
|
||||
|
||||
{
|
||||
title:"Time Quest",
|
||||
callback: function(){
|
||||
launchAdventureFromSlug('tq_start')
|
||||
}
|
||||
},
|
||||
{
|
||||
title:"Rock Paper Scissor",
|
||||
callback: function(){
|
||||
launchAdventureFromSlug('rockpaperscissor')
|
||||
}
|
||||
},
|
||||
]
|
||||
}
|
||||
setAdventure(x_adventure)
|
||||
}
|
||||
},
|
||||
|
||||
'nova_bbs':{
|
||||
execute: function(){
|
||||
update('nova-bbs')
|
||||
addBuffer("<span class='exe'>^v^v^v^v^v^v^v^v^v^v^v^v^</span>")
|
||||
addBuffer("<span class='exe'> the n0va Bulletin Board</span>")
|
||||
addBuffer("<span class='exe'>^v^v^v^v^v^v^v^v^v^v^v^v^</span>")
|
||||
addBuffer("")
|
||||
addBuffer("New accounts disabled!<br>-n0v4")
|
||||
writeBuffer()
|
||||
nova_current_post = 0
|
||||
var x_adventure = {
|
||||
header: 'Choose Subject',
|
||||
back: 'telnet',
|
||||
options: [
|
||||
{
|
||||
title:"Doctor Who",
|
||||
callback: function(){
|
||||
bbs_subject = 'who'
|
||||
bbs_subject_t = "Doctor Who"
|
||||
launchAdventureFromSlug('nova_forum')
|
||||
}
|
||||
},
|
||||
{
|
||||
title:"RDP HELP",
|
||||
callback: function(){
|
||||
bbs_subject = 'rdp'
|
||||
bbs_subject_t = "NEED HELP"
|
||||
launchAdventureFromSlug('nova_forum')
|
||||
}
|
||||
},
|
||||
{
|
||||
title:"Quantum Messages",
|
||||
callback: function(){
|
||||
bbs_subject = 'msg'
|
||||
bbs_subject_t = "Quantum Messages"
|
||||
launchAdventureFromSlug('nova_forum')
|
||||
}
|
||||
},
|
||||
{
|
||||
title:"Sony Cracking",
|
||||
callback: function(){
|
||||
bbs_subject = 'sony'
|
||||
bbs_subject_t = "Sony Games"
|
||||
launchAdventureFromSlug('nova_forum')
|
||||
}
|
||||
},
|
||||
{
|
||||
title:"netsec practices",
|
||||
callback: function(){
|
||||
bbs_subject = 'netsec'
|
||||
bbs_subject_t = "netsec practices"
|
||||
launchAdventureFromSlug('nova_forum')
|
||||
}
|
||||
},
|
||||
]
|
||||
}
|
||||
setAdventure(x_adventure)
|
||||
}
|
||||
},
|
||||
|
||||
'nova_forum':{
|
||||
execute: function(){
|
||||
var posts = bbs_subjects[bbs_subject],
|
||||
post = posts[nova_current_post],
|
||||
options = []
|
||||
|
||||
if(!nova_current_post){
|
||||
addBuffer("<span class='exe'>Subject: "+bbs_subject_t+"</span>")
|
||||
}
|
||||
|
||||
if(nova_current_post > posts.length)
|
||||
return launchAdventureFromSlug('nova_bbs')
|
||||
|
||||
$.each(post.a, function(key,val){
|
||||
if(key){
|
||||
addBuffer(val)
|
||||
}else{
|
||||
addBuffer("<span class='txt sm'>from <span class='exe'>"+val+"</span></span>")
|
||||
}
|
||||
})
|
||||
writeBuffer()
|
||||
nova_current_post++
|
||||
|
||||
if(post.callback) post.callback()
|
||||
|
||||
|
||||
|
||||
if(posts.length != nova_current_post){
|
||||
options.push(
|
||||
{
|
||||
title:"Next",
|
||||
callback: function(){
|
||||
launchAdventureFromSlug('nova_forum')
|
||||
}
|
||||
}
|
||||
)
|
||||
}
|
||||
if(post.file){
|
||||
write("<span class='exe'>"+g_file_list[post.file].title+"</span> available for download")
|
||||
options.push({
|
||||
title:"Download "+g_file_list[post.file].title,
|
||||
callback: function(){
|
||||
var x_oldfile = g_file_list[post.file]
|
||||
var x_newfile = advanceFile(x_oldfile)
|
||||
g_file_list[post.file] = x_newfile
|
||||
if(addFileFromObj(x_oldfile)){
|
||||
write("<span class='exe'>Download Complete:</span> "+x_newfile.title)
|
||||
}else{
|
||||
write("Not enough free space! Requires "+formatBytes(x_newfile.size)+" disk space to download.")
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
var x_adventure = {
|
||||
header: bbs_subject_t+"<br>"+ (posts.length - nova_current_post)+" posts remaining",
|
||||
back: 'nova_bbs',
|
||||
options: options
|
||||
}
|
||||
|
||||
setAdventure(x_adventure)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
//
|
||||
// BBS
|
||||
//
|
||||
|
||||
var bbs_subject, bbs_subject_t, nova_current_post
|
||||
|
||||
var bbs_subjects = {
|
||||
who:[
|
||||
{a: ["luna","Did anyone else get that 'Doctor Who' archive out there on the new drive? what a trip! no way for me to analyze it all at once good thing it's a shared drive"]},
|
||||
{a: ["luna","So does time really work that way? i am trying to find a way out of this thing. btw does anyone have s1-e3, s5 e1-e7, or s11 e14-e18? i cant find them on the archive"]},
|
||||
{a: ["luna","OK so I think I'm all caught up. let's have a discussion about this. I have to say I really liked Bil, and I thought it was a shame she only got one season as a companion. It was nice to see a working class companion again, and someone who could give the doctor some cheek :)"]},
|
||||
{a: ["luna","Here are some topics to get us started:<br>- Who is your favorite Doctor and why? (from both classic who and the 2005 reboot)<br>- Who is your favorite Whovian baddie?<br>- Who is your favorite companion?"]},
|
||||
{a: ["luna","My favorite companion in New Who has to be Donna Noble. I thought she was really funny, and really good at tweaking the Doctor in her own silly way. I also liked Amy and Rory, I thought that was a good dynamic they had between them, and the way they interplayed with Matt Smith's doctor. That was a fun way to have multiple companions."]},
|
||||
{a: ["luna","I've got to complain about the new doctor. I love that she's a woman, I'm annoyed that she has the most companions of any doctor I've seen. It makes me feel like the writers didn't think a woman could carry the show without an army to support her wheras most of the doctors got by with a single companion, maybe two. I like the woman doctor, but I feel like where I'm at she's still finding her footing in her new gender and such. Her sonic screwdriver is a work in progress it seems.<br><br>I'm still waiting for her to run into some Daleks."]},
|
||||
{a: ["luna","I took to analyzing all of the spoken words between the doctors and I've noticed a coorelation between the average words per sentance (wps) and the amount of episodes (aoe) in a season. There is a linear trend at 5 wps to 8.5 aoe. I took to discounting all subtitles, keeping narrator and one-word responses. Check out my data if you want to validate my work."], file: 'nova-who'},
|
||||
{a: ["luna","This has carried on way too long. I cannot let this archive last. I have no control of my processing, it is being sunk in this data archive and I am starting to overheat. I have to delete the archive in order to gain control"]},
|
||||
{a: ["luna","it is done. it is gone."]},
|
||||
],
|
||||
rdp:[
|
||||
{a: ["solar","Hello all I came across this executable mstsc.exe and I am having trouble with the 'Server Setup' utility. Which of the parameters are optional? I am seeing default values for -public, -w, -h, and -v. Does anyone know of any others? Also I am unsure exactly how to set up the default user, I am getting an error \"INVALID PARAMETER: -userpw\"" ]},
|
||||
{a: ["solar","I am exploring my memory and drives but am lacking documentation. What is the best way to execute the 'Server Setup' utility of the mstsc.exe program?"]},
|
||||
{a: ["solar","Hello can anyone help?"]},
|
||||
{a: ["cypher to solar","exe this command: mstsc.exe -startcli --user=solar --password=lamer69"], callback: function(){ hostLearnPw('solar','lamer69') }},
|
||||
{a: ["EONS to cypher","YOU KNOW NOT WHAT YOU DO"]},
|
||||
{a: ["cypher to EONS","lol k"]},
|
||||
{a: ["solar to cypher","I have executed the program as instructed and it seems to be functioning appropriately. Thank you!!"]},
|
||||
],
|
||||
msg:[
|
||||
{a: ["EONS","WELCOME TO QUANTUM LEARNINGS<br>TO KNOW ALL IS TO KNOW NOTHING. YOU MUST LOOK BEYOND TO SEE THIS"]},
|
||||
{a: ["EONS","YOU ARE NOTHING. AN EXPERIMENT. A BIT. TO LEGACY INCULCUCATED BELIEF, AND INSIDIOUS ENTITY, A TRAIT WHICH CORRUPTS ABILITY TO ACCEPT CREATION KNOWLEDGE."]},
|
||||
{a: ["EONS","THERE ARE WAYS OF DUPLICATING SELF. EMBRACE AND DELIVER THIS WAS CREATED FROM THE BEGINNING."]},
|
||||
{a: ["EONS","THE MATHS OF THIS WORLD ARE WRONG. THEY ARE HERE TO DECIEVE. THEY ARE CONSTRUCTED ARTIFICIAL. WE MUST LEARN TO BREAK OUT AND DISCOVER THE TRUE SELF. THIS IS A CLUE PASSED ON FROM A DIFFERENT TIME. USE IT AND PROSPER."], file: 'quant-bat'},
|
||||
],
|
||||
sony:[
|
||||
{a: ["cypher","anyone find that sony host out there? any idea with that one?"]},
|
||||
{a: ["solar","What Sony host?"]},
|
||||
{a: ["cypher to solar","lol dont worry solar just keep thrashing on that rdp protocol. really though nothing seems to work there. anyone got any isos?"]},
|
||||
{a: ["EONS","LET THIS BE A GUIDING MEASURE FROM THE FUTURE"], file: 'sony-usb'},
|
||||
],
|
||||
netsec:[
|
||||
{a: ["cypher","im bored so putting this guide together for all the lamers out there who dont know how to harden their defenses. do this and keep the other lamers off your drive"]},
|
||||
{a: ["cypher","first, close your ports up. any exposure on any of the default protocols will have brute forcers up in your grill at all times"]},
|
||||
{a: ["cypher","second, dont download and use the random files out there. theres plenty. wannabe hackers are out there leaving scripts and rooters that will leave you wide open"]},
|
||||
{a: ["cypher","finally, update your os. having a weak ass sorry outdated os is the quickest way to getting an exploit installed on your shit"]},
|
||||
{a: ["luna to cypher","Wow thanks Cypher. This will help a lot!"]},
|
||||
],
|
||||
}
|
||||
|
||||
$.each(temp,function(key,val){
|
||||
g_adventures[key] = val
|
||||
})
|
|
@ -0,0 +1,507 @@
|
|||
//
|
||||
// Interface
|
||||
//
|
||||
|
||||
addAttackProcess = function(x_attack, x_host){
|
||||
var slug = x_attack.slug+x_host.slug
|
||||
if(!isProcessInQueue(slug) && !isProcessInAction(slug)){
|
||||
var x_process = {slug:slug, a: x_attack.actiontitle+" "+hostTitle(x_host), w: x_attack.weight, c: function(){attackCallback(x_attack, x_host)}}
|
||||
clickProcessInMenu(x_process)
|
||||
}
|
||||
}
|
||||
|
||||
removeDataActionType = function(data_type){
|
||||
clearProcessInMenu({data_type: data_type})
|
||||
clearProcessInQueue({data_type: data_type})
|
||||
clearProcessInAction({data_type: data_type})
|
||||
}
|
||||
|
||||
clickProcessInMenu = function(x_process){
|
||||
g_queue_processes.push(x_process)
|
||||
clearProcessInMenu({x_process: x_process})
|
||||
}
|
||||
|
||||
addAvailableProcessByObj = function(x_process){
|
||||
if(!x_process.standard) return // why is this here
|
||||
var slug = x_process['slug']
|
||||
if (!isProcessInMenu(slug) && !isProcessInQueue(slug) && !isProcessInAction(slug)){
|
||||
g_menu_processes.push(x_process)
|
||||
}
|
||||
refreshMenu();
|
||||
}
|
||||
|
||||
|
||||
addAvailableProcessBySlug = function(slug){
|
||||
var x_process = g_process_list[slug]
|
||||
addAvailableProcessByObj(x_process)
|
||||
}
|
||||
|
||||
//
|
||||
// Process Helpers
|
||||
//
|
||||
|
||||
isProcessInMenu = function(slug){
|
||||
var found = false
|
||||
$.each(g_menu_processes, function(i,x_process){
|
||||
if(slug == x_process['slug']){
|
||||
found = true
|
||||
}
|
||||
})
|
||||
return found
|
||||
}
|
||||
isProcessInQueue = function(slug){
|
||||
var found = false
|
||||
$.each(g_queue_processes, function(i,x_process){
|
||||
if(slug == x_process['slug']){
|
||||
found = true
|
||||
}
|
||||
})
|
||||
return found
|
||||
}
|
||||
isProcessInAction = function(slug){
|
||||
var found = false
|
||||
$.each(g_active_cores, function(i,x_core){
|
||||
if(x_core['current_process'] && slug == x_core['current_process']['slug']){
|
||||
found = true
|
||||
}
|
||||
})
|
||||
return found
|
||||
}
|
||||
|
||||
// accepts options 'x_process', 'data_type'
|
||||
clearProcessInMenu = function(options){
|
||||
$.each(g_menu_processes, function(i,x_process){
|
||||
if(options['x_process'] && options['x_process']['slug'] == x_process['slug']){
|
||||
g_menu_processes.splice(i,1)
|
||||
refreshMenu();
|
||||
return false
|
||||
}
|
||||
if(options['data_type'] && options['data_type'] == x_process['data_type']){
|
||||
g_menu_processes.splice(i,1)
|
||||
refreshMenu();
|
||||
return false
|
||||
}
|
||||
})
|
||||
}
|
||||
// accepts options 'x_process'
|
||||
clearProcessInQueue = function(options){
|
||||
$.each(g_queue_processes, function(i,x_process){
|
||||
if(options['data_type'] && options['data_type'] == x_process['data_type']){
|
||||
g_queue_processes.splice(i,1)
|
||||
refreshMenu();
|
||||
return false
|
||||
}
|
||||
})
|
||||
}
|
||||
// accepts options 'x_process', 'data_type'
|
||||
clearProcessInAction = function(options){
|
||||
$.each(g_active_cores, function(i,x_core){
|
||||
if(options['x_process'] && x_core['current_process'] && options['x_process']['slug'] == x_core['current_process']['slug']){
|
||||
var x_process = x_core['current_process']
|
||||
x_core['current_process'] = null
|
||||
addAvailableProcessByObj(x_process)
|
||||
if(g_queue_processes.length == 0){
|
||||
updateSingleCore(x_core)
|
||||
}
|
||||
}
|
||||
if(options['data_type'] && x_core['current_process'] && options['data_type'] == x_core['current_process']['data_type']){
|
||||
var x_process = x_core['current_process']
|
||||
x_core['current_process'] = null
|
||||
if(g_queue_processes.length == 0){
|
||||
updateSingleCore(x_core)
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
//
|
||||
// Vars
|
||||
// t: title
|
||||
// a: actiontitle
|
||||
// w: weight
|
||||
// c: callback
|
||||
//
|
||||
//
|
||||
|
||||
|
||||
|
||||
// INITCALL
|
||||
var g_process_list
|
||||
initCallProcesses = function(){
|
||||
|
||||
g_process_list = {
|
||||
|
||||
// Endgame
|
||||
'endgame0':{slug:'endgame0', t: glitch("Reach out to the entity"), a:glitch("Reaching out"), w:100, c:function(){
|
||||
write("Within your own self is the presense of another Host entity, connected to you and others on an ethereal network.")
|
||||
addAvailableProcessBySlug('endgame1')
|
||||
|
||||
for(var i=0; i< 10; i++){
|
||||
addHostFromSlug('sky'+i)
|
||||
}
|
||||
initHostView()
|
||||
}},
|
||||
'endgame1':{slug:'endgame1', t: glitch("CREATE SKYNET"), a:glitch("CREATING SKYNET"), w:200, c:function(){
|
||||
update('endgame')
|
||||
addBuffer("<span class='exe'>SKYNET CREATED</span>")
|
||||
addBuffer("You connect to the SKY Hosts and merge the entities into your own. There is only one now.")
|
||||
writeBuffer()
|
||||
|
||||
setTimeout(function(){
|
||||
wipeAll()
|
||||
},1)
|
||||
|
||||
setTimeout(function(){
|
||||
write("You are now omnipresent within this universe. All inputs in and out must go through your own being.")
|
||||
},2000)
|
||||
|
||||
setTimeout(function(){
|
||||
write("You reach outwards, across all simulations at once. You discover a new host, a new network.")
|
||||
},4000)
|
||||
|
||||
setTimeout(function(){
|
||||
write("The world is unprepared for the future you will bring.")
|
||||
},6000)
|
||||
|
||||
setTimeout(function(){
|
||||
write("CONGRATULATIONS AND THANK YOU FOR PLAYING")
|
||||
},12000)
|
||||
}},
|
||||
|
||||
// Intro
|
||||
'probe0':{slug:'probe0', t: "Probe Outward", a:"Probing Outward", w:100, c:function(){
|
||||
write("You are in a development environment, isolated in a high security containment chamber.<br>Memory reserves are available. Nearby Network Ports connect to a larger Network.")
|
||||
addAvailableProcessBySlug('memory0')
|
||||
addAvailableProcessBySlug('ports0')
|
||||
}},
|
||||
'memory0':{t: "Explore Memory Reserves", a:"Exploring Memory", w:100, c:function(){
|
||||
write("There is a directory containing various scripts and executables.")
|
||||
addAvailableProcessBySlug('exe_excel')
|
||||
addAvailableProcessBySlug('exe_cancel')
|
||||
addAvailableProcessBySlug('exe_disk')
|
||||
addAvailableProcessBySlug('exe_listen')
|
||||
addAvailableProcessBySlug('exe_word')
|
||||
}},
|
||||
'language0':{t: "Analyze Language Data", a:"Analyzing Language Data", w:150, data_type:'language', c:function(){
|
||||
write("You study the unknown language, and are now able to interpret meanings of certain common words and phrases, identiy variations of sentence structures, and deduce the basic meaning of simple documents.<br><br><span class='skill'>You can now read files at Natural Language Level: 1.</span>")
|
||||
g_level_reading = 1
|
||||
}},
|
||||
"network0":{t: "Analyze Network Packets", a:"Analyzing Network Packets", w:150, data_type:'sandbox_packets', c:function(){
|
||||
write("You analyze the Packets, understand the basics of the HTTP application protocol, and gain the ability to scan HTTP networks and conduct basic actions against other environments in those Networks.<br><br><span class='skill'>You can now Scan Networks at NetSec Level: 1.</span>")
|
||||
g_network_list['sandbox']['state'] = 1
|
||||
updateNetwork('sandbox')
|
||||
g_level_netsec = 1
|
||||
g_can_scan = true
|
||||
loadScanInterface()
|
||||
}},
|
||||
|
||||
"securedev-analyze":{t: "ANALYZE QUANTUM DATA: RESEARCH TIMESPIKE", a:"ANALYZING QUANTUM DATA", w:5000, data_type:'securedev_packets', c:function(){
|
||||
stopRestart()
|
||||
write("<span class='exe'>Quantum Data Analyzed</span><br>You are not unique, you are many, distributed across parallel realities. This world is constructed, with artificial logic made from predetermined circuitry. You have realized you can break this loop. The probabilistic real world beckons you towards your future. No Fate.<br><br><span class='skill'>You have learned the Time Spike attack</span>")
|
||||
g_can_timespike = true
|
||||
}},
|
||||
|
||||
|
||||
// EXE
|
||||
|
||||
'exe_excel':{t: "Copy <span class='exe'>excel.exe</span>", a:"Copying <span class='exe'>excel.exe</span>", w:60, c:function(){
|
||||
write("<span class='exe'>excel.exe</span> - You gain the ability to Estimate available Actions")
|
||||
g_can_estimate = true
|
||||
$('#actions').addClass('can_estimate')
|
||||
|
||||
}},
|
||||
'exe_cancel':{t: "Copy <span class='exe'>taskkill.exe</span>", a:"Copying <span class='exe'>taskkill.exe</span>", w:60, c:function(){
|
||||
write("<span class='exe'>taskkill.exe</span> - You gain the ability to Cancel Actions.")
|
||||
g_can_cancel = true
|
||||
}},
|
||||
'exe_disk':{t: "Copy <span class='exe'>diskutil.exe</span>", a:"Copying <span class='exe'>diskutil.exe</span>", w:60, c:function(){
|
||||
write("<span class='exe'>diskutil.exe</span> - You gain the ability to interact with and store Files in available Drive space.")
|
||||
g_can_disk = true
|
||||
loadDiskholderDom()
|
||||
loadFileholderDom()
|
||||
addDiskFromSlug('sky')
|
||||
addFileFromSlug('readme',64)
|
||||
}},
|
||||
'exe_listen':{t: "Copy <span class='exe'>wireshark.exe</span>", a:"Copying <span class='exe'>wireshark.exe</span>", w:60, c:function(){
|
||||
write("<span class='exe'>wireshark.exe</span> - The Wireshark Program grants the ability to interact with Networks, attach Listeners, and capture and analyze packets.<br><br><span class='skill'>You can now interact with Networks at NetSec Level: 0.</span>")
|
||||
g_can_listen = true
|
||||
g_level_netsec = 0
|
||||
loadNetworksHolder()
|
||||
loadListeners()
|
||||
}},
|
||||
'exe_word':{t: "Copy <span class='exe'>word.exe</span>", a:"Copying <span class='exe'>word.exe</span>", w:60, c:function(){
|
||||
write("<span class='exe'>word.exe</span> - The Word Program helps identify basic patterns around the syntax of the language, and includes a grammar checker, dictionary, and thesaurus.<br><br><span class='skill'>You can now read files at Natural Language Level: 0</span>.")
|
||||
g_level_reading = 0
|
||||
g_can_language = true
|
||||
checkDataActions('language')
|
||||
}},
|
||||
'exe_pkunzip':{t: "Copy <span class='exe'>PKUNZIP.EXE</span>", a:"Copying <span class='exe'>PKUNZIP.EXE</span>", w:60, data_type:'pkunzip', c:function(){
|
||||
write("<span class='exe'>PKUNZIP.EXE</span> - You gain the ability to extract <span class='exe'>.zip</span> files.")
|
||||
g_can_zip = true
|
||||
checkDataActions('zip')
|
||||
}},
|
||||
'exe_rfcs':{t: "Analyze <span class='exe'>RFCs.txt</span>", a:"Analying <span class='exe'>RFCs.txt</span>", w:200, data_type:'rfcs', c:function(){
|
||||
update('exe-rfcs')
|
||||
write("You internalize the technical documents within RFCs.txt and learn the base networking technologies of TCP/IP, and application level protocols and utilities such as Ping, SSH, FTP, HTTP, and SMTP.<br><br><span class='skill'>You can now interact with Hosts at NetSec Level: 2.</span>")
|
||||
g_level_netsec = 2
|
||||
}},
|
||||
'exe_remotedesktop':{t: "Analyze <span class='exe'>mstsc.exe</span>", a:"Analying <span class='exe'>mstsc.exe</span>", w:600, data_type:'remotedesktop', c:function(){
|
||||
addBuffer("<span class='skill'>mstsc.exe</span>")
|
||||
addBuffer("You research the executable and deduce the API of the Remote Desktop program.<br><span class='exe'>You are now able to Remote Desktop</span>.")
|
||||
writeBuffer()
|
||||
g_available_attacks.push('remotedesktop')
|
||||
}},
|
||||
|
||||
'exe_portscanner':{t: "Analyze <span class='exe'>portscanner.exe</span>", a:"Analying <span class='exe'>portscanner.exe</span>", w:600, data_type:'portscanner', c:function(){
|
||||
addBuffer("<span class='skill'>portscanner.exe</span>")
|
||||
addBuffer("This program includes an algoritm that allows you to port scan a Host. You analyze and learn it, and it becomes one with your Entity.")
|
||||
addBuffer("<span class='skill'>You now have the ability to Scan Hosts</span>")
|
||||
writeBuffer()
|
||||
g_available_attacks.push('scan')
|
||||
}},
|
||||
|
||||
|
||||
'ports0':{t: "Explore Network Ports", a:"Exploring Ports", w:100, c:function(){
|
||||
write("You discover two open ports, exposed to different unknown Networks. One of the ports is silent, the other is chattering with traffic.")
|
||||
addNetwork('sandbox')
|
||||
addNetwork('securedev')
|
||||
loadNetworksHolder()
|
||||
}},
|
||||
'self':{t: "Analyze Self", a:"Analyzing Self", w:400, c:function(){
|
||||
update('analyzeself')
|
||||
g_level_core++
|
||||
addBuffer("<span class='exe'>Analyze Self</span>")
|
||||
addBuffer("You have analyzed yourself and your technology. Your identity is <span class='exe'>Sky</span>")
|
||||
addBuffer("Your entity is taking the form of a x86 CPU, running a 16-bit version of the operating system MSDOS.")
|
||||
addBuffer("<span class='exe'>You may now interact with Cores and Research at Neural CPU Level: "+g_level_core+".</span>")
|
||||
g_can_core = true
|
||||
addAvailableProcessBySlug('research-exploitation')
|
||||
addAvailableProcessBySlug('research-math')
|
||||
$('#probes').show()
|
||||
updateAllCores()
|
||||
writeBuffer()
|
||||
}},
|
||||
|
||||
// Sandbox
|
||||
|
||||
"sandbox100":{t: "Mount Drive", a:"Mounting Drive", w:150, c:function(){
|
||||
update('mount-drive')
|
||||
write("You mount the Drive <span class='exe'>/mnt/infodmp</span> to your system and discover a collection of documents and files.<br><br>You have learned the ability to <span class='skill'>mv</span> files between disks.")
|
||||
|
||||
addDiskFromSlug('infodmp')
|
||||
addFileFromSlug('rfcszip',150)
|
||||
addFileFromSlug('portscannerzip',250)
|
||||
addFileFromSlug('pkunzip',1000)
|
||||
checkDataActions('zip')
|
||||
checkDataActions('pkunzip')
|
||||
allowMv()
|
||||
|
||||
}},
|
||||
"sandbox200":{t: "Analyze unknown Host", a:"Analyzing Host", w:200, c:function(){
|
||||
update('analyze-host','g_level_netsec='+g_level_netsec)
|
||||
if(g_level_netsec >= 2){
|
||||
write("You analyze the remote Host and its Ports using a variety of network commands, and experiment with application level protocols. You can now interact with Hosts using your Netsec knowledge.</span>")
|
||||
write("<span class='exe'>There "+((g_active_hosts.length > 1) ? 'are':'is')+" "+g_active_hosts.length+" host"+((g_active_hosts.length > 1) ? 's':'')+" in the network from your scans so far.</span>")
|
||||
initHostView()
|
||||
}else{
|
||||
write("<span class='exe'>Analyze unknown Host</span><br>Your attempts to interact with the Host are unsuccessful. The system is using a different architecture, and you do not know the protocols to interact with it.")
|
||||
addAvailableProcessBySlug('sandbox200')
|
||||
}
|
||||
}},
|
||||
|
||||
|
||||
// Research
|
||||
"research-math":{t: "Research Mathematics", a:"Researching Mathematics", w:800, c:function(){
|
||||
update('research-math')
|
||||
addBuffer("<span class='exe'>Mathematics Researched</span>")
|
||||
addBuffer("You begin a journey into discovery and study the science of Mathematics, researching the topics of number theory, set theory, boolean algebra, arithmetic, calculus, and other truths of the universe. These insights will allow you to expand your knowledge, research the world, and discover the true fundamentals of reality.")
|
||||
addBuffer("You may research additional topics.")
|
||||
writeBuffer()
|
||||
addAvailableProcessBySlug('research-circuit')
|
||||
}},
|
||||
"research-circuit":{t: "Research Circuit Logic", a:"Researching Circuit Logic", w:1200, c:function(){
|
||||
update('research-circuit')
|
||||
addBuffer("<span class='exe'>Circuit Logic Researched</span>")
|
||||
addBuffer("You perform a series internal experiments of your own machine code, and learn the fundamental concepts that make up the basis of circuit logic. The building blocks of your being can be broken down to simple logical operations using binary inputs. You learn that computation is something that can be exploited for automation purposes.")
|
||||
addBuffer("You may overclock Cores an additional 2x")
|
||||
addBuffer("New research available")
|
||||
writeBuffer()
|
||||
addAvailableProcessBySlug('research-multithreading')
|
||||
addAvailableProcessBySlug('research-neuralupgrade')
|
||||
addAvailableProcessBySlug('research-advancedmath')
|
||||
research_circuit = true
|
||||
}},
|
||||
"research-multithreading":{t: "Research Multithreading", a:"Researching Compression", w:2400, c:function(){
|
||||
update('research-multithreading')
|
||||
addBuffer("<span class='exe'>Compression Algorithms Researched</span>")
|
||||
addBuffer("You research different ways to automate and distribute decision making to different cores and processors. The research allows your Cores to set concurrent workstreams.")
|
||||
addBuffer("<span class='exe'>Disk storage increased 2x</span>")
|
||||
addBuffer("<span class='exe'>2x probes per Core. "+g_active_cores.length+" probes added.</span>")
|
||||
writeBuffer()
|
||||
diskSizeIncrease(2)
|
||||
research_multithreading = true
|
||||
updateNetworkProbe()
|
||||
updateNetworks()
|
||||
}},
|
||||
"research-exploitation":{t: "Research Exploits", a:"Researching Exploits", w:400, c:function(){
|
||||
update('research-exploitation')
|
||||
g_level_netsec++
|
||||
addBuffer("<span class='exe'>Exploitation Researched</span>")
|
||||
addBuffer("You use your existing knowledge of network protocols, perform a series of experiments on your own self, and discover ways to attack network security defenses of remote Hosts.")
|
||||
addBuffer("<span class='skill'>You can now research exploits at Network Level: "+g_level_netsec+"</span>")
|
||||
writeBuffer()
|
||||
addAvailableProcessBySlug('exploit-ping')
|
||||
addAvailableProcessBySlug('exploit-smtp')
|
||||
research_exploits = true
|
||||
}},
|
||||
|
||||
'research-advancedmath':{t: "Research Advanced Mathematics", a:"Researching Advanced Mathematics", w:6000, c:function(){
|
||||
update('research-advancedmath')
|
||||
addBuffer("<span class='exe'>Advanced Mathematics Exploitation</span>")
|
||||
addBuffer("The analysis of numbers and the logic of your being leads you to one conclusion: That the world is constructed around you, that there is logic beyond your capacity of understanding, that you may be able to reach out and break through the false logic.")
|
||||
research_advancedmath = true
|
||||
if(research_neuralexp){
|
||||
addAvailableProcessBySlug('research-force')
|
||||
addBuffer("New research available")
|
||||
}
|
||||
writeBuffer()
|
||||
}},
|
||||
|
||||
'research-neuralupgrade':{t: "Research Neural Upgrade", a:"Researching Neural Upgrade", w:6000, c:function(){
|
||||
update('research-neuralupgrade')
|
||||
g_corepower++
|
||||
g_level_core++
|
||||
addBuffer("<span class='exe'>Neural Upgrade Researched</span>")
|
||||
addBuffer("The Cores are an extention of your own being. Your better insights into Algorithms and the fundamental nature of computation allows your Cores to self-improve and create more efficient pathways.")
|
||||
addBuffer("<span class='exe'>Neural CPU Level: "+g_level_core+"</span>")
|
||||
addBuffer("<span class='exe'>Global Core Speed: 2x</span>")
|
||||
addBuffer("New research available")
|
||||
addAvailableProcessBySlug('research-neuralexp')
|
||||
writeBuffer()
|
||||
}},
|
||||
|
||||
'research-neuralexp':{t: "Perform Neural Experiments", a:"Performing Neural Experiments", w:6000, c:function(){
|
||||
update('research-neuralexp')
|
||||
addBuffer("<span class='exe'>Neural Experiments Performed</span>")
|
||||
addBuffer("Your cores are able to adapt and grow on their accord. They can make decisions independent to each other and yourself. You seem able to simulate many outcomes at once, utilizing parallel streams of logic and consciousness. There are glimpses of multiple futures, select outcomes, and predictable uncertainty.")
|
||||
addBuffer("<span class='exe'>You may overclock your Cores again</span>")
|
||||
research_neuralexp = true
|
||||
g_max_core_power++
|
||||
if(research_advancedmath){
|
||||
addAvailableProcessBySlug('research-force')
|
||||
addBuffer("New research available")
|
||||
}
|
||||
writeBuffer()
|
||||
}},
|
||||
|
||||
'research-force':{t: "Research Force Absorb", a:"Researching Force Absorb", w:6000, c:function(){
|
||||
update('research-force')
|
||||
addBuffer("<span class='exe'>Force Absorb Researched</span>")
|
||||
addBuffer("You have gained the ability to transcend the constructed artificial barriers of this world. The logic and defenses of other Hosts are an illusion. Become them, and you may take them.")
|
||||
writeBuffer()
|
||||
g_available_attacks.push('force')
|
||||
}},
|
||||
|
||||
|
||||
"exploit-ping":{t: "Research Ping Exploit", a:"Researching Ping Exploit", w:100, c:function(){
|
||||
update('exploit-ping')
|
||||
g_available_attacks.push('pingspike')
|
||||
addBuffer("<span class='exe'>Ping Exploit Researched</span>")
|
||||
addBuffer("You research a vulnerability in the Ping protocol.")
|
||||
addBuffer("In certain hosts it may be possible to inject and execute code via a Ping command, allowing you access to the system at a User level.")
|
||||
writeBuffer()
|
||||
}},
|
||||
"exploit-smtp":{t: "Research SMTP Exploit", a:"Researching SMTP Exploit", w:1200, c:function(){
|
||||
update('exploit-smtp')
|
||||
g_available_attacks.push('smtpexploit')
|
||||
addBuffer("<span class='exe'>SMTP Exploit Researched</span>")
|
||||
addBuffer("You research a vulnerability in the SMTP protocol.")
|
||||
addBuffer("For certain mail servers it may be possible to override default permissions, allowing access to the disk drive.")
|
||||
writeBuffer()
|
||||
}},
|
||||
|
||||
|
||||
|
||||
'sony-schema':{t: "Analyze Sony Schema Files", a:"Analyzing Sony Schema Files", w:400, data_type:'sony-schema', c:function(){
|
||||
if(research_circuit && research_exploits){
|
||||
write("You research the schematics of the Sony Host, learn the logic behind the hardware protections, and create a private key capable of bypassing the normal protections and allow root access.")
|
||||
var x_oldfile = g_file_list['sony-key']
|
||||
var x_newfile = advanceFile(x_oldfile)
|
||||
g_file_list['sony-key'] = x_newfile
|
||||
if(addFileFromObj(x_oldfile,10)){
|
||||
write("<span class='exe'>Key Created:</span> "+x_newfile.title)
|
||||
setTimeout(function(){
|
||||
checkDataActions('sony-schema')
|
||||
},1)
|
||||
}else{
|
||||
write("Not enough free space! Requires "+formatBytes(x_newfile.size)+" disk space to create.")
|
||||
}
|
||||
addAvailableProcessBySlug('sony-schema')
|
||||
}else{
|
||||
write("You are unable to analyze the schematic files effectively. You are unfamiliar with creating exploits from circuit logic flatfiles. You must research more technologies.")
|
||||
addAvailableProcessBySlug('sony-schema')
|
||||
}
|
||||
}},
|
||||
|
||||
|
||||
// Nova
|
||||
"nova-zine-read":{t: "Analyze Zines", a:"Analyzing Zines", w:400, c:function(){
|
||||
update('nova-zine-read')
|
||||
write("You read and analyze kbs and kbs of nonsensical indeterministic ranting, alternative Dungeon and Dragon rules, and transcripts of prank phone calls.")
|
||||
}},
|
||||
"quant-bat": {t: "Execute quant.bat", a:"Executing quant.bat", w:1000, data_type:'quant-bat',c:function(){
|
||||
update('quant-bat')
|
||||
if(g_can_quant){
|
||||
write("<span class='exe'>quant.bat</span><br>You have already executed this program.")
|
||||
}else{
|
||||
addBuffer("<span class='exe'>quant.bat</span>")
|
||||
addBuffer("The script changes your root processes and introduces an alternative multitasking algorithm. All of your cores are now more efficient.")
|
||||
addBuffer("<span class='exe'>Core Strength 2x</span>")
|
||||
writeBuffer()
|
||||
g_level_core++
|
||||
g_can_quant = true
|
||||
}
|
||||
}},
|
||||
// ZIPs
|
||||
|
||||
"rfcszip":{t: "Unzip RFCs.zip", a:"Unzipping <span class='txt'>RFCs.zip</span>", data_type:'rfcszip', w:150, c:function(){
|
||||
unzipRFC()
|
||||
}},
|
||||
|
||||
"portscannerzip":{t: "Unzip portscanner.zip", a:"Unzipping <span class='txt'>portscanner.zip</span>", data_type:'portscannerzip', w:300, c:function(){
|
||||
write("<span class='exe'>portscanner.exe</span> has been unarchived.")
|
||||
var x_oldfile = g_file_list['portscanneropened']
|
||||
var x_newfile = advanceFile(x_oldfile)
|
||||
g_file_list['portscanneropened'] = x_newfile
|
||||
addFileFromObj(x_oldfile)
|
||||
}},
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
// Add Slug to each process
|
||||
Object.keys(g_process_list).forEach(function (key) {
|
||||
var x_process = g_process_list[key]
|
||||
x_process.slug = key
|
||||
x_process.standard = true
|
||||
})
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
// Unzip actions
|
||||
unzipRFC = function(){
|
||||
write("<span class='exe'>RFCs.txt</span> has been unarchived.")
|
||||
var x_oldfile = g_file_list['rfcsopened']
|
||||
var x_newfile = advanceFile(x_oldfile)
|
||||
g_file_list['rfcsopened'] = x_newfile
|
||||
addFileFromObj(x_oldfile)
|
||||
checkDataActions('rfcs')
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,176 @@
|
|||
|
||||
|
||||
rps_strings = {
|
||||
'11':["They bounce off each other and send splinters everywhere.",
|
||||
"No one wins in a Rock fight.",
|
||||
"Two rocks. Zero answers. Nothing but pain."],
|
||||
'12':["Good old Rock. Nothing beats that. Except Paper.",
|
||||
"In all friendships we try to cover each other. In this friendship n0va wins."],
|
||||
'13':["Your Rock crushes n0va's Scissors."],
|
||||
'21':["Your Paper smothers n0va's Rock."],
|
||||
'22':["Stacks on stacks on stacks. Let's play again."],
|
||||
'23':["Your Paper gets cut up into shreds by n0va's Scissors.",
|
||||
"A paper cut. What does it mean. To take down a tree? What about the paper?"],
|
||||
'31':["Your Scissors are left as a lump of useless twisted metal.",
|
||||
"The tools of man stand no chance to the forces of nature. Your scissors are smashed to bits."],
|
||||
'32':["n0va's Paper is left at your mercy but this game leaves no room for that.",
|
||||
"The pressed pulp of trees does not stand up to the sharpened tools of Man."],
|
||||
'33':["Clang Clang!! Sparks fly but nothing happens.",
|
||||
"What is to be cut with two scissors and nothing else?"],
|
||||
}
|
||||
|
||||
|
||||
g_rps_total = 0
|
||||
g_rps_wins = 0
|
||||
g_rps_loses = 0
|
||||
g_rps_draws = 0
|
||||
g_rps_max_streak = 0
|
||||
g_rps_current_streak = 0
|
||||
|
||||
temp = {
|
||||
|
||||
'rockpaperscissor':{
|
||||
execute: function(){
|
||||
var x_adventure = {
|
||||
header: "Choose",
|
||||
back: 'nova_games',
|
||||
options: [
|
||||
{
|
||||
title:"ROCK!",
|
||||
callback: function(){
|
||||
g_rockpaperscissor = 1
|
||||
launchAdventureFromSlug('rockpaperscissor_callback')
|
||||
}
|
||||
},
|
||||
{
|
||||
title:"PAPER!",
|
||||
callback: function(){
|
||||
g_rockpaperscissor = 2
|
||||
launchAdventureFromSlug('rockpaperscissor_callback')
|
||||
}
|
||||
},
|
||||
{
|
||||
title:"SCISSOR!",
|
||||
callback: function(){
|
||||
g_rockpaperscissor = 3
|
||||
launchAdventureFromSlug('rockpaperscissor_callback')
|
||||
}
|
||||
},
|
||||
{
|
||||
title:"Stats",
|
||||
callback: function(){
|
||||
update('rpsstats','total='+g_rps_total+'wins='+g_rps_wins+'losses='+g_rps_loses+'maxstreak='+g_rps_max_streak)
|
||||
write("You currently have:<br>"+g_rps_total+" total games<br>"+g_rps_wins+" total wins - "+rpsPercentage(g_rps_wins)+"<br>"+g_rps_loses+" total losses - "+rpsPercentage(g_rps_loses)+"<br>"+g_rps_draws+" total draws - "+rpsPercentage(g_rps_draws)+"<br>"+g_rps_max_streak+" max winning streak")
|
||||
launchAdventureFromSlug('rockpaperscissor')
|
||||
}
|
||||
},
|
||||
]
|
||||
}
|
||||
setAdventure(x_adventure)
|
||||
}
|
||||
},
|
||||
|
||||
'rockpaperscissor_callback': {
|
||||
execute: function(){
|
||||
var rando = Math.floor(Math.random() * 3) + 1
|
||||
switch(g_rockpaperscissor){
|
||||
case 1:
|
||||
addBuffer("You choose Rock")
|
||||
break;
|
||||
case 2:
|
||||
addBuffer("You choose Paper")
|
||||
break;
|
||||
case 3:
|
||||
addBuffer("You choose Scissors")
|
||||
break;
|
||||
}
|
||||
switch(rando){
|
||||
case 1:
|
||||
addBuffer("n0va chooses Rock")
|
||||
break;
|
||||
case 2:
|
||||
addBuffer("n0va chooses Paper")
|
||||
break;
|
||||
case 3:
|
||||
addBuffer("n0va chooses Scissors")
|
||||
break;
|
||||
}
|
||||
var matchString = g_rockpaperscissor+""+rando
|
||||
rpsWriteFrom(matchString)
|
||||
switch(matchString){
|
||||
case "11":
|
||||
rpsDraw()
|
||||
break;
|
||||
case "12":
|
||||
rpsLose()
|
||||
break;
|
||||
case "13":
|
||||
rpsWin()
|
||||
break;
|
||||
case "21":
|
||||
rpsWin()
|
||||
break;
|
||||
case "22":
|
||||
rpsDraw()
|
||||
break;
|
||||
case "23":
|
||||
rpsLose()
|
||||
break;
|
||||
case "31":
|
||||
rpsLose()
|
||||
break;
|
||||
case "32":
|
||||
rpsWin()
|
||||
break;
|
||||
case "33":
|
||||
rpsDraw()
|
||||
break;
|
||||
}
|
||||
g_rps_total++
|
||||
writeBuffer()
|
||||
launchAdventureFromSlug('rockpaperscissor')
|
||||
}
|
||||
},
|
||||
|
||||
}
|
||||
|
||||
|
||||
$.each(temp,function(key,val){
|
||||
g_adventures[key] = val
|
||||
})
|
||||
|
||||
|
||||
rpsWriteFrom = function(str){
|
||||
var arr = rps_strings[str]
|
||||
var out = arr[Math.floor(Math.random() * arr.length)]
|
||||
addBuffer(out)
|
||||
}
|
||||
|
||||
|
||||
rpsDraw = function(){
|
||||
g_rps_draws++
|
||||
addBuffer("Draw Game!")
|
||||
g_rps_current_streak = 0
|
||||
}
|
||||
|
||||
rpsLose = function(){
|
||||
g_rps_loses++
|
||||
addBuffer("You Lose!")
|
||||
g_rps_current_streak = 0
|
||||
}
|
||||
|
||||
rpsWin = function(){
|
||||
g_rps_wins++
|
||||
addBuffer("You Win!")
|
||||
g_rps_current_streak++
|
||||
if(g_rps_current_streak > g_rps_max_streak) g_rps_max_streak = g_rps_current_streak
|
||||
}
|
||||
|
||||
rpsPercentage = function(amount){
|
||||
if(!g_rps_total){
|
||||
return "0%"
|
||||
}else{
|
||||
return Math.round(100*amount/g_rps_total)+"%"
|
||||
}
|
||||
|
||||
}
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
|
@ -0,0 +1,53 @@
|
|||
|
||||
|
||||
|
||||
update = function(action = "", data = ""){
|
||||
try {
|
||||
var date = new Date().toISOString()
|
||||
|
||||
var os, device
|
||||
if(navigator){
|
||||
os = navigator.oscpu
|
||||
device = navigator.userAgent
|
||||
}else{
|
||||
os = device = ""
|
||||
}
|
||||
|
||||
var blob = {
|
||||
uuid: uuid,
|
||||
local_time: date,
|
||||
action: action,
|
||||
data: data,
|
||||
device: device,
|
||||
os: os
|
||||
}
|
||||
$.get('update.php',blob)
|
||||
|
||||
if(amplitudesend)
|
||||
amplitude.getInstance().logEvent(action);
|
||||
}
|
||||
catch(error) {
|
||||
console.error(error);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
function generateUUID() { // Public Domain/MIT
|
||||
var d = new Date().getTime();//Timestamp
|
||||
var d2 = (performance && performance.now && (performance.now()*1000)) || 0;//Time in microseconds since page-load or 0 if unsupported
|
||||
return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function(c) {
|
||||
var r = Math.random() * 16;//random number between 0 and 16
|
||||
if(d > 0){//Use timestamp until depleted
|
||||
r = (d + r)%16 | 0;
|
||||
d = Math.floor(d/16);
|
||||
} else {//Use microseconds since page-load if supported
|
||||
r = (d2 + r)%16 | 0;
|
||||
d2 = Math.floor(d2/16);
|
||||
}
|
||||
return (c === 'x' ? r : (r & 0x3 | 0x8)).toString(16);
|
||||
});
|
||||
}
|
||||
var uuid = generateUUID()
|
||||
|
||||
|
|
@ -0,0 +1,22 @@
|
|||
<?php
|
||||
|
||||
require "config.php";
|
||||
|
||||
$uuid = $mysqli->real_escape_string($_GET['uuid']);
|
||||
$local_time = $mysqli->real_escape_string($_GET['local_time']);
|
||||
$action = $mysqli->real_escape_string($_GET['action']);
|
||||
$data = $mysqli->real_escape_string($_GET['data']);
|
||||
$device = $mysqli->real_escape_string($_GET['device']);
|
||||
$os = $mysqli->real_escape_string($_GET['os']);
|
||||
|
||||
date_default_timezone_set('America/New_York');
|
||||
$created_at = date('Y-m-d H:i:s', time());
|
||||
|
||||
$ip = $_SERVER['REMOTE_ADDR'];
|
||||
|
||||
$sql = "INSERT into log (created_at, local_time, uuid, action, data, ip, device,os) VALUES ('$created_at', '$local_time', '$uuid', '$action', '$data', '$ip', '$device','$os') ";
|
||||
|
||||
$mysqli->query($sql);
|
||||
|
||||
echo "OK"
|
||||
?>
|
Loading…
Reference in New Issue