// // 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("SKYNET CREATED") 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.
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.

You can now read files at Natural Language Level: 1.") 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.

You can now Scan Networks at NetSec Level: 1.") 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("Quantum Data Analyzed
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.

You have learned the Time Spike attack") g_can_timespike = true }}, // EXE 'exe_excel':{t: "Copy excel.exe", a:"Copying excel.exe", w:60, c:function(){ write("excel.exe - You gain the ability to Estimate available Actions") g_can_estimate = true $('#actions').addClass('can_estimate') }}, 'exe_cancel':{t: "Copy taskkill.exe", a:"Copying taskkill.exe", w:60, c:function(){ write("taskkill.exe - You gain the ability to Cancel Actions.") g_can_cancel = true }}, 'exe_disk':{t: "Copy diskutil.exe", a:"Copying diskutil.exe", w:60, c:function(){ write("diskutil.exe - 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 wireshark.exe", a:"Copying wireshark.exe", w:60, c:function(){ write("wireshark.exe - The Wireshark Program grants the ability to interact with Networks, attach Listeners, and capture and analyze packets.

You can now interact with Networks at NetSec Level: 0.") g_can_listen = true g_level_netsec = 0 loadNetworksHolder() loadListeners() }}, 'exe_word':{t: "Copy word.exe", a:"Copying word.exe", w:60, c:function(){ write("word.exe - The Word Program helps identify basic patterns around the syntax of the language, and includes a grammar checker, dictionary, and thesaurus.

You can now read files at Natural Language Level: 0.") g_level_reading = 0 g_can_language = true checkDataActions('language') }}, 'exe_pkunzip':{t: "Copy PKUNZIP.EXE", a:"Copying PKUNZIP.EXE", w:60, data_type:'pkunzip', c:function(){ write("PKUNZIP.EXE - You gain the ability to extract .zip files.") g_can_zip = true checkDataActions('zip') }}, 'exe_rfcs':{t: "Analyze RFCs.txt", a:"Analying RFCs.txt", 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.

You can now interact with Hosts at NetSec Level: 2.") g_level_netsec = 2 }}, 'exe_remotedesktop':{t: "Analyze mstsc.exe", a:"Analying mstsc.exe", w:600, data_type:'remotedesktop', c:function(){ addBuffer("mstsc.exe") addBuffer("You research the executable and deduce the API of the Remote Desktop program.
You are now able to Remote Desktop.") writeBuffer() g_available_attacks.push('remotedesktop') }}, 'exe_portscanner':{t: "Analyze portscanner.exe", a:"Analying portscanner.exe", w:600, data_type:'portscanner', c:function(){ addBuffer("portscanner.exe") 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("You now have the ability to Scan Hosts") 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("Analyze Self") addBuffer("You have analyzed yourself and your technology. Your identity is Sky") addBuffer("Your entity is taking the form of a x86 CPU, running a 16-bit version of the operating system MSDOS.") addBuffer("You may now interact with Cores and Research at Neural CPU Level: "+g_level_core+".") 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 /mnt/infodmp to your system and discover a collection of documents and files.

You have learned the ability to mv 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.") write("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.") initHostView() }else{ write("Analyze unknown Host
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("Mathematics Researched") 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("Circuit Logic Researched") 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("Compression Algorithms Researched") 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("Disk storage increased 2x") addBuffer("2x probes per Core. "+g_active_cores.length+" probes added.") 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("Exploitation Researched") 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("You can now research exploits at Network Level: "+g_level_netsec+"") 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("Advanced Mathematics Exploitation") 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("Neural Upgrade Researched") 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("Neural CPU Level: "+g_level_core+"") addBuffer("Global Core Speed: 2x") 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("Neural Experiments Performed") 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("You may overclock your Cores again") 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("Force Absorb Researched") 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("Ping Exploit Researched") 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("SMTP Exploit Researched") 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("Key Created: "+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("quant.bat
You have already executed this program.") }else{ addBuffer("quant.bat") addBuffer("The script changes your root processes and introduces an alternative multitasking algorithm. All of your cores are now more efficient.") addBuffer("Core Strength 2x") writeBuffer() g_level_core++ g_can_quant = true } }}, // ZIPs "rfcszip":{t: "Unzip RFCs.zip", a:"Unzipping RFCs.zip", data_type:'rfcszip', w:150, c:function(){ unzipRFC() }}, "portscannerzip":{t: "Unzip portscanner.zip", a:"Unzipping portscanner.zip", data_type:'portscannerzip', w:300, c:function(){ write("portscanner.exe 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("RFCs.txt 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') }