add main-site
This commit is contained in:
parent
0bcf58c844
commit
0a3a77a9ff
52 changed files with 11206 additions and 0 deletions
77
main-site/CyberTermHack/CONSOLE/console.html
Normal file
77
main-site/CyberTermHack/CONSOLE/console.html
Normal file
|
@ -0,0 +1,77 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="fr">
|
||||
<head>
|
||||
<title>CyberTermHack</title>
|
||||
<meta charset="UTF-8">
|
||||
<style>
|
||||
:root{
|
||||
--bg-color: black;
|
||||
--txt-color: white;
|
||||
}
|
||||
html, body{
|
||||
background-color:var(--bg-color);
|
||||
color: var(--txt-color);
|
||||
margin:0;
|
||||
height:100%;
|
||||
min-height:100vh;
|
||||
display:flex;
|
||||
flex-direction:column;
|
||||
word-wrap: break-word;
|
||||
word-break: break-all;
|
||||
z-index:2
|
||||
}
|
||||
.second {
|
||||
flex-grow: 1;
|
||||
}
|
||||
#termcontent{
|
||||
display: fixed;
|
||||
left:0;
|
||||
top:0;
|
||||
height:95%;
|
||||
width:100%;
|
||||
overflow: auto
|
||||
}
|
||||
#divinput{
|
||||
display:flex;
|
||||
left:0;
|
||||
bottom:0;
|
||||
height:5%;
|
||||
width:100%
|
||||
}
|
||||
#terminpt{
|
||||
border: 0px solid !important;
|
||||
background-color: var(--bg-color);
|
||||
color:var(--txt-color);
|
||||
width:95%
|
||||
}
|
||||
/*#terminptdiv{
|
||||
float: none
|
||||
}*/
|
||||
*:focus {
|
||||
outline: none;
|
||||
}
|
||||
/*#divofinfos{
|
||||
float:left
|
||||
}*/
|
||||
#matrixcanvas{
|
||||
width:100%;
|
||||
height:100%;
|
||||
position:fixed;
|
||||
z-index:-1
|
||||
}
|
||||
</style>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
</head>
|
||||
<body>
|
||||
<!--username and ip: green, $ or %: white, commands: white-->
|
||||
<div id="termcontent">
|
||||
</div>
|
||||
<div id="divinput">
|
||||
<span id=spanofinfos><span id="inptindic"></span><span id="inptname"></span></span><span class=second><input id=terminpt type="text"/></span>
|
||||
</div>
|
||||
<canvas id=matrixcanvas style='width:100%; height: 100%'>
|
||||
</canvas>
|
||||
<script src="//api.gzod01.fr/termapi.js"></script>
|
||||
<script src="console.js"></script>
|
||||
</body>
|
||||
</html>
|
10
main-site/CyberTermHack/CONSOLE/console.js
Normal file
10
main-site/CyberTermHack/CONSOLE/console.js
Normal file
|
@ -0,0 +1,10 @@
|
|||
function consoleloop(){
|
||||
let x= terminput('')
|
||||
termshow('executing : '+x+' ...')
|
||||
try{
|
||||
let nfunc = new Function(x)
|
||||
termshow(nfunc())
|
||||
}catch(e){
|
||||
termshow('error: '+e)
|
||||
}
|
||||
}
|
|
@ -0,0 +1,479 @@
|
|||
// TERM API BY GZOD01 (FROM CYBERTERMHACK BY GZOD01)
|
||||
|
||||
|
||||
// the variable to check if the input is complete (if the user press enter)
|
||||
var inputcomplete = false
|
||||
|
||||
// function to choose a random int (random.randint() in python)
|
||||
function randint(min, max){
|
||||
return Math.floor(Math.random() * (max - min + 1) ) + min;
|
||||
}
|
||||
|
||||
// START OF MATRIX CODE
|
||||
// function to stop the matrix (delete the canvas and recreate it)
|
||||
function stopmatrix(){
|
||||
document.getElementById('matrixcanvas').remove()
|
||||
let nc = document.createElement('canvas')
|
||||
nc.setAttribute('id','matrixcanvas')
|
||||
nc.style.width = '100%'
|
||||
nc.style.height ='0%'
|
||||
document.body.appendChild(nc)
|
||||
}
|
||||
//function to start the matrix (start the dropdown of letters etc.)
|
||||
function matrix(color){
|
||||
let tcolor = ''
|
||||
if(color==='cyan'){
|
||||
tcolor ='#0ff'
|
||||
}
|
||||
else if(color==='blue'){
|
||||
tcolor='#00f'
|
||||
}
|
||||
else if(color==='magenta'){
|
||||
tcolor='#f0f'
|
||||
}
|
||||
else if(color==='red'){
|
||||
tcolor='#f00'
|
||||
}
|
||||
else if(color==='green'){
|
||||
tcolor='#0f0'
|
||||
}
|
||||
else if(color==='yellow'){
|
||||
tcolor='#ff0'
|
||||
}
|
||||
else if(color==='white'){
|
||||
tcolor='#fff'
|
||||
}
|
||||
else if(color==='purple'){
|
||||
tcolor='#303'
|
||||
}
|
||||
else{
|
||||
tcolor= '#0f0'
|
||||
}
|
||||
var canvas = document.getElementById('matrixcanvas'),
|
||||
ctx = canvas.getContext('2d');
|
||||
|
||||
canvas.style.height = '100%'
|
||||
canvas.width = window.innerWidth;
|
||||
canvas.height = window.innerHeight;
|
||||
var letters = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890&éèçà@æ€ŧøþ@ßðđŋłĸħłµł»¢µ$£ù%^¨';
|
||||
letters = letters.split('');
|
||||
|
||||
|
||||
var fontSize = 10,
|
||||
columns = canvas.width / fontSize;
|
||||
|
||||
|
||||
var drops = [];
|
||||
for (var i = 0; i < columns; i++) {
|
||||
drops[i] = 1;
|
||||
}
|
||||
|
||||
|
||||
function draw() {
|
||||
ctx.fillStyle = 'rgba(0, 0, 0, .1)';
|
||||
ctx.fillRect(0, 0, canvas.width, canvas.height);
|
||||
for (var i = 0; i < drops.length; i++) {
|
||||
var text = letters[Math.floor(Math.random() * letters.length)];
|
||||
ctx.fillStyle = tcolor;
|
||||
ctx.fillText(text, i * fontSize, drops[i] * fontSize);
|
||||
drops[i]++;
|
||||
if (drops[i] * fontSize > canvas.height && Math.random() > .95) {
|
||||
drops[i] = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
setInterval(draw, 33);
|
||||
}
|
||||
// END OF MATRIX CODE
|
||||
|
||||
// function like the time.sleep in python
|
||||
function sleep(s) {
|
||||
let ms = s*1000
|
||||
return new Promise(resolve => setTimeout(resolve, ms));
|
||||
}
|
||||
// function like random.choice() in python
|
||||
function randchoice(list){
|
||||
console.log(list[randint(0,list.length-1)])
|
||||
return list[randint(0,list.length-1)]
|
||||
}
|
||||
|
||||
// TODO : var historic = []
|
||||
|
||||
// lastx = the last input do (the input you get when you press up arrow) to replace with an historic
|
||||
var lastx = ""
|
||||
|
||||
// the function to execute when up arrow pressed
|
||||
function historic(){
|
||||
// TODO : terminpt.value=historic[historic.lengh-1-index]
|
||||
document.getElementById('terminpt').value = lastx // to replace with an historic (line above) , set the input value (content) to the last input executed
|
||||
}
|
||||
// when a key is down
|
||||
onkeydown = function(e){
|
||||
// if the key is the tab key (keyCode 9)
|
||||
if(e.keyCode==9){
|
||||
// execute the autocomplete function
|
||||
autocomplete()
|
||||
}
|
||||
}
|
||||
// when a key is up
|
||||
onkeyup = function(e){
|
||||
// if the key is enter key (keyCode 13)
|
||||
if(e.keyCode==13){
|
||||
// set the inputcomplete variable to true to inform the terminput function that the user press enter
|
||||
inputcomplete = true
|
||||
}
|
||||
// if the input is up arrow key (keyCode 38)
|
||||
else if(e.keyCode == 38){
|
||||
// execute the historic function
|
||||
historic()
|
||||
}
|
||||
}
|
||||
// function like the print() function in python, add the text to the #termcontent div
|
||||
function termshow(str){
|
||||
let tc = document.getElementById('termcontent')
|
||||
let nchild = document.createElement('div')
|
||||
str = str.replace('<','<')
|
||||
str= str.replace('>','>')
|
||||
str= str.replace('&infg&','<')
|
||||
str = str.replace('&supd&','>')
|
||||
nchild.innerHTML = str.replace('\n','<br>')
|
||||
tc.appendChild(nchild)
|
||||
document.getElementById('termcontent').scrollTo(0,document.getElementById('termcontent').scrollHeight)
|
||||
}
|
||||
// the input() function of python, check if the input is complete (see the inputcomplete variable and the onkeyup (e.keyCode == 13) execution
|
||||
function terminput(str){
|
||||
let tiname = document.getElementById('inptname')
|
||||
tiname.innerHTML = str
|
||||
let inpt = document.getElementById('terminpt')
|
||||
if(inputcomplete){
|
||||
console.log(inpt.value)
|
||||
inputcomplete=false
|
||||
let resultat = inpt.value
|
||||
inpt.value = ''
|
||||
return resultat
|
||||
}
|
||||
else{
|
||||
//return 'ERR' if the input isn't complete
|
||||
return 'ERR'
|
||||
}
|
||||
}
|
||||
// replace this list with the list of your commands
|
||||
var list_of_command = ['ls','ssh','pbk','exit','theme','matrix','hack','attack','save','import','help','exit']
|
||||
// autocomplete when tab press show all the command starting with the value in your input
|
||||
function autocomplete(){
|
||||
let inptval = document.getElementById('terminpt').value
|
||||
termshow('List of available commands starting with " '+inptval+' " :')
|
||||
for(let i = 0; i<list_of_command.length; i++){
|
||||
if(list_of_command[i].startsWith(inptval)){
|
||||
termshow('- '+list_of_command[i])
|
||||
}
|
||||
}
|
||||
}
|
||||
// x= the current input
|
||||
var x = ""
|
||||
|
||||
// START OF FUNCTIONS TO USE WITHOUT INTERACT WITH THE INTERFACE
|
||||
// Send the current input (function to set the inputcomplete as true)
|
||||
function sendinput(){inputcomplete=true}
|
||||
// setinput(str) function to set the value of the input from function
|
||||
function setinput(str){document.getElementById('terminpt').value=str}
|
||||
// execcommand(str) set input and send input
|
||||
function execcommand(str){setinput(str); sendinput()}
|
||||
// last() historic and sendinput
|
||||
function last(){historic(); sendinput()}
|
||||
// autoc setinput, autocomplete
|
||||
function autoc(str){setinput(str); autocomplete();}
|
||||
// END OF FUNCTIONS TO USE WITHOUT INTERACT WITH THE INTERFACE
|
||||
// END OF THE API CODE
|
||||
|
||||
|
||||
|
||||
// START OF CYBERTERMHACK CODE
|
||||
function splitaddr(complete, cmd){
|
||||
try{
|
||||
let c = complete.substring(cmd.length)
|
||||
let u = c.split('@')[0]
|
||||
let a = c.split('@')[1]
|
||||
if (a==undefined){
|
||||
termshow('Please complete the command like this: '+cmd+' user@address')
|
||||
return 'ERROR'
|
||||
}
|
||||
else{
|
||||
return [u, a]
|
||||
}
|
||||
}
|
||||
catch(e){
|
||||
console.error(e)
|
||||
termshow('Please complete the command like this: '+cmd+' user@address')
|
||||
return 'ERROR'
|
||||
}
|
||||
}
|
||||
function infos(){
|
||||
termshow('01010101010101010<br>1.CyberTermGame.1<br>0.....By GZod01.....0<br>10101010101010101<br>Infos on the game : Hello my name is GZod01 and i make this game in javascript (base game in python) "for fun", I know this game is not reflecting the reality of the command on linux or windows machines but... it is a game...<br>Sorry if the english is not very good i speak french...')
|
||||
}
|
||||
stopmatrix()
|
||||
var passwordlist = ["my_password","helloworld","ultra_secure_password","my_birthday"]
|
||||
var filelist = ['picture.png','personnal_datas.csv', 'helloworld.py','i_hate_hackers.txt','speech_for_tomorrow.md', '.ha_ha_this_is_super_secret_file.txt','mydirectory/']
|
||||
var connected = false
|
||||
var datased = false
|
||||
var STOP = false
|
||||
infos()
|
||||
var user = ""
|
||||
var ip = ""
|
||||
var password = ""
|
||||
var destroyedip = []
|
||||
var codeline = ["fn destroy(oiaf){executeshellcomand('destroy oiaf')}","hack-server()","destroy()","fn hack-server(files){for(var i = 0, i<len(files)){if (type_of_file(files[i])==='password_files_and_datas_files'){execcommand('copyfile_to_my_computer'); destroy(files)};", "print(01020003957058098409438409340&àà_09232983983983923999832983928398329389238938923892382938923899201809381093809é'802984029804802948049820840938éàç8309é_à'ç_éà'_09790872çà'àç_éè409724097240942èàçé'8è290479024798047298047904èé4908éè4) in serverdatas"]
|
||||
termshow('starting session ...')
|
||||
var me = ''
|
||||
named = false
|
||||
// example of serversdatas: "ip":{"destroyed":true (or false), "files":listoffiles, "password":"password"}
|
||||
var gamedatas = {
|
||||
"serversdatas":{},
|
||||
"username": me,
|
||||
'colorscheme': 'default' //it can be green / red / blue / yellow
|
||||
}
|
||||
function gettheme(){
|
||||
let r = document.querySelector(':root')
|
||||
if (gamedatas.colorscheme ==='default'){
|
||||
r.style.setProperty('--txt-color','white')
|
||||
}
|
||||
else if (gamedatas.colorscheme === 'green'){
|
||||
r.style.setProperty('--txt-color','green')
|
||||
}
|
||||
else if (gamedatas.colorscheme === 'red'){
|
||||
r.style.setProperty('--txt-color','red')
|
||||
}
|
||||
else if (gamedatas.colorscheme === 'blue'){
|
||||
r.style.setProperty('--txt-color','blue')
|
||||
}
|
||||
else if (gamedatas.colorscheme === 'yellow'){
|
||||
r.style.setProperty('--txt-color','yellow')
|
||||
}
|
||||
}
|
||||
var ipdatas = {}
|
||||
document.getElementById('terminpt').focus()
|
||||
async function loop(){
|
||||
gamedatas.serversdatas = ipdatas
|
||||
if(named){
|
||||
if(connected){
|
||||
x = terminput(`${user}@${ip} $ `)
|
||||
}
|
||||
else{
|
||||
x = terminput(`${me}@MYCOMPUTER # `)
|
||||
}
|
||||
if(x==='ERR'){}
|
||||
else{
|
||||
//historic.push(x)
|
||||
lastx = x
|
||||
let lowx = x.toLowerCase()
|
||||
if(connected){
|
||||
termshow(`${user}@${ip} $ ${x}`)
|
||||
}
|
||||
else{
|
||||
termshow(`${me}@MYCOMPUTER # ${x}`)
|
||||
}
|
||||
if (lowx.startsWith('ssh')){
|
||||
if (connected){
|
||||
termshow('error you already are in distant server')
|
||||
}
|
||||
else{
|
||||
if (splitaddr(x, 'ssh') === 'ERROR'){
|
||||
}
|
||||
else{
|
||||
user = splitaddr(x, 'ssh')[0]
|
||||
ip = splitaddr(x, 'ssh')[1]
|
||||
if(ipdatas[ip]==undefined){
|
||||
ipdatas[ip]={}
|
||||
}
|
||||
termshow('connect to the computer with the ip '+ip+' from the user '+user+' ...')
|
||||
if (ipdatas[ip]['destroyed']){
|
||||
termshow('error this server is destroyed')
|
||||
}
|
||||
else{
|
||||
if(ipdatas[ip]['password']==undefined){
|
||||
termshow('you don\'t have the password of this server')
|
||||
}
|
||||
else{
|
||||
await sleep(1)
|
||||
termshow('Password: AUTOMATIC_PASSWORD_SYSTEM')
|
||||
// while(temppass != ipdatas[ip]['password']){
|
||||
// temppass = terminput('Password: ')
|
||||
// }
|
||||
await sleep(1)
|
||||
termshow('connected')
|
||||
connected=true
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (lowx.startsWith('pbk')){
|
||||
if (connected){
|
||||
termshow('error you are on a distant server')
|
||||
}
|
||||
else{
|
||||
if (splitaddr(x,'pbk')==='ERROR'){
|
||||
splitaddr(x,'pbk')
|
||||
}
|
||||
else{
|
||||
user=splitaddr(x, 'pbk')[0]
|
||||
ip = splitaddr(x, 'pbk')[1]
|
||||
if(ipdatas[ip]==undefined){
|
||||
ipdatas[ip]={}
|
||||
}
|
||||
termshow('Breaking the password of the user '+user+' to the computer with the ip '+ip+' ...')
|
||||
password= randchoice(passwordlist)
|
||||
ipdatas[ip]['password']=password
|
||||
termshow('The password is : '+ password)
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (lowx.startsWith('theme')){
|
||||
if(lowx==='theme'||lowx==='theme '){
|
||||
termshow('Switch the theme with this command,<br> the available colors are : default , yellow , red , blue , green . <br> execute the command like this: theme default or theme yellow , etc.')
|
||||
}
|
||||
else{
|
||||
let nx = x.substring('theme '.length)
|
||||
if(nx==='yellow' || nx ==='blue' || nx==='default' || nx ==='red' || nx === 'green'){
|
||||
gamedatas.colorscheme = nx
|
||||
gettheme()
|
||||
}
|
||||
else{
|
||||
termshow('Switch the theme with this command,<br> the available colors are : default , yellow , red , blue , green . <br> execute the command like this: theme default or theme yellow , etc.')
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (lowx.startsWith('matrix')){
|
||||
if(lowx==='matrix'||lowx==='matrix '){
|
||||
matrix(gamedatas.colorscheme)
|
||||
}
|
||||
else{
|
||||
let nx = x.substring('matrix '.length)
|
||||
if(nx==='yellow' || nx ==='blue' || nx==='white' || nx ==='red' || nx === 'green'||nx=='purple'|| nx=='cyan' || nx=='magenta'){
|
||||
matrix(nx)
|
||||
}
|
||||
else if(nx==='stop'){
|
||||
stopmatrix()
|
||||
}
|
||||
else{
|
||||
termshow('Switch the theme with this command,<br> the available colors are : default , yellow , red , blue , green . <br> execute the command like this: theme default or theme yellow , etc.')
|
||||
}
|
||||
}
|
||||
}
|
||||
else if(lowx==='save'){
|
||||
localStorage.setItem('hackergamedatas',JSON.stringify(gamedatas))
|
||||
termshow('Data saved')
|
||||
termshow(localStorage.getItem('hackergamedatas'))
|
||||
}
|
||||
else if(lowx==='import'){
|
||||
let tmpdatas = localStorage.getItem('hackergamedatas')
|
||||
if (tmpdatas == undefined){
|
||||
termshow('you don\'t have any data saved, please execute the save command before to import')
|
||||
}
|
||||
else{
|
||||
gamedatas = JSON.parse(tmpdatas)
|
||||
}
|
||||
}
|
||||
else if (lowx=='ls'){
|
||||
if (connected){
|
||||
if (ipdatas[ip]['files'] == undefined){
|
||||
termshow('This is the file on the distant machine')
|
||||
let fileiplist = []
|
||||
for(let i=0; i < parseInt(randint(1,10)); i++){
|
||||
let currentchoicefile = randchoice(filelist)
|
||||
termshow('-'+currentchoicefile)
|
||||
fileiplist.push(currentchoicefile)
|
||||
}
|
||||
ipdatas[ip]['files'] = fileiplist
|
||||
}
|
||||
else{
|
||||
termshow('This is the file on the distant machine')
|
||||
for(let i = 0; i<ipdatas[ip]['files'].length; i++){
|
||||
termshow('-'+ ipdatas[ip]['files'][i])
|
||||
}
|
||||
}
|
||||
}
|
||||
else{
|
||||
if (datased){
|
||||
termshow('This is the file on your computer: <br>- my_datas.zip <br>- servers_data.zip')
|
||||
}
|
||||
else{
|
||||
termshow('This is the file on your computer: <br>- my_datas.zip')
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (lowx=='attack'){
|
||||
if( connected){
|
||||
termshow('the attack start... <br> copying all the data in this server to your servers_data.zip file in your computer (it include all the file, folder etc.)...<br>breaking the server...<br>Disconnected: The server is destroy')
|
||||
connected = false
|
||||
datased = true
|
||||
ipdatas[ip]['destroyed'] = true
|
||||
}
|
||||
else{
|
||||
termshow('error you are not connected, please connect to a distant server before executing this command')
|
||||
}
|
||||
}
|
||||
else if( x==='help'){
|
||||
termshow('The available commands: <br>- help : print this message<br>- ls : list the files and folders<br>- pbk (only in your computer) : Get the password of an user from an ip address<br>- ssh (only in your computer) : conect to a distant server with an user and an ip address (you have to use pbk to get the password)<br>- attack (only in ssh servers) : start an attack that will add all the datas on the server in your servers_data.zip file and will destroy the server (warning this will no destroy only the server from the user it will destroy ALL the server (the address))<br>- theme : switch the theme of the game\n- save : save the game in your localStorage (alternative to cookies)\n- import : import the game from your localStorage\n- matrix : start or stop a matrix rain animation (just for fun...)\n- exit : if you are connected to distant server (ssh) it deconnect you, if you are not connected it exit this game<br>- infos : display infos on this game')
|
||||
}
|
||||
else if (lowx==='exit'){
|
||||
if (connected){
|
||||
termshow('disconnecting...')
|
||||
connected=false
|
||||
}
|
||||
else{
|
||||
termshow('Exiting the session...')
|
||||
termshow('Exiting the game, thank to play to this game, don\'t hesitate to help me or to give me your feedback')
|
||||
STOP = true
|
||||
location = '/'
|
||||
}
|
||||
}
|
||||
else if (lowx==='hack'){
|
||||
if (connected){
|
||||
termshow('--Start-of-the-hacking-program--')
|
||||
for(let i = 0; i<randint(0,50);i++){
|
||||
termshow(randchoice(codeline))
|
||||
}
|
||||
}
|
||||
else{
|
||||
termshow('you have to be connected')
|
||||
}
|
||||
}
|
||||
else if (lowx=='infos'){
|
||||
infos()
|
||||
}
|
||||
else if(x.startsWith('$$$')){
|
||||
if(x === '$$$' || x === '$$$ '){
|
||||
termshow('this command is for execute js code enter your js code after the $$$')
|
||||
}
|
||||
else{
|
||||
try{
|
||||
let tempcode = x.substring('$$$ '.length)
|
||||
let newfunc = new Function (tempcode)
|
||||
newfunc()
|
||||
}
|
||||
catch(e){
|
||||
termshow('Il y a eu une erreur : '+e)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
else{
|
||||
let temp = terminput('your name: ')
|
||||
if(temp.length<4){
|
||||
document.getElementById('inptindic').innerHTML ='your name must have more than 4 characters '
|
||||
}
|
||||
else{
|
||||
me = temp
|
||||
named = true
|
||||
document.getElementById('inptindic').innerHTML=''
|
||||
}
|
||||
}
|
||||
window.requestAnimationFrame(loop)
|
||||
}
|
||||
loop()
|
||||
// END OF CYBERTERMHACK CODE
|
|
@ -0,0 +1,499 @@
|
|||
// TERM API BY GZOD01 (FROM CYBERTERMHACK BY GZOD01)
|
||||
|
||||
|
||||
// the variable to check if the input is complete (if the user press enter)
|
||||
var inputcomplete = false
|
||||
|
||||
// function to choose a random int (random.randint() in python)
|
||||
function randint(min, max){
|
||||
return Math.floor(Math.random() * (max - min + 1) ) + min;
|
||||
}
|
||||
|
||||
// START OF MATRIX CODE
|
||||
// function to stop the matrix (delete the canvas and recreate it)
|
||||
function stopmatrix(){
|
||||
document.getElementById('matrixcanvas').remove()
|
||||
let nc = document.createElement('canvas')
|
||||
nc.setAttribute('id','matrixcanvas')
|
||||
nc.style.width = '100%'
|
||||
nc.style.height ='0%'
|
||||
document.body.appendChild(nc)
|
||||
}
|
||||
//function to start the matrix (start the dropdown of letters etc.)
|
||||
function matrix(color){
|
||||
let tcolor = ''
|
||||
if(color==='cyan'){
|
||||
tcolor ='#0ff'
|
||||
}
|
||||
else if(color==='blue'){
|
||||
tcolor='#00f'
|
||||
}
|
||||
else if(color==='magenta'){
|
||||
tcolor='#f0f'
|
||||
}
|
||||
else if(color==='red'){
|
||||
tcolor='#f00'
|
||||
}
|
||||
else if(color==='green'){
|
||||
tcolor='#0f0'
|
||||
}
|
||||
else if(color==='yellow'){
|
||||
tcolor='#ff0'
|
||||
}
|
||||
else if(color==='white'){
|
||||
tcolor='#fff'
|
||||
}
|
||||
else if(color==='purple'){
|
||||
tcolor='#303'
|
||||
}
|
||||
else{
|
||||
tcolor= '#0f0'
|
||||
}
|
||||
var canvas = document.getElementById('matrixcanvas'),
|
||||
ctx = canvas.getContext('2d');
|
||||
|
||||
canvas.style.height = '100%'
|
||||
canvas.width = window.innerWidth;
|
||||
canvas.height = window.innerHeight;
|
||||
var letters = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890&éèçà@æ€ŧøþ@ßðđŋłĸħłµł»¢µ$£ù%^¨';
|
||||
letters = letters.split('');
|
||||
|
||||
|
||||
var fontSize = 10,
|
||||
columns = canvas.width / fontSize;
|
||||
|
||||
|
||||
var drops = [];
|
||||
for (var i = 0; i < columns; i++) {
|
||||
drops[i] = 1;
|
||||
}
|
||||
|
||||
|
||||
function draw() {
|
||||
ctx.fillStyle = 'rgba(0, 0, 0, .1)';
|
||||
ctx.fillRect(0, 0, canvas.width, canvas.height);
|
||||
for (var i = 0; i < drops.length; i++) {
|
||||
var text = letters[Math.floor(Math.random() * letters.length)];
|
||||
ctx.fillStyle = tcolor;
|
||||
ctx.fillText(text, i * fontSize, drops[i] * fontSize);
|
||||
drops[i]++;
|
||||
if (drops[i] * fontSize > canvas.height && Math.random() > .95) {
|
||||
drops[i] = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
setInterval(draw, 33);
|
||||
}
|
||||
// END OF MATRIX CODE
|
||||
|
||||
// function like the time.sleep in python
|
||||
function sleep(s) {
|
||||
let ms = s*1000
|
||||
return new Promise(resolve => setTimeout(resolve, ms));
|
||||
}
|
||||
// function like random.choice() in python
|
||||
function randchoice(list){
|
||||
console.log(list[randint(0,list.length-1)])
|
||||
return list[randint(0,list.length-1)]
|
||||
}
|
||||
|
||||
// TODO : var historic = []
|
||||
|
||||
// lastx = the last input do (the input you get when you press up arrow) to replace with an historic
|
||||
var lastx = ""
|
||||
|
||||
// the function to execute when up arrow pressed
|
||||
function historic(){
|
||||
// TODO : terminpt.value=historic[historic.lengh-1-index]
|
||||
document.getElementById('terminpt').value = lastx // to replace with an historic (line above) , set the input value (content) to the last input executed
|
||||
}
|
||||
// when a key is down
|
||||
onkeydown = function(e){
|
||||
// if the key is the tab key (keyCode 9)
|
||||
if(e.keyCode==9){
|
||||
// execute the autocomplete function
|
||||
autocomplete()
|
||||
}
|
||||
}
|
||||
// when a key is up
|
||||
onkeyup = function(e){
|
||||
// if the key is enter key (keyCode 13)
|
||||
if(e.keyCode==13){
|
||||
// set the inputcomplete variable to true to inform the terminput function that the user press enter
|
||||
inputcomplete = true
|
||||
}
|
||||
// if the input is up arrow key (keyCode 38)
|
||||
else if(e.keyCode == 38){
|
||||
// execute the historic function
|
||||
historic()
|
||||
}
|
||||
}
|
||||
// function like the print() function in python, add the text to the #termcontent div
|
||||
function termshow(str){
|
||||
let tc = document.getElementById('termcontent')
|
||||
let nchild = document.createElement('div')
|
||||
str = str.replace('<','<')
|
||||
str= str.replace('>','>')
|
||||
str= str.replace('&infg&','<')
|
||||
str = str.replace('&supd&','>')
|
||||
nchild.innerHTML = str.replace('\n','<br>')
|
||||
tc.appendChild(nchild)
|
||||
document.getElementById('termcontent').scrollTo(0,document.getElementById('termcontent').scrollHeight)
|
||||
}
|
||||
// the input() function of python, check if the input is complete (see the inputcomplete variable and the onkeyup (e.keyCode == 13) execution
|
||||
function terminput(str){
|
||||
let tiname = document.getElementById('inptname')
|
||||
tiname.innerHTML = str
|
||||
let inpt = document.getElementById('terminpt')
|
||||
if(inputcomplete){
|
||||
console.log(inpt.value)
|
||||
inputcomplete=false
|
||||
let resultat = inpt.value
|
||||
inpt.value = ''
|
||||
return resultat
|
||||
}
|
||||
else{
|
||||
//return 'ERR' if the input isn't complete
|
||||
return 'ERR'
|
||||
}
|
||||
}
|
||||
// replace this list with the list of your commands
|
||||
var list_of_command = ['ls','ssh','pbk','exit','theme','matrix','hack','attack','save','import','help','exit']
|
||||
// autocomplete when tab press show all the command starting with the value in your input
|
||||
function autocomplete(){
|
||||
let inptval = document.getElementById('terminpt').value
|
||||
termshow('List of available commands starting with " '+inptval+' " :')
|
||||
for(let i = 0; i<list_of_command.length; i++){
|
||||
if(list_of_command[i].startsWith(inptval)){
|
||||
termshow('- '+list_of_command[i])
|
||||
}
|
||||
}
|
||||
}
|
||||
// x= the current input
|
||||
var x = ""
|
||||
|
||||
// START OF FUNCTIONS TO USE WITHOUT INTERACT WITH THE INTERFACE
|
||||
// Send the current input (function to set the inputcomplete as true)
|
||||
function sendinput(){inputcomplete=true}
|
||||
// setinput(str) function to set the value of the input from function
|
||||
function setinput(str){document.getElementById('terminpt').value=str}
|
||||
// execcommand(str) set input and send input
|
||||
function execcommand(str){setinput(str); sendinput()}
|
||||
// last() historic and sendinput
|
||||
function last(){historic(); sendinput()}
|
||||
// autoc setinput, autocomplete
|
||||
function autoc(str){setinput(str); autocomplete();}
|
||||
// END OF FUNCTIONS TO USE WITHOUT INTERACT WITH THE INTERFACE
|
||||
// END OF THE API CODE
|
||||
|
||||
|
||||
/TODO:*
|
||||
// START OF CYBERTERMHACK CODE
|
||||
// You can keep this function if you want to split an address
|
||||
function splitaddr(complete, cmd){
|
||||
try{
|
||||
let c = complete.substring(cmd.length)
|
||||
let u = c.split('@')[0]
|
||||
let a = c.split('@')[1]
|
||||
if (a==undefined){
|
||||
termshow('Please complete the command like this: '+cmd+' user@address')
|
||||
return 'ERROR'
|
||||
}
|
||||
else{
|
||||
return [u, a]
|
||||
}
|
||||
}
|
||||
catch(e){
|
||||
console.error(e)
|
||||
termshow('Please complete the command like this: '+cmd+' user@address')
|
||||
return 'ERROR'
|
||||
}
|
||||
}
|
||||
|
||||
function infos(){
|
||||
termshow(YOUR_INFOS_HERE)
|
||||
}
|
||||
stopmatrix()
|
||||
// these three list (password, files and codeline are sample of if you want to use randchoice
|
||||
var passwordlist = ["my_password","helloworld","ultra_secure_password","my_birthday"]
|
||||
var filelist = ['picture.png','personnal_datas.csv', 'helloworld.py','i_hate_hackers.txt','speech_for_tomorrow.md', '.ha_ha_this_is_super_secret_file.txt','mydirectory/']
|
||||
var codeline = ["fn destroy(oiaf){executeshellcomand('destroy oiaf')}","hack-server()","destroy()","fn hack-server(files){for(var i = 0, i<len(files)){if (type_of_file(files[i])==='password_files_and_datas_files'){execcommand('copyfile_to_my_computer'); destroy(files)};", "print(01020003957058098409438409340&àà_09232983983983923999832983928398329389238938923892382938923899201809381093809é'802984029804802948049820840938éàç8309é_à'ç_éà'_09790872çà'àç_éè409724097240942èàçé'8è290479024798047298047904èé4908éè4) in serverdatas"]
|
||||
// variable to check if the user is connected
|
||||
var connected = false
|
||||
// variable to check if the player got file from server
|
||||
var datased = false
|
||||
|
||||
//var STOP = false NON USED
|
||||
|
||||
// display the infos
|
||||
infos()
|
||||
// the name of the user hacked
|
||||
var user = ""
|
||||
// the ip of the server hacked
|
||||
var ip = ""
|
||||
// the password (non really used)
|
||||
var password = ""
|
||||
// the list of the ip destroyed (replaced with serversdatas['password'}
|
||||
var destroyedip = []
|
||||
// show starting session
|
||||
termshow('starting session ...')
|
||||
// name of user
|
||||
var me = ''
|
||||
// variable to check if the user enter his name
|
||||
named = false
|
||||
// example of serversdatas: "ip":{"destroyed":true (or false), "files":listoffiles, "password":"password"}
|
||||
var gamedatas = {
|
||||
"serversdatas":{},
|
||||
"username": me,
|
||||
'colorscheme': 'default' //it can be green / red / blue / yellow
|
||||
}
|
||||
// change the theme of page (with gamedatas.colorscheme)
|
||||
function gettheme(){
|
||||
let r = document.querySelector(':root')
|
||||
if (gamedatas.colorscheme ==='default'){
|
||||
r.style.setProperty('--txt-color','white')
|
||||
}
|
||||
else if (gamedatas.colorscheme === 'green'){
|
||||
r.style.setProperty('--txt-color','green')
|
||||
}
|
||||
else if (gamedatas.colorscheme === 'red'){
|
||||
r.style.setProperty('--txt-color','red')
|
||||
}
|
||||
else if (gamedatas.colorscheme === 'blue'){
|
||||
r.style.setProperty('--txt-color','blue')
|
||||
}
|
||||
else if (gamedatas.colorscheme === 'yellow'){
|
||||
r.style.setProperty('--txt-color','yellow')
|
||||
}
|
||||
}
|
||||
// ipdatas (it will be an easy 'shortcut' to gamedatas.serversdatas)
|
||||
var ipdatas = {}
|
||||
// focus the terminput
|
||||
document.getElementById('terminpt').focus()
|
||||
|
||||
// THE MAIN FUNCTION (LOOP) THAT WILL BE EXECUTE
|
||||
async function loop(){
|
||||
gamedatas.serversdatas = ipdatas
|
||||
if(named){
|
||||
if(connected){
|
||||
x = terminput(`${user}@${ip} $ `)
|
||||
}
|
||||
else{
|
||||
x = terminput(`${me}@MYCOMPUTER # `)
|
||||
}
|
||||
if(x==='ERR'){}
|
||||
else{
|
||||
//historic.push(x)
|
||||
lastx = x
|
||||
let lowx = x.toLowerCase()
|
||||
if(connected){
|
||||
termshow(`${user}@${ip} $ ${x}`)
|
||||
}
|
||||
else{
|
||||
termshow(`${me}@MYCOMPUTER # ${x}`)
|
||||
}
|
||||
if (lowx.startsWith('ssh')){
|
||||
if (connected){
|
||||
termshow('error you already are in distant server')
|
||||
}
|
||||
else{
|
||||
if (splitaddr(x, 'ssh') === 'ERROR'){
|
||||
}
|
||||
else{
|
||||
user = splitaddr(x, 'ssh')[0]
|
||||
ip = splitaddr(x, 'ssh')[1]
|
||||
if(ipdatas[ip]==undefined){
|
||||
ipdatas[ip]={}
|
||||
}
|
||||
termshow('connect to the computer with the ip '+ip+' from the user '+user+' ...')
|
||||
if (ipdatas[ip]['destroyed']){
|
||||
termshow('error this server is destroyed')
|
||||
}
|
||||
else{
|
||||
if(ipdatas[ip]['password']==undefined){
|
||||
termshow('you don\'t have the password of this server')
|
||||
}
|
||||
else{
|
||||
await sleep(1)
|
||||
termshow('Password: AUTOMATIC_PASSWORD_SYSTEM')
|
||||
// while(temppass != ipdatas[ip]['password']){
|
||||
// temppass = terminput('Password: ')
|
||||
// }
|
||||
await sleep(1)
|
||||
termshow('connected')
|
||||
connected=true
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (lowx.startsWith('pbk')){
|
||||
if (connected){
|
||||
termshow('error you are on a distant server')
|
||||
}
|
||||
else{
|
||||
if (splitaddr(x,'pbk')==='ERROR'){
|
||||
splitaddr(x,'pbk')
|
||||
}
|
||||
else{
|
||||
user=splitaddr(x, 'pbk')[0]
|
||||
ip = splitaddr(x, 'pbk')[1]
|
||||
if(ipdatas[ip]==undefined){
|
||||
ipdatas[ip]={}
|
||||
}
|
||||
termshow('Breaking the password of the user '+user+' to the computer with the ip '+ip+' ...')
|
||||
password= randchoice(passwordlist)
|
||||
ipdatas[ip]['password']=password
|
||||
termshow('The password is : '+ password)
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (lowx.startsWith('theme')){
|
||||
if(lowx==='theme'||lowx==='theme '){
|
||||
termshow('Switch the theme with this command,<br> the available colors are : default , yellow , red , blue , green . <br> execute the command like this: theme default or theme yellow , etc.')
|
||||
}
|
||||
else{
|
||||
let nx = x.substring('theme '.length)
|
||||
if(nx==='yellow' || nx ==='blue' || nx==='default' || nx ==='red' || nx === 'green'){
|
||||
gamedatas.colorscheme = nx
|
||||
gettheme()
|
||||
}
|
||||
else{
|
||||
termshow('Switch the theme with this command,<br> the available colors are : default , yellow , red , blue , green . <br> execute the command like this: theme default or theme yellow , etc.')
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (lowx.startsWith('matrix')){
|
||||
if(lowx==='matrix'||lowx==='matrix '){
|
||||
matrix(gamedatas.colorscheme)
|
||||
}
|
||||
else{
|
||||
let nx = x.substring('matrix '.length)
|
||||
if(nx==='yellow' || nx ==='blue' || nx==='white' || nx ==='red' || nx === 'green'||nx=='purple'|| nx=='cyan' || nx=='magenta'){
|
||||
matrix(nx)
|
||||
}
|
||||
else if(nx==='stop'){
|
||||
stopmatrix()
|
||||
}
|
||||
else{
|
||||
termshow('Switch the theme with this command,<br> the available colors are : default , yellow , red , blue , green . <br> execute the command like this: theme default or theme yellow , etc.')
|
||||
}
|
||||
}
|
||||
}
|
||||
else if(lowx==='save'){
|
||||
localStorage.setItem('hackergamedatas',JSON.stringify(gamedatas))
|
||||
termshow('Data saved')
|
||||
termshow(localStorage.getItem('hackergamedatas'))
|
||||
}
|
||||
else if(lowx==='import'){
|
||||
let tmpdatas = localStorage.getItem('hackergamedatas')
|
||||
if (tmpdatas == undefined){
|
||||
termshow('you don\'t have any data saved, please execute the save command before to import')
|
||||
}
|
||||
else{
|
||||
gamedatas = JSON.parse(tmpdatas)
|
||||
}
|
||||
}
|
||||
else if (lowx=='ls'){
|
||||
if (connected){
|
||||
if (ipdatas[ip]['files'] == undefined){
|
||||
termshow('This is the file on the distant machine')
|
||||
let fileiplist = []
|
||||
for(let i=0; i < parseInt(randint(1,10)); i++){
|
||||
let currentchoicefile = randchoice(filelist)
|
||||
termshow('-'+currentchoicefile)
|
||||
fileiplist.push(currentchoicefile)
|
||||
}
|
||||
ipdatas[ip]['files'] = fileiplist
|
||||
}
|
||||
else{
|
||||
termshow('This is the file on the distant machine')
|
||||
for(let i = 0; i<ipdatas[ip]['files'].length; i++){
|
||||
termshow('-'+ ipdatas[ip]['files'][i])
|
||||
}
|
||||
}
|
||||
}
|
||||
else{
|
||||
if (datased){
|
||||
termshow('This is the file on your computer: <br>- my_datas.zip <br>- servers_data.zip')
|
||||
}
|
||||
else{
|
||||
termshow('This is the file on your computer: <br>- my_datas.zip')
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (lowx=='attack'){
|
||||
if( connected){
|
||||
termshow('the attack start... <br> copying all the data in this server to your servers_data.zip file in your computer (it include all the file, folder etc.)...<br>breaking the server...<br>Disconnected: The server is destroy')
|
||||
connected = false
|
||||
datased = true
|
||||
ipdatas[ip]['destroyed'] = true
|
||||
}
|
||||
else{
|
||||
termshow('error you are not connected, please connect to a distant server before executing this command')
|
||||
}
|
||||
}
|
||||
else if( x==='help'){
|
||||
termshow('The available commands: <br>- help : print this message<br>- ls : list the files and folders<br>- pbk (only in your computer) : Get the password of an user from an ip address<br>- ssh (only in your computer) : conect to a distant server with an user and an ip address (you have to use pbk to get the password)<br>- attack (only in ssh servers) : start an attack that will add all the datas on the server in your servers_data.zip file and will destroy the server (warning this will no destroy only the server from the user it will destroy ALL the server (the address))<br>- theme : switch the theme of the game\n- save : save the game in your localStorage (alternative to cookies)\n- import : import the game from your localStorage\n- matrix : start or stop a matrix rain animation (just for fun...)\n- exit : if you are connected to distant server (ssh) it deconnect you, if you are not connected it exit this game<br>- infos : display infos on this game')
|
||||
}
|
||||
else if (lowx==='exit'){
|
||||
if (connected){
|
||||
termshow('disconnecting...')
|
||||
connected=false
|
||||
}
|
||||
else{
|
||||
termshow('Exiting the session...')
|
||||
termshow('Exiting the game, thank to play to this game, don\'t hesitate to help me or to give me your feedback')
|
||||
STOP = true
|
||||
location = '/'
|
||||
}
|
||||
}
|
||||
else if (lowx==='hack'){
|
||||
if (connected){
|
||||
termshow('--Start-of-the-hacking-program--')
|
||||
for(let i = 0; i<randint(0,50);i++){
|
||||
termshow(randchoice(codeline))
|
||||
}
|
||||
}
|
||||
else{
|
||||
termshow('you have to be connected')
|
||||
}
|
||||
}
|
||||
else if (lowx=='infos'){
|
||||
infos()
|
||||
}
|
||||
else if(x.startsWith('$$$')){
|
||||
if(x === '$$$' || x === '$$$ '){
|
||||
termshow('this command is for execute js code enter your js code after the $$$')
|
||||
}
|
||||
else{
|
||||
try{
|
||||
let tempcode = x.substring('$$$ '.length)
|
||||
let newfunc = new Function (tempcode)
|
||||
newfunc()
|
||||
}
|
||||
catch(e){
|
||||
termshow('Il y a eu une erreur : '+e)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
else{
|
||||
let temp = terminput('your name: ')
|
||||
if(temp.length<4){
|
||||
document.getElementById('inptindic').innerHTML ='your name must have more than 4 characters '
|
||||
}
|
||||
else{
|
||||
me = temp
|
||||
named = true
|
||||
document.getElementById('inptindic').innerHTML=''
|
||||
}
|
||||
}
|
||||
window.requestAnimationFrame(loop)
|
||||
}
|
||||
loop()
|
||||
// END OF CYBERTERMHACK CODE
|
79
main-site/CyberTermHack/V0.1.2:OPTIMIZED/index.html
Normal file
79
main-site/CyberTermHack/V0.1.2:OPTIMIZED/index.html
Normal file
|
@ -0,0 +1,79 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="fr">
|
||||
<head>
|
||||
<title>CyberTermHack</title>
|
||||
<meta charset="UTF-8">
|
||||
<style>
|
||||
:root{
|
||||
--bg-color: black;
|
||||
--txt-color: white;
|
||||
}
|
||||
html, body{
|
||||
background-color:var(--bg-color);
|
||||
color: var(--txt-color);
|
||||
margin:0;
|
||||
height:100%;
|
||||
min-height:100vh;
|
||||
display:flex;
|
||||
flex-direction:column;
|
||||
word-wrap: break-word;
|
||||
word-break: break-all;
|
||||
z-index:2
|
||||
}
|
||||
.second {
|
||||
flex-grow: 1;
|
||||
}
|
||||
#termcontent{
|
||||
display: fixed;
|
||||
left:0;
|
||||
top:0;
|
||||
height:95%;
|
||||
width:100%;
|
||||
overflow: auto
|
||||
}
|
||||
#divinput{
|
||||
display:flex;
|
||||
left:0;
|
||||
bottom:0;
|
||||
height:5%;
|
||||
width:100%
|
||||
}
|
||||
#terminpt{
|
||||
border: 0px solid !important;
|
||||
background-color: var(--bg-color);
|
||||
color:var(--txt-color);
|
||||
width:95%
|
||||
}
|
||||
/*#terminptdiv{
|
||||
float: none
|
||||
}*/
|
||||
*:focus {
|
||||
outline: none;
|
||||
}
|
||||
/*#divofinfos{
|
||||
float:left
|
||||
}*/
|
||||
#matrixcanvas{
|
||||
width:100%;
|
||||
height:100%;
|
||||
position:fixed;
|
||||
z-index:-1
|
||||
}
|
||||
</style>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
</head>
|
||||
<body>
|
||||
<!--username and ip: green, $ or %: white, commands: white-->
|
||||
<div id="termcontent">
|
||||
<!-- oldcommands and outputs -->
|
||||
</div>
|
||||
<div id="divinput">
|
||||
<span id=spanofinfos><span id="inptindic"></span><span id="inptname"></span></span><span class=second><input id=terminpt type="text"/></span>
|
||||
<!-- actual command with username and ip, $ or %, input for command, enter to send command -->
|
||||
</div>
|
||||
<canvas id=matrixcanvas style='width:100%; height: 100%'>
|
||||
</canvas>
|
||||
<script src=//api.gzod01.fr/scripts/termapi.js></script>
|
||||
<script src="maincode.js"></script>
|
||||
</body>
|
||||
</html>
|
302
main-site/CyberTermHack/V0.1.2:OPTIMIZED/maincode.js
Normal file
302
main-site/CyberTermHack/V0.1.2:OPTIMIZED/maincode.js
Normal file
|
@ -0,0 +1,302 @@
|
|||
var x = ""
|
||||
function splitaddr(complete, cmd){
|
||||
try{
|
||||
let c = complete.substring(cmd.length)
|
||||
let u = c.split('@')[0]
|
||||
let a = c.split('@')[1]
|
||||
if (a==undefined){
|
||||
termshow('Please complete the command like this: '+cmd+' user@address')
|
||||
return 'ERROR'
|
||||
}
|
||||
else{
|
||||
return [u, a]
|
||||
}
|
||||
}
|
||||
catch(e){
|
||||
console.error(e)
|
||||
termshow('Please complete the command like this: '+cmd+' user@address')
|
||||
return 'ERROR'
|
||||
}
|
||||
}
|
||||
function infos(){
|
||||
termshow('01010101010101010\n1.CyberTermGame.1\n0.....By GZod01.....0\n10101010101010101\nInfos on the game : Hello my name is GZod01 and i make this game in javascript (base game in python) "for fun", I know this game is not reflecting the reality of the command on linux or windows machines but... it is a game...\nSorry if the english is not very good i speak french...')
|
||||
}
|
||||
stopmatrix()
|
||||
var passwordlist = ["my_password","helloworld","ultra_secure_password","my_birthday"]
|
||||
var filelist = ['picture.png','personnal_datas.csv', 'helloworld.py','i_hate_hackers.txt','speech_for_tomorrow.md', '.ha_ha_this_is_super_secret_file.txt','mydirectory/']
|
||||
var connected = false
|
||||
var datased = false
|
||||
var STOP = false
|
||||
infos()
|
||||
var user = ""
|
||||
var ip = ""
|
||||
var password = ""
|
||||
var destroyedip = []
|
||||
var codeline = ["fn destroy(oiaf){executeshellcomand('destroy oiaf')}","hack-server()","destroy()","fn hack-server(files){for(var i = 0, i<len(files)){if (type_of_file(files[i])==='password_files_and_datas_files'){execcommand('copyfile_to_my_computer'); destroy(files)};", "print(01020003957058098409438409340&àà_09232983983983923999832983928398329389238938923892382938923899201809381093809é'802984029804802948049820840938éàç8309é_à'ç_éà'_09790872çà'àç_éè409724097240942èàçé'8è290479024798047298047904èé4908éè4) in serverdatas"]
|
||||
termshow('starting session ...')
|
||||
var me = ''
|
||||
var list_of_command = ['ls','ssh','pbk','exit','theme','matrix','hack','attack','save','import','help','exit']
|
||||
function autocomplete(){
|
||||
let inptval = document.getElementById('terminpt').value
|
||||
termshow('List of available commands starting with " '+inptval+' " :')
|
||||
for(let i = 0; i<list_of_command.length; i++){
|
||||
if(list_of_command[i].startsWith(inptval)){
|
||||
termshow('- '+list_of_command[i])
|
||||
}
|
||||
}
|
||||
}
|
||||
named = false
|
||||
// example of serversdatas: "ip":{"destroyed":true (or false), "files":listoffiles, "password":"password"}
|
||||
var gamedatas = {
|
||||
"serversdatas":{},
|
||||
"username": me,
|
||||
'colorscheme': 'default' //it can be green / red / blue / yellow
|
||||
}
|
||||
// START OF MAIN-MODE CODE
|
||||
function gettheme(){
|
||||
let r = document.querySelector(':root')
|
||||
if (gamedatas.colorscheme ==='default'){
|
||||
r.style.setProperty('--txt-color','white')
|
||||
}
|
||||
else if (gamedatas.colorscheme === 'green'){
|
||||
r.style.setProperty('--txt-color','green')
|
||||
}
|
||||
else if (gamedatas.colorscheme === 'red'){
|
||||
r.style.setProperty('--txt-color','red')
|
||||
}
|
||||
else if (gamedatas.colorscheme === 'blue'){
|
||||
r.style.setProperty('--txt-color','blue')
|
||||
}
|
||||
else if (gamedatas.colorscheme === 'yellow'){
|
||||
r.style.setProperty('--txt-color','yellow')
|
||||
}
|
||||
}
|
||||
var ipdatas = {}
|
||||
document.getElementById('terminpt').focus()
|
||||
async function loop(){
|
||||
gamedatas.serversdatas = ipdatas
|
||||
if(named){
|
||||
if(connected){
|
||||
x = terminput(`${user}@${ip} $ `)
|
||||
}
|
||||
else{
|
||||
x = terminput(`${me}@MYCOMPUTER # `)
|
||||
}
|
||||
if(x==='ERR'){}
|
||||
else{
|
||||
//historic.push(x)
|
||||
lastx = x
|
||||
let lowx = x.toLowerCase()
|
||||
if(connected){
|
||||
termshow(`${user}@${ip} $ ${x}`)
|
||||
}
|
||||
else{
|
||||
termshow(`${me}@MYCOMPUTER # ${x}`)
|
||||
}
|
||||
if (lowx.startsWith('ssh')){
|
||||
if (connected){
|
||||
termshow('error you already are in distant server')
|
||||
}
|
||||
else{
|
||||
if (splitaddr(x, 'ssh') === 'ERROR'){
|
||||
}
|
||||
else{
|
||||
user = splitaddr(x, 'ssh')[0]
|
||||
ip = splitaddr(x, 'ssh')[1]
|
||||
if(ipdatas[ip]==undefined){
|
||||
ipdatas[ip]={}
|
||||
}
|
||||
termshow('connect to the computer with the ip '+ip+' from the user '+user+' ...')
|
||||
if (ipdatas[ip]['destroyed']){
|
||||
termshow('error this server is destroyed')
|
||||
}
|
||||
else{
|
||||
if(ipdatas[ip]['password']==undefined){
|
||||
termshow('you don\'t have the password of this server')
|
||||
}
|
||||
else{
|
||||
await sleep(1)
|
||||
termshow('Password: AUTOMATIC_PASSWORD_SYSTEM')
|
||||
// while(temppass != ipdatas[ip]['password']){
|
||||
// temppass = terminput('Password: ')
|
||||
// }
|
||||
await sleep(1)
|
||||
termshow('connected')
|
||||
connected=true
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (lowx.startsWith('pbk')){
|
||||
if (connected){
|
||||
termshow('error you are on a distant server')
|
||||
}
|
||||
else{
|
||||
if (splitaddr(x,'pbk')==='ERROR'){
|
||||
splitaddr(x,'pbk')
|
||||
}
|
||||
else{
|
||||
user=splitaddr(x, 'pbk')[0]
|
||||
ip = splitaddr(x, 'pbk')[1]
|
||||
if(ipdatas[ip]==undefined){
|
||||
ipdatas[ip]={}
|
||||
}
|
||||
termshow('Breaking the password of the user '+user+' to the computer with the ip '+ip+' ...')
|
||||
password= randchoice(passwordlist)
|
||||
ipdatas[ip]['password']=password
|
||||
termshow('The password is : '+ password)
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (lowx.startsWith('theme')){
|
||||
if(lowx==='theme'||lowx==='theme '){
|
||||
termshow('Switch the theme with this command,\n the available colors are : default , yellow , red , blue , green . \n execute the command like this: theme default or theme yellow , etc.')
|
||||
}
|
||||
else{
|
||||
let nx = x.substring('theme '.length)
|
||||
if(nx==='yellow' || nx ==='blue' || nx==='default' || nx ==='red' || nx === 'green'){
|
||||
gamedatas.colorscheme = nx
|
||||
gettheme()
|
||||
}
|
||||
else{
|
||||
termshow('Switch the theme with this command,\n the available colors are : default , yellow , red , blue , green . \n execute the command like this: theme default or theme yellow , etc.')
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (lowx.startsWith('matrix')){
|
||||
if(lowx==='matrix'||lowx==='matrix '){
|
||||
matrix(gamedatas.colorscheme)
|
||||
}
|
||||
else{
|
||||
let nx = x.substring('matrix '.length)
|
||||
if(nx==='yellow' || nx ==='blue' || nx==='white' || nx ==='red' || nx === 'green'||nx=='purple'|| nx=='cyan' || nx=='magenta'){
|
||||
matrix(nx)
|
||||
}
|
||||
else if(nx==='stop'){
|
||||
stopmatrix()
|
||||
}
|
||||
else{
|
||||
termshow('Switch the theme with this command,\n the available colors are : default , yellow , red , blue , green . \n execute the command like this: theme default or theme yellow , etc.')
|
||||
}
|
||||
}
|
||||
}
|
||||
else if(lowx==='save'){
|
||||
localStorage.setItem('hackergamedatas',JSON.stringify(gamedatas))
|
||||
termshow('Data saved')
|
||||
termshow(localStorage.getItem('hackergamedatas'))
|
||||
}
|
||||
else if(lowx==='import'){
|
||||
let tmpdatas = localStorage.getItem('hackergamedatas')
|
||||
if (tmpdatas == undefined){
|
||||
termshow('you don\'t have any data saved, please execute the save command before to import')
|
||||
}
|
||||
else{
|
||||
gamedatas = JSON.parse(tmpdatas)
|
||||
}
|
||||
}
|
||||
else if (lowx=='ls'){
|
||||
if (connected){
|
||||
if (ipdatas[ip]['files'] == undefined){
|
||||
termshow('This is the file on the distant machine')
|
||||
let fileiplist = []
|
||||
for(let i=0; i < parseInt(randint(1,10)); i++){
|
||||
let currentchoicefile = randchoice(filelist)
|
||||
termshow('-'+currentchoicefile)
|
||||
fileiplist.push(currentchoicefile)
|
||||
}
|
||||
ipdatas[ip]['files'] = fileiplist
|
||||
}
|
||||
else{
|
||||
termshow('This is the file on the distant machine')
|
||||
for(let i = 0; i<ipdatas[ip]['files'].length; i++){
|
||||
termshow('-'+ ipdatas[ip]['files'][i])
|
||||
}
|
||||
}
|
||||
}
|
||||
else{
|
||||
if (datased){
|
||||
termshow('This is the file on your computer: \n- my_datas.zip \n- servers_data.zip')
|
||||
}
|
||||
else{
|
||||
termshow('This is the file on your computer: \n- my_datas.zip')
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (lowx=='attack'){
|
||||
if( connected){
|
||||
termshow('the attack start... \n copying all the data in this server to your servers_data.zip file in your computer (it include all the file, folder etc.)...\nbreaking the server...\nDisconnected: The server is destroy')
|
||||
connected = false
|
||||
datased = true
|
||||
ipdatas[ip]['destroyed'] = true
|
||||
}
|
||||
else{
|
||||
termshow('error you are not connected, please connect to a distant server before executing this command')
|
||||
}
|
||||
}
|
||||
else if( x==='help'){
|
||||
termshow('The available commands: \n- help : print this message\n- ls : list the files and folders\n- pbk (only in your computer) : Get the password of an user from an ip address\n- ssh (only in your computer) : conect to a distant server with an user and an ip address (you have to use pbk to get the password)\n- attack (only in ssh servers) : start an attack that will add all the datas on the server in your servers_data.zip file and will destroy the server (warning this will no destroy only the server from the user it will destroy ALL the server (the address))\n- theme : switch the theme of the game\n- save : save the game in your localStorage (alternative to cookies)\n- import : import the game from your localStorage\n- matrix : start or stop a matrix rain animation (just for fun...)\n- exit : if you are connected to distant server (ssh) it deconnect you, if you are not connected it exit this game\n- infos : display infos on this game')
|
||||
}
|
||||
else if (lowx==='exit'){
|
||||
if (connected){
|
||||
termshow('disconnecting...')
|
||||
connected=false
|
||||
}
|
||||
else{
|
||||
termshow('Exiting the session...')
|
||||
termshow('Exiting the game, thank to play to this game, don\'t hesitate to help me or to give me your feedback')
|
||||
STOP = true
|
||||
location = '/'
|
||||
}
|
||||
}
|
||||
else if (lowx==='hack'){
|
||||
if (connected){
|
||||
termshow('--Start-of-the-hacking-program--')
|
||||
for(let i = 0; i<randint(0,50);i++){
|
||||
termshow(randchoice(codeline))
|
||||
}
|
||||
}
|
||||
else{
|
||||
termshow('you have to be connected')
|
||||
}
|
||||
}
|
||||
else if (lowx=='infos'){
|
||||
infos()
|
||||
}
|
||||
else if(x.startsWith('$$$')){
|
||||
if(x === '$$$' || x === '$$$ '){
|
||||
termshow('this command is for execute js code enter your js code after the $$$')
|
||||
}
|
||||
else{
|
||||
try{
|
||||
let tempcode = x.substring('$$$ '.length)
|
||||
let newfunc = new Function (tempcode)
|
||||
newfunc()
|
||||
}
|
||||
catch(e){
|
||||
termshow('Il y a eu une erreur : '+e)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
else{
|
||||
let temp = terminput('your name: ')
|
||||
if(temp.length<4){
|
||||
document.getElementById('inptindic').innerHTML ='your name must have more than 4 characters '
|
||||
}
|
||||
else{
|
||||
me = temp
|
||||
named = true
|
||||
document.getElementById('inptindic').innerHTML=''
|
||||
}
|
||||
}
|
||||
window.requestAnimationFrame(loop)
|
||||
}
|
||||
loop()
|
||||
//END OF MAIN-MODE CODE
|
||||
//START OF STORY MODE CODE
|
||||
|
||||
|
||||
// END OF STORY MODE CODE
|
78
main-site/CyberTermHack/V0.1/index.html
Normal file
78
main-site/CyberTermHack/V0.1/index.html
Normal file
|
@ -0,0 +1,78 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="fr">
|
||||
<head>
|
||||
<title>CyberTermHack</title>
|
||||
<meta charset="UTF-8">
|
||||
<style>
|
||||
:root{
|
||||
--bg-color: black;
|
||||
--txt-color: white;
|
||||
}
|
||||
html, body{
|
||||
background-color:var(--bg-color);
|
||||
color: var(--txt-color);
|
||||
margin:0;
|
||||
height:100%;
|
||||
min-height:100vh;
|
||||
display:flex;
|
||||
flex-direction:column;
|
||||
word-wrap: break-word;
|
||||
word-break: break-all;
|
||||
z-index:2
|
||||
}
|
||||
.second {
|
||||
flex-grow: 1;
|
||||
}
|
||||
#termcontent{
|
||||
display: fixed;
|
||||
left:0;
|
||||
top:0;
|
||||
height:95%;
|
||||
width:100%;
|
||||
overflow: auto
|
||||
}
|
||||
#divinput{
|
||||
display:flex;
|
||||
left:0;
|
||||
bottom:0;
|
||||
height:5%;
|
||||
width:100%
|
||||
}
|
||||
#terminpt{
|
||||
border: 0px solid !important;
|
||||
background-color: var(--bg-color);
|
||||
color:var(--txt-color);
|
||||
width:95%
|
||||
}
|
||||
/*#terminptdiv{
|
||||
float: none
|
||||
}*/
|
||||
*:focus {
|
||||
outline: none;
|
||||
}
|
||||
/*#divofinfos{
|
||||
float:left
|
||||
}*/
|
||||
#matrixcanvas{
|
||||
width:100%;
|
||||
height:100%;
|
||||
position:fixed;
|
||||
z-index:-1
|
||||
}
|
||||
</style>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
</head>
|
||||
<body>
|
||||
<!--username and ip: green, $ or %: white, commands: white-->
|
||||
<div id="termcontent">
|
||||
<!-- oldcommands and outputs -->
|
||||
</div>
|
||||
<div id="divinput">
|
||||
<span id=spanofinfos><span id="inptindic"></span><span id="inptname"></span></span><span class=second><input id=terminpt type="text"/></span>
|
||||
<!-- actual command with username and ip, $ or %, input for command, enter to send command -->
|
||||
</div>
|
||||
<canvas id=matrixcanvas style='width:100%; height: 100%'>
|
||||
</canvas>
|
||||
<script src="jsversion.js"></script>
|
||||
</body>
|
||||
</html>
|
78
main-site/CyberTermHack/V0.1/js-web-CyberTermHack.html
Normal file
78
main-site/CyberTermHack/V0.1/js-web-CyberTermHack.html
Normal file
|
@ -0,0 +1,78 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="fr">
|
||||
<head>
|
||||
<title>CyberTermHack</title>
|
||||
<meta charset="UTF-8">
|
||||
<style>
|
||||
:root{
|
||||
--bg-color: black;
|
||||
--txt-color: white;
|
||||
}
|
||||
html, body{
|
||||
background-color:var(--bg-color);
|
||||
color: var(--txt-color);
|
||||
margin:0;
|
||||
height:100%;
|
||||
min-height:100vh;
|
||||
display:flex;
|
||||
flex-direction:column;
|
||||
word-wrap: break-word;
|
||||
word-break: break-all;
|
||||
z-index:2
|
||||
}
|
||||
.second {
|
||||
flex-grow: 1;
|
||||
}
|
||||
#termcontent{
|
||||
display: fixed;
|
||||
left:0;
|
||||
top:0;
|
||||
height:95%;
|
||||
width:100%;
|
||||
overflow: auto
|
||||
}
|
||||
#divinput{
|
||||
display:flex;
|
||||
left:0;
|
||||
bottom:0;
|
||||
height:5%;
|
||||
width:100%
|
||||
}
|
||||
#terminpt{
|
||||
border: 0px solid !important;
|
||||
background-color: var(--bg-color);
|
||||
color:var(--txt-color);
|
||||
width:95%
|
||||
}
|
||||
/*#terminptdiv{
|
||||
float: none
|
||||
}*/
|
||||
*:focus {
|
||||
outline: none;
|
||||
}
|
||||
/*#divofinfos{
|
||||
float:left
|
||||
}*/
|
||||
#matrixcanvas{
|
||||
width:100%;
|
||||
height:100%;
|
||||
position:fixed;
|
||||
z-index:-1
|
||||
}
|
||||
</style>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
</head>
|
||||
<body>
|
||||
<!--username and ip: green, $ or %: white, commands: white-->
|
||||
<div id="termcontent">
|
||||
<!-- oldcommands and outputs -->
|
||||
</div>
|
||||
<div id="divinput">
|
||||
<span id=spanofinfos><span id="inptindic"></span><span id="inptname"></span></span><span class=second><input id=terminpt type="text"/></span>
|
||||
<!-- actual command with username and ip, $ or %, input for command, enter to send command -->
|
||||
</div>
|
||||
<canvas id=matrixcanvas style='width:100%; height: 100%'>
|
||||
</canvas>
|
||||
<script src="jsversion.js"></script>
|
||||
</body>
|
||||
</html>
|
440
main-site/CyberTermHack/V0.1/jsversion.js
Normal file
440
main-site/CyberTermHack/V0.1/jsversion.js
Normal file
|
@ -0,0 +1,440 @@
|
|||
// CYBERTERMHACK BY GZOD01
|
||||
//START OF CYBERTERMHACK CODE
|
||||
var inputcomplete = false
|
||||
function randint(min, max){
|
||||
return Math.floor(Math.random() * (max - min + 1) ) + min;
|
||||
}
|
||||
function stopmatrix(){
|
||||
document.getElementById('matrixcanvas').remove()
|
||||
let nc = document.createElement('canvas')
|
||||
nc.setAttribute('id','matrixcanvas')
|
||||
nc.style.width = '100%'
|
||||
nc.style.height ='0%'
|
||||
document.body.appendChild(nc)
|
||||
}
|
||||
function matrix(color){
|
||||
let tcolor = ''
|
||||
if(color==='cyan'){
|
||||
tcolor ='#0ff'
|
||||
}
|
||||
else if(color==='blue'){
|
||||
tcolor='#00f'
|
||||
}
|
||||
else if(color==='magenta'){
|
||||
tcolor='#f0f'
|
||||
}
|
||||
else if(color==='red'){
|
||||
tcolor='#f00'
|
||||
}
|
||||
else if(color==='green'){
|
||||
tcolor='#0f0'
|
||||
}
|
||||
else if(color==='yellow'){
|
||||
tcolor='#ff0'
|
||||
}
|
||||
else if(color==='white'){
|
||||
tcolor='#fff'
|
||||
}
|
||||
else if(color==='purple'){
|
||||
tcolor='#303'
|
||||
}
|
||||
var canvas = document.getElementById('matrixcanvas'),
|
||||
ctx = canvas.getContext('2d');
|
||||
|
||||
canvas.style.height = '100%'
|
||||
canvas.width = window.innerWidth;
|
||||
canvas.height = window.innerHeight;
|
||||
var letters = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890&éèçà@æ€ŧøþ@ßðđŋłĸħłµł»¢µ$£ù%^¨';
|
||||
letters = letters.split('');
|
||||
|
||||
|
||||
var fontSize = 10,
|
||||
columns = canvas.width / fontSize;
|
||||
|
||||
|
||||
var drops = [];
|
||||
for (var i = 0; i < columns; i++) {
|
||||
drops[i] = 1;
|
||||
}
|
||||
|
||||
|
||||
function draw() {
|
||||
ctx.fillStyle = 'rgba(0, 0, 0, .1)';
|
||||
ctx.fillRect(0, 0, canvas.width, canvas.height);
|
||||
for (var i = 0; i < drops.length; i++) {
|
||||
var text = letters[Math.floor(Math.random() * letters.length)];
|
||||
ctx.fillStyle = tcolor;
|
||||
ctx.fillText(text, i * fontSize, drops[i] * fontSize);
|
||||
drops[i]++;
|
||||
if (drops[i] * fontSize > canvas.height && Math.random() > .95) {
|
||||
drops[i] = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
setInterval(draw, 33);
|
||||
}
|
||||
function sleep(s) {
|
||||
let ms = s*1000
|
||||
return new Promise(resolve => setTimeout(resolve, ms));
|
||||
}
|
||||
function randchoice(list){
|
||||
console.log(list[randint(0,list.length-1)])
|
||||
return list[randint(0,list.length-1)]
|
||||
}
|
||||
//var historic = []
|
||||
var lastx = ""
|
||||
function historic(){
|
||||
// terminpt.value=historic[historic.lengh-1-index]
|
||||
document.getElementById('terminpt').value = lastx
|
||||
}
|
||||
onkeydown = function(e){
|
||||
if(e.keyCode==9){
|
||||
autocomplete()
|
||||
}
|
||||
}
|
||||
onkeyup = function(e){
|
||||
if(e.keyCode==13){
|
||||
inputcomplete = true
|
||||
}
|
||||
else if(e.keyCode == 38){
|
||||
historic()
|
||||
}
|
||||
}
|
||||
function termshow(str){
|
||||
let tc = document.getElementById('termcontent')
|
||||
let nchild = document.createElement('div')
|
||||
nchild.innerHTML = str.replace('\n','<br>')
|
||||
tc.appendChild(nchild)
|
||||
document.getElementById('termcontent').scrollTo(0,document.getElementById('termcontent').scrollHeight)
|
||||
}
|
||||
function terminput(str){
|
||||
let tiname = document.getElementById('inptname')
|
||||
tiname.innerHTML = str
|
||||
let inpt = document.getElementById('terminpt')
|
||||
if(inputcomplete){
|
||||
console.log(inpt.value)
|
||||
inputcomplete=false
|
||||
let resultat = inpt.value
|
||||
inpt.value = ''
|
||||
return resultat
|
||||
}
|
||||
else{
|
||||
return 'ERR'
|
||||
}
|
||||
}
|
||||
var x = ""
|
||||
function splitaddr(complete, cmd){
|
||||
try{
|
||||
let c = complete.substring(cmd.length)
|
||||
let u = c.split('@')[0]
|
||||
let a = c.split('@')[1]
|
||||
if (a==undefined){
|
||||
termshow('Please complete the command like this: '+cmd+' user@address')
|
||||
return 'ERROR'
|
||||
}
|
||||
else{
|
||||
return [u, a]
|
||||
}
|
||||
}
|
||||
catch(e){
|
||||
console.error(e)
|
||||
termshow('Please complete the command like this: '+cmd+' user@address')
|
||||
return 'ERROR'
|
||||
}
|
||||
}
|
||||
function infos(){
|
||||
termshow('01010101010101010<br>1.CyberTermGame.1<br>0.....By GZod01.....0<br>10101010101010101<br>Infos on the game : Hello my name is GZod01 and i make this game in javascript (base game in python) "for fun", I know this game is not reflecting the reality of the command on linux or windows machines but... it is a game...<br>Sorry if the english is not very good i speak french...')
|
||||
}
|
||||
stopmatrix()
|
||||
var passwordlist = ["my_password","helloworld","ultra_secure_password","my_birthday"]
|
||||
var filelist = ['picture.png','personnal_datas.csv', 'helloworld.py','i_hate_hackers.txt','speech_for_tomorrow.md', '.ha_ha_this_is_super_secret_file.txt','mydirectory/']
|
||||
var connected = false
|
||||
var datased = false
|
||||
var STOP = false
|
||||
infos()
|
||||
var user = ""
|
||||
var ip = ""
|
||||
var password = ""
|
||||
var destroyedip = []
|
||||
var codeline = ["fn destroy(oiaf){executeshellcomand('destroy oiaf')}","hack-server()","destroy()","fn hack-server(files){for(var i = 0, i<len(files)){if (type_of_file(files[i])==='password_files_and_datas_files'){execcommand('copyfile_to_my_computer'); destroy(files)};", "print(01020003957058098409438409340&àà_09232983983983923999832983928398329389238938923892382938923899201809381093809é'802984029804802948049820840938éàç8309é_à'ç_éà'_09790872çà'àç_éè409724097240942èàçé'8è290479024798047298047904èé4908éè4) in serverdatas"]
|
||||
termshow('starting session ...')
|
||||
var me = ''
|
||||
var list_of_command = ['ls','ssh','pbk','exit','theme','matrix','hack','attack','save','import','help','exit']
|
||||
function autocomplete(){
|
||||
let inptval = document.getElementById('terminpt').value
|
||||
termshow('List of available commands starting with " '+inptval+' " :')
|
||||
for(let i = 0; i<list_of_command.length; i++){
|
||||
if(list_of_command[i].startsWith(inptval)){
|
||||
termshow('- '+list_of_command[i])
|
||||
}
|
||||
}
|
||||
}
|
||||
named = false
|
||||
// example of serversdatas: "ip":{"destroyed":true (or false), "files":listoffiles, "password":"password"}
|
||||
var gamedatas = {
|
||||
"serversdatas":{},
|
||||
"username": me,
|
||||
'colorscheme': 'default' //it can be green / red / blue / yellow
|
||||
}
|
||||
//END OF CYBERTERMHACK CODE
|
||||
// START OF MAIN-MODE CODE
|
||||
function gettheme(){
|
||||
let r = document.querySelector(':root')
|
||||
if (gamedatas.colorscheme ==='default'){
|
||||
r.style.setProperty('--txt-color','white')
|
||||
}
|
||||
else if (gamedatas.colorscheme === 'green'){
|
||||
r.style.setProperty('--txt-color','green')
|
||||
}
|
||||
else if (gamedatas.colorscheme === 'red'){
|
||||
r.style.setProperty('--txt-color','red')
|
||||
}
|
||||
else if (gamedatas.colorscheme === 'blue'){
|
||||
r.style.setProperty('--txt-color','blue')
|
||||
}
|
||||
else if (gamedatas.colorscheme === 'yellow'){
|
||||
r.style.setProperty('--txt-color','yellow')
|
||||
}
|
||||
}
|
||||
var ipdatas = {}
|
||||
document.getElementById('terminpt').focus()
|
||||
async function loop(){
|
||||
gamedatas.serversdatas = ipdatas
|
||||
if(named){
|
||||
if(connected){
|
||||
x = terminput(`${user}@${ip} $ `)
|
||||
}
|
||||
else{
|
||||
x = terminput(`${me}@MYCOMPUTER # `)
|
||||
}
|
||||
if(x==='ERR'){}
|
||||
else{
|
||||
//historic.push(x)
|
||||
lastx = x
|
||||
let lowx = x.toLowerCase()
|
||||
if(connected){
|
||||
termshow(`${user}@${ip} $ ${x}`)
|
||||
}
|
||||
else{
|
||||
termshow(`${me}@MYCOMPUTER # ${x}`)
|
||||
}
|
||||
if (lowx.startsWith('ssh')){
|
||||
if (connected){
|
||||
termshow('error you already are in distant server')
|
||||
}
|
||||
else{
|
||||
if (splitaddr(x, 'ssh') === 'ERROR'){
|
||||
}
|
||||
else{
|
||||
user = splitaddr(x, 'ssh')[0]
|
||||
ip = splitaddr(x, 'ssh')[1]
|
||||
if(ipdatas[ip]==undefined){
|
||||
ipdatas[ip]={}
|
||||
}
|
||||
termshow('connect to the computer with the ip '+ip+' from the user '+user+' ...')
|
||||
if (ipdatas[ip]['destroyed']){
|
||||
termshow('error this server is destroyed')
|
||||
}
|
||||
else{
|
||||
if(ipdatas[ip]['password']==undefined){
|
||||
termshow('you don\'t have the password of this server')
|
||||
}
|
||||
else{
|
||||
await sleep(1)
|
||||
termshow('Password: AUTOMATIC_PASSWORD_SYSTEM')
|
||||
// while(temppass != ipdatas[ip]['password']){
|
||||
// temppass = terminput('Password: ')
|
||||
// }
|
||||
await sleep(1)
|
||||
termshow('connected')
|
||||
connected=true
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (lowx.startsWith('pbk')){
|
||||
if (connected){
|
||||
termshow('error you are on a distant server')
|
||||
}
|
||||
else{
|
||||
if (splitaddr(x,'pbk')==='ERROR'){
|
||||
splitaddr(x,'pbk')
|
||||
}
|
||||
else{
|
||||
user=splitaddr(x, 'pbk')[0]
|
||||
ip = splitaddr(x, 'pbk')[1]
|
||||
if(ipdatas[ip]==undefined){
|
||||
ipdatas[ip]={}
|
||||
}
|
||||
termshow('Breaking the password of the user '+user+' to the computer with the ip '+ip+' ...')
|
||||
password= randchoice(passwordlist)
|
||||
ipdatas[ip]['password']=password
|
||||
termshow('The password is : '+ password)
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (lowx.startsWith('theme')){
|
||||
if(lowx==='theme'||lowx==='theme '){
|
||||
termshow('Switch the theme with this command,<br> the available colors are : default , yellow , red , blue , green . <br> execute the command like this: theme default or theme yellow , etc.')
|
||||
}
|
||||
else{
|
||||
let nx = x.substring('theme '.length)
|
||||
if(nx==='yellow' || nx ==='blue' || nx==='default' || nx ==='red' || nx === 'green'){
|
||||
gamedatas.colorscheme = nx
|
||||
gettheme()
|
||||
}
|
||||
else{
|
||||
termshow('Switch the theme with this command,<br> the available colors are : default , yellow , red , blue , green . <br> execute the command like this: theme default or theme yellow , etc.')
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (lowx.startsWith('matrix')){
|
||||
if(lowx==='matrix'||lowx==='matrix '){
|
||||
matrix(gamedatas.colorscheme)
|
||||
}
|
||||
else{
|
||||
let nx = x.substring('matrix '.length)
|
||||
if(nx==='yellow' || nx ==='blue' || nx==='white' || nx ==='red' || nx === 'green'||nx=='purple'|| nx=='cyan' || nx=='magenta'){
|
||||
matrix(nx)
|
||||
}
|
||||
else if(nx==='stop'){
|
||||
stopmatrix()
|
||||
}
|
||||
else{
|
||||
termshow('Switch the theme with this command,<br> the available colors are : default , yellow , red , blue , green . <br> execute the command like this: theme default or theme yellow , etc.')
|
||||
}
|
||||
}
|
||||
}
|
||||
else if(lowx==='save'){
|
||||
localStorage.setItem('hackergamedatas',JSON.stringify(gamedatas))
|
||||
termshow('Data saved')
|
||||
termshow(localStorage.getItem('hackergamedatas'))
|
||||
}
|
||||
else if(lowx==='import'){
|
||||
let tmpdatas = localStorage.getItem('hackergamedatas')
|
||||
if (tmpdatas == undefined){
|
||||
termshow('you don\'t have any data saved, please execute the save command before to import')
|
||||
}
|
||||
else{
|
||||
gamedatas = JSON.parse(tmpdatas)
|
||||
}
|
||||
}
|
||||
else if (lowx=='ls'){
|
||||
if (connected){
|
||||
if (ipdatas[ip]['files'] == undefined){
|
||||
termshow('This is the file on the distant machine')
|
||||
let fileiplist = []
|
||||
for(let i=0; i < parseInt(randint(1,10)); i++){
|
||||
let currentchoicefile = randchoice(filelist)
|
||||
termshow('-'+currentchoicefile)
|
||||
fileiplist.push(currentchoicefile)
|
||||
}
|
||||
ipdatas[ip]['files'] = fileiplist
|
||||
}
|
||||
else{
|
||||
termshow('This is the file on the distant machine')
|
||||
for(let i = 0; i<ipdatas[ip]['files'].length; i++){
|
||||
termshow('-'+ ipdatas[ip]['files'][i])
|
||||
}
|
||||
}
|
||||
}
|
||||
else{
|
||||
if (datased){
|
||||
termshow('This is the file on your computer: <br>- my_datas.zip <br>- servers_data.zip')
|
||||
}
|
||||
else{
|
||||
termshow('This is the file on your computer: <br>- my_datas.zip')
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (lowx=='attack'){
|
||||
if( connected){
|
||||
termshow('the attack start... <br> copying all the data in this server to your servers_data.zip file in your computer (it include all the file, folder etc.)...<br>breaking the server...<br>Disconnected: The server is destroy')
|
||||
connected = false
|
||||
datased = true
|
||||
ipdatas[ip]['destroyed'] = true
|
||||
}
|
||||
else{
|
||||
termshow('error you are not connected, please connect to a distant server before executing this command')
|
||||
}
|
||||
}
|
||||
else if( x==='help'){
|
||||
termshow('The available commands: <br>- help : print this message<br>- ls : list the files and folders<br>- pbk (only in your computer) : Get the password of an user from an ip address<br>- ssh (only in your computer) : conect to a distant server with an user and an ip address (you have to use pbk to get the password)<br>- attack (only in ssh servers) : start an attack that will add all the datas on the server in your servers_data.zip file and will destroy the server (warning this will no destroy only the server from the user it will destroy ALL the server (the address))<br>- theme : switch the theme of the game\n- save : save the game in your localStorage (alternative to cookies)\n- import : import the game from your localStorage\n- matrix : start or stop a matrix rain animation (just for fun...)\n- exit : if you are connected to distant server (ssh) it deconnect you, if you are not connected it exit this game<br>- infos : display infos on this game')
|
||||
}
|
||||
else if (lowx==='exit'){
|
||||
if (connected){
|
||||
termshow('disconnecting...')
|
||||
connected=false
|
||||
}
|
||||
else{
|
||||
termshow('Exiting the session...')
|
||||
termshow('Exiting the game, thank to play to this game, don\'t hesitate to help me or to give me your feedback')
|
||||
STOP = true
|
||||
location = '/'
|
||||
}
|
||||
}
|
||||
else if (lowx==='hack'){
|
||||
if (connected){
|
||||
termshow('--Start-of-the-hacking-program--')
|
||||
for(let i = 0; i<randint(0,50);i++){
|
||||
termshow(randchoice(codeline))
|
||||
}
|
||||
}
|
||||
else{
|
||||
termshow('you have to be connected')
|
||||
}
|
||||
}
|
||||
else if (lowx=='infos'){
|
||||
infos()
|
||||
}
|
||||
else if(x.startsWith('$$$')){
|
||||
if(x === '$$$' || x === '$$$ '){
|
||||
termshow('this command is for execute js code enter your js code after the $$$')
|
||||
}
|
||||
else{
|
||||
try{
|
||||
let tempcode = x.substring('$$$ '.length)
|
||||
let newfunc = new Function (tempcode)
|
||||
newfunc()
|
||||
}
|
||||
catch(e){
|
||||
termshow('Il y a eu une erreur : '+e)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
else{
|
||||
let temp = terminput('your name: ')
|
||||
if(temp.length<4){
|
||||
document.getElementById('inptindic').innerHTML ='your name must have more than 4 characters '
|
||||
}
|
||||
else{
|
||||
me = temp
|
||||
named = true
|
||||
document.getElementById('inptindic').innerHTML=''
|
||||
}
|
||||
}
|
||||
window.requestAnimationFrame(loop)
|
||||
}
|
||||
loop()
|
||||
//END OF MAIN-MODE CODE
|
||||
//START OF STORY MODE CODE
|
||||
|
||||
|
||||
// END OF STORY MODE CODE
|
||||
|
||||
// START OF DEV HELP API:
|
||||
function sendinput(){inputcomplete=true}
|
||||
function setinput(str){document.getElementById('terminpt').value=str}
|
||||
function execcommand(str){setinput(str); sendinput()}
|
||||
function last(){historic(); sendinput()}
|
||||
function autoc(str){setinput(str); autocomplete(); sendinput()}
|
||||
|
||||
|
||||
|
||||
//END OF DEV HELP API
|
118
main-site/CyberTermHack/V0.1/otherjsversion.js
Normal file
118
main-site/CyberTermHack/V0.1/otherjsversion.js
Normal file
|
@ -0,0 +1,118 @@
|
|||
var x=""
|
||||
function splitaddr(complete,cmd){
|
||||
try{
|
||||
let c= complete.substring(cmd.length())
|
||||
let u = c.split('@')[0]
|
||||
let a = c.split('@')[1]
|
||||
return [u,a]
|
||||
}
|
||||
catch(e){
|
||||
termshow('Please complete the command like this: '+cmd+'user@address')
|
||||
return 'ERROR'
|
||||
}
|
||||
}
|
||||
function infos(){
|
||||
termshow('01010101010101010\n1 CyberTermGame 1\n0 By GZod01 0\n10101010101010101\nInfos on the game : Hello my name is GZod01 and i make this game in python "for fun", I know this game is not reflecting the reality of the command on linux or windows machines but... it is a game...\nSorry if the english is not very good i speak french...')
|
||||
}
|
||||
var passwordlist = [listofpassword]
|
||||
var filelist = [listoffile]
|
||||
var connected = false
|
||||
var datased = false
|
||||
infos()
|
||||
var user=""
|
||||
var ip=""
|
||||
var password=""
|
||||
var destroyedip=[temporar, i, will, move, to, serverdatas]
|
||||
var codeline = [fake hack codelines]
|
||||
termshow('startingsession...')
|
||||
var me = terminput('your name: ')
|
||||
// example of serversdatas: "user@ip":{"destroyed":True (or False), "files":listoffiles, "password":"password"}
|
||||
var gamedatas = {
|
||||
"serverdatas":{},
|
||||
"username":me
|
||||
}
|
||||
function loop(){
|
||||
if(connected){
|
||||
x = terminput(`[${user}@${ip}] $ `)
|
||||
}
|
||||
else{
|
||||
x = terminput(`[ ${me}@MYCOMPUTER ] %`)
|
||||
}
|
||||
if(x.startswith('ssh')){
|
||||
if(connected){
|
||||
termshow('error, you are already in a distant server')
|
||||
}
|
||||
else{
|
||||
if(splitaddr(x,'ssh')=='ERROR'){
|
||||
}
|
||||
else{
|
||||
user=splitaddr(x, 'ssh')[0]
|
||||
ip = splitaddr(x, 'ssh')[1]
|
||||
termshow('connect to the computer with the ip '+ip+' from the user '+user+' ...')
|
||||
if(ip in destroyedip){
|
||||
termshow('error this server is destroyed')
|
||||
}
|
||||
else{
|
||||
sleep(1)
|
||||
terminput('Password: ')
|
||||
sleep(0.5)
|
||||
termshow('connected')
|
||||
connected = true
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (x.startswith('pbk')){
|
||||
if(connected){
|
||||
termshow('error you are on a distant server')
|
||||
}
|
||||
else{
|
||||
//TO CONTINUE
|
||||
}
|
||||
}
|
||||
}
|
||||
/*
|
||||
else:
|
||||
if splitaddr(x,'pbk')=='ERROR':
|
||||
splitaddr(x,'pbk')
|
||||
else:
|
||||
user=splitaddr(x, 'pbk')[0]
|
||||
ip = splitaddr(x, 'pbk')[1]
|
||||
print('Breaking the password of the user '+user+' to the computer with the ip '+ip+' ...')
|
||||
password= random.choice(passwordlist)
|
||||
print('The password is : '+ password)
|
||||
elif x=='ls':
|
||||
if connected:
|
||||
print('This is the file on the distant machine')
|
||||
for i in range(random.randint(1,10)):
|
||||
print('-'+random.choice(filelist))
|
||||
else:
|
||||
if datased:
|
||||
print('This is the file on your computer: \n- my_datas.zip \n- servers_data.zip')
|
||||
else:
|
||||
print('This is the file on your computer: \n- my_datas.zip')
|
||||
elif x=='attack':
|
||||
if connected:
|
||||
print('the attack start... \n copying all the data in this server to your servers_data.zip file in your computer (it include all the file, folder etc.)...\nbreaking the server...\nDisconnected: The server is destroy')
|
||||
connected = False
|
||||
datased = True
|
||||
destroyedip.append(ip)
|
||||
else:
|
||||
print('error you are not connected, please connect to a distant server before executing this command')
|
||||
elif x=='help':
|
||||
print('The available commands: \n- help : print this message\n- ls : list the files and folders\n- pbk (only in your computer) : Get the password of an user from an ip address\n- ssh (only in your computer) : conect to a distant server with an user and an ip address (you have to use pbk to get the password)\n- attack (only in ssh servers) : start an attack that will add all the datas on the server in your servers_data.zip file and will destroy the server\n- exit : if you are connected to distant server (ssh) it deconnect you, if you are not connected it exit this game\n- infos : display infos on this game')
|
||||
elif x=='exit':
|
||||
if connected:
|
||||
print('disconnecting...')
|
||||
connected=False
|
||||
else:
|
||||
print('Exiting the session...')
|
||||
print('Exiting the game, thank to play to this game, don\'t hesitate to help me or to give me your feedback')
|
||||
break
|
||||
elif x=='hack':
|
||||
if connected:
|
||||
print('--Start-of-the-hacking-program--')
|
||||
for i in range(random.randint(0,50)):
|
||||
print(random.choice(codeline))
|
||||
else:
|
||||
print('you have to be connected')*/
|
105
main-site/CyberTermHack/V0.1/py-curses-CyberTermHack.py
Normal file
105
main-site/CyberTermHack/V0.1/py-curses-CyberTermHack.py
Normal file
|
@ -0,0 +1,105 @@
|
|||
import time
|
||||
import random
|
||||
import curses
|
||||
x = ""
|
||||
def splitaddr(complete, cmd):
|
||||
try:
|
||||
c = complete[len(cmd):]
|
||||
u = c.split('@')[0]
|
||||
a = c.split('@')[1]
|
||||
return [u, a]
|
||||
except IndexError:
|
||||
print('Please complete the command like this: '+cmd+' user@address')
|
||||
return 'ERROR'
|
||||
def infos():
|
||||
print('01010101010101010\n1 CyberTermGame 1\n0 By GZod01 0\n10101010101010101\nInfos on the game : Hello my name is GZod01 and i make this game in python "for fun", I know this game is not reflecting the reality of the command on linux or windows machines but... it is a game...\nSorry if the english is not very good i speak french...')
|
||||
passwordlist = ["my_password","helloworld","ultra_secure_password","my_birthday"]
|
||||
filelist = ['picture.png','personnal_datas.csv', 'helloworld.py','i_hate_hackers.txt','speech_for_tomorrow.md', '.ha_ha_this_is_super_secret_file.txt','mydirectory/']
|
||||
connected = False
|
||||
datased = False
|
||||
infos()
|
||||
user = ""
|
||||
ip = ""
|
||||
password = ""
|
||||
destroyedip = []
|
||||
codeline = ["fn destroy(oiaf){executeshellcomand('destroy oiaf')}","hack-server()","destroy()","fn hack-server(files){for(var i = 0, i<len(files)){if (type_of_file(files[i])==='password_files_and_datas_files'){execcommand('copyfile_to_my_computer'); destroy(files)};", "print(01020003957058098409438409340&àà_09232983983983923999832983928398329389238938923892382938923899201809381093809é'802984029804802948049820840938éàç8309é_à'ç_éà'_09790872çà'àç_éè409724097240942èàçé'8è290479024798047298047904èé4908éè4) in serverdatas"]
|
||||
print('starting session ...')
|
||||
me = input('your name: ')
|
||||
# example of serversdatas: "user@ip":{"destroyed":True (or False), "files":listoffiles, "password":"password"}
|
||||
gamedatas = {
|
||||
"serversdatas":{},
|
||||
"username": me
|
||||
}
|
||||
def app():
|
||||
while True:
|
||||
if connected:
|
||||
x = input(f'[{user}@{ip}] $ ')
|
||||
else:
|
||||
x = input(f'[{me}@MYCOMPUTER] % ')
|
||||
if x.startswith('ssh'):
|
||||
if connected:
|
||||
print('error you already are in distant server')
|
||||
else:
|
||||
if splitaddr(x, 'ssh') == 'ERROR':
|
||||
splitaddr(x, 'ssh')
|
||||
else:
|
||||
user = splitaddr(x, 'ssh')[0]
|
||||
ip = splitaddr(x, 'ssh')[1]
|
||||
print('connect to the computer with the ip '+ip+' from the user '+user+' ...')
|
||||
if ip in destroyedip:
|
||||
print('error this server is destroyed')
|
||||
else:
|
||||
time.sleep(1)
|
||||
input('Password: ')
|
||||
time.sleep(0.5)
|
||||
print('connected')
|
||||
connected=True
|
||||
elif x.startswith('pbk'):
|
||||
if connected:
|
||||
print('error you are on a distant server')
|
||||
else:
|
||||
if splitaddr(x,'pbk')=='ERROR':
|
||||
splitaddr(x,'pbk')
|
||||
else:
|
||||
user=splitaddr(x, 'pbk')[0]
|
||||
ip = splitaddr(x, 'pbk')[1]
|
||||
print('Breaking the password of the user '+user+' to the computer with the ip '+ip+' ...')
|
||||
password= random.choice(passwordlist)
|
||||
print('The password is : '+ password)
|
||||
elif x=='ls':
|
||||
if connected:
|
||||
print('This is the file on the distant machine')
|
||||
for i in range(random.randint(1,10)):
|
||||
print('-'+random.choice(filelist))
|
||||
else:
|
||||
if datased:
|
||||
print('This is the file on your computer: \n- my_datas.zip \n- servers_data.zip')
|
||||
else:
|
||||
print('This is the file on your computer: \n- my_datas.zip')
|
||||
elif x=='attack':
|
||||
if connected:
|
||||
print('the attack start... \n copying all the data in this server to your servers_data.zip file in your computer (it include all the file, folder etc.)...\nbreaking the server...\nDisconnected: The server is destroy')
|
||||
connected = False
|
||||
datased = True
|
||||
destroyedip.append(ip)
|
||||
else:
|
||||
print('error you are not connected, please connect to a distant server before executing this command')
|
||||
elif x=='help':
|
||||
print('The available commands: \n- help : print this message\n- ls : list the files and folders\n- pbk (only in your computer) : Get the password of an user from an ip address\n- ssh (only in your computer) : conect to a distant server with an user and an ip address (you have to use pbk to get the password)\n- attack (only in ssh servers) : start an attack that will add all the datas on the server in your servers_data.zip file and will destroy the server\n- exit : if you are connected to distant server (ssh) it deconnect you, if you are not connected it exit this game\n- infos : display infos on this game')
|
||||
elif x=='exit':
|
||||
if connected:
|
||||
print('disconnecting...')
|
||||
connected=False
|
||||
else:
|
||||
print('Exiting the session...')
|
||||
print('Exiting the game, thank to play to this game, don\'t hesitate to help me or to give me your feedback')
|
||||
break
|
||||
elif x=='hack':
|
||||
if connected:
|
||||
print('--Start-of-the-hacking-program--')
|
||||
for i in range(random.randint(0,50)):
|
||||
print(random.choice(codeline))
|
||||
else:
|
||||
print('you have to be connected')
|
||||
|
||||
curses.wrapper(app)
|
124
main-site/CyberTermHack/V0.1/py-term-CyberTermHack.py
Normal file
124
main-site/CyberTermHack/V0.1/py-term-CyberTermHack.py
Normal file
|
@ -0,0 +1,124 @@
|
|||
import time
|
||||
import random
|
||||
x = ""
|
||||
def splitaddr(complete, cmd):
|
||||
try:
|
||||
c = complete[len(cmd):]
|
||||
u = c.split('@')[0]
|
||||
a = c.split('@')[1]
|
||||
return [u, a]
|
||||
except IndexError:
|
||||
print('Please complete the command like this: '+cmd+' user@address')
|
||||
return 'ERROR'
|
||||
def infos():
|
||||
print('01010101010101010\n1 CyberTermGame 1\n0 By GZod01 0\n10101010101010101\nInfos on the game : Hello my name is GZod01 and i make this game in python "for fun", I know this game is not reflecting the reality of the command on linux or windows machines but... it is a game...\nSorry if the english is not very good i speak french...')
|
||||
passwordlist = ["my_password","helloworld","ultra_secure_password","my_birthday"]
|
||||
filelist = ['picture.png','personnal_datas.csv', 'helloworld.py','i_hate_hackers.txt','speech_for_tomorrow.md', '.ha_ha_this_is_super_secret_file.txt','mydirectory/']
|
||||
connected = False
|
||||
datased = False
|
||||
infos()
|
||||
user = ""
|
||||
ip = ""
|
||||
password = ""
|
||||
destroyedip = []
|
||||
codeline = ["fn destroy(oiaf){executeshellcomand('destroy oiaf')}","hack-server()","destroy()","fn hack-server(files){for(var i = 0, i<len(files)){if (type_of_file(files[i])==='password_files_and_datas_files'){execcommand('copyfile_to_my_computer'); destroy(files)};", "print(01020003957058098409438409340&àà_09232983983983923999832983928398329389238938923892382938923899201809381093809é'802984029804802948049820840938éàç8309é_à'ç_éà'_09790872çà'àç_éè409724097240942èàçé'8è290479024798047298047904èé4908éè4) in serverdatas"]
|
||||
print('starting session ...')
|
||||
me = input('your name: ')
|
||||
# example of serversdatas: "user@ip":{"destroyed":True (or False), "files":listoffiles, "password":"password"}
|
||||
gamedatas = {
|
||||
"serversdatas":{},
|
||||
"username": me
|
||||
}
|
||||
while True:
|
||||
if connected:
|
||||
x = input(f'{user}@{ip} $ ')
|
||||
else:
|
||||
x = input(f'{me}@MYCOMPUTER # ')
|
||||
if x.startswith('ssh'):
|
||||
if connected:
|
||||
print('error you already are in distant server')
|
||||
else:
|
||||
if splitaddr(x, 'ssh') == 'ERROR':
|
||||
splitaddr(x, 'ssh')
|
||||
else:
|
||||
user = splitaddr(x, 'ssh')[0]
|
||||
ip = splitaddr(x, 'ssh')[1]
|
||||
print('connect to the computer with the ip '+ip+' from the user '+user+' ...')
|
||||
if ip in destroyedip:
|
||||
print('error this server is destroyed')
|
||||
else:
|
||||
time.sleep(1)
|
||||
input('Password: ')
|
||||
time.sleep(0.5)
|
||||
print('connected')
|
||||
connected=True
|
||||
elif x.startswith('pbk'):
|
||||
if connected:
|
||||
print('error you are on a distant server')
|
||||
else:
|
||||
if splitaddr(x,'pbk')=='ERROR':
|
||||
splitaddr(x,'pbk')
|
||||
else:
|
||||
user=splitaddr(x, 'pbk')[0]
|
||||
ip = splitaddr(x, 'pbk')[1]
|
||||
print('Breaking the password of the user '+user+' to the computer with the ip '+ip+' ...')
|
||||
password= random.choice(passwordlist)
|
||||
print('The password is : '+ password)
|
||||
elif x=='ls':
|
||||
if connected:
|
||||
print('This is the file on the distant machine')
|
||||
for i in range(random.randint(1,10)):
|
||||
print('-'+random.choice(filelist))
|
||||
else:
|
||||
if datased:
|
||||
print('This is the file on your computer: \n- my_datas.zip \n- servers_data.zip')
|
||||
else:
|
||||
print('This is the file on your computer: \n- my_datas.zip')
|
||||
elif x=='attack':
|
||||
if connected:
|
||||
print('the attack start... \n copying all the data in this server to your servers_data.zip file in your computer (it include all the file, folder etc.)...\nbreaking the server...\nDisconnected: The server is destroy')
|
||||
connected = False
|
||||
datased = True
|
||||
destroyedip.append(ip)
|
||||
else:
|
||||
print('error you are not connected, please connect to a distant server before executing this command')
|
||||
elif x=='help':
|
||||
print('The available commands: \n- help : print this message\n- ls : list the files and folders\n- pbk (only in your computer) : Get the password of an user from an ip address\n- ssh (only in your computer) : conect to a distant server with an user and an ip address (you have to use pbk to get the password)\n- attack (only in ssh servers) : start an attack that will add all the datas on the server in your servers_data.zip file and will destroy the server\n- exit : if you are connected to distant server (ssh) it deconnect you, if you are not connected it exit this game\n- infos : display infos on this game')
|
||||
elif x=='exit':
|
||||
if connected:
|
||||
print('disconnecting...')
|
||||
connected=False
|
||||
else:
|
||||
print('Exiting the session...')
|
||||
print('Exiting the game, thank to play to this game, don\'t hesitate to help me or to give me your feedback')
|
||||
break
|
||||
elif x=='hack':
|
||||
if connected:
|
||||
print('--Start-of-the-hacking-program--')
|
||||
for i in range(random.randint(0,50)):
|
||||
print(random.choice(codeline))
|
||||
else:
|
||||
print('you have to be connected')
|
||||
elif x=='infos':
|
||||
infos()
|
||||
elif x=='$$$':
|
||||
pcode=''
|
||||
ccode=''
|
||||
tocancel=False
|
||||
while True:
|
||||
pcode = input()
|
||||
if pcode=='$$$':
|
||||
break
|
||||
elif pcode=='$HELP$':
|
||||
print('type $$$ to exit the python code')
|
||||
elif pcode=='$CANCEL':
|
||||
tocancel=True
|
||||
else:
|
||||
ccode = ccode+pcode+'\n'
|
||||
if tocancel:
|
||||
pass
|
||||
else:
|
||||
exec(ccode)
|
||||
|
||||
|
||||
|
1
main-site/CyberTermHack/V0.2/devlog.txt
Normal file
1
main-site/CyberTermHack/V0.2/devlog.txt
Normal file
|
@ -0,0 +1 @@
|
|||
storymode and custom real program
|
79
main-site/CyberTermHack/V0.2/index.html
Normal file
79
main-site/CyberTermHack/V0.2/index.html
Normal file
|
@ -0,0 +1,79 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="fr">
|
||||
<head>
|
||||
<title>CyberTermHack</title>
|
||||
<meta charset="UTF-8">
|
||||
<style>
|
||||
:root{
|
||||
--bg-color: black;
|
||||
--txt-color: white;
|
||||
}
|
||||
html, body{
|
||||
background-color:var(--bg-color);
|
||||
color: var(--txt-color);
|
||||
margin:0;
|
||||
height:100%;
|
||||
min-height:100vh;
|
||||
display:flex;
|
||||
flex-direction:column;
|
||||
word-wrap: break-word;
|
||||
word-break: break-all;
|
||||
z-index:2
|
||||
}
|
||||
.second {
|
||||
flex-grow: 1;
|
||||
}
|
||||
#termcontent{
|
||||
display: fixed;
|
||||
left:0;
|
||||
top:0;
|
||||
height:95%;
|
||||
width:100%;
|
||||
overflow: auto
|
||||
}
|
||||
#divinput{
|
||||
display:flex;
|
||||
left:0;
|
||||
bottom:0;
|
||||
height:5%;
|
||||
width:100%
|
||||
}
|
||||
#terminpt{
|
||||
border: 0px solid !important;
|
||||
background-color: var(--bg-color);
|
||||
color:var(--txt-color);
|
||||
width:95%
|
||||
}
|
||||
/*#terminptdiv{
|
||||
float: none
|
||||
}*/
|
||||
*:focus {
|
||||
outline: none;
|
||||
}
|
||||
/*#divofinfos{
|
||||
float:left
|
||||
}*/
|
||||
#matrixcanvas{
|
||||
width:100%;
|
||||
height:100%;
|
||||
position:fixed;
|
||||
z-index:-1
|
||||
}
|
||||
</style>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
</head>
|
||||
<body>
|
||||
<!--username and ip: green, $ or %: white, commands: white-->
|
||||
<div id="termcontent">
|
||||
<!-- oldcommands and outputs -->
|
||||
</div>
|
||||
<div id="divinput">
|
||||
<span id=spanofinfos><span id="inptindic"></span><span id="inptname"></span></span><span class=second><input id=terminpt type="text"/></span>
|
||||
<!-- actual command with username and ip, $ or %, input for command, enter to send command -->
|
||||
</div>
|
||||
<canvas id=matrixcanvas style='width:100%; height: 100%'>
|
||||
</canvas>
|
||||
<script src=//api.gzod01.fr/scripts/termapi.js></script>
|
||||
<script src="maincode.js"></script>
|
||||
</body>
|
||||
</html>
|
426
main-site/CyberTermHack/V0.2/maincode.js
Normal file
426
main-site/CyberTermHack/V0.2/maincode.js
Normal file
|
@ -0,0 +1,426 @@
|
|||
var x = ""
|
||||
function splitaddr(complete, cmd){
|
||||
try{
|
||||
let c = complete.substring(cmd.length)
|
||||
let u = c.split('@')[0]
|
||||
let a = c.split('@')[1]
|
||||
if (a==undefined){
|
||||
termshow('Please complete the command like this: '+cmd+' user@address')
|
||||
return 'ERROR'
|
||||
}
|
||||
else{
|
||||
return [u, a]
|
||||
}
|
||||
}
|
||||
catch(e){
|
||||
console.error(e)
|
||||
termshow('Please complete the command like this: '+cmd+' user@address')
|
||||
return 'ERROR'
|
||||
}
|
||||
}
|
||||
function infos(){
|
||||
termshow('01010101010101010\n1.CyberTermGame.1\n0.....By GZod01.....0\n10101010101010101\nInfos on the game : Hello my name is GZod01 and i make this game in javascript (base game in python) "for fun", I know this game is not reflecting the reality of the command on linux or windows machines but... it is a game...\nSorry if the english is not very good i speak french...')
|
||||
}
|
||||
stopmatrix()
|
||||
var passwordlist = ["my_password","helloworld","ultra_secure_password","my_birthday"]
|
||||
var filelist = ['picture.png','personnal_datas.csv', 'helloworld.py','i_hate_hackers.txt','speech_for_tomorrow.md', '.ha_ha_this_is_super_secret_file.txt','mydirectory/']
|
||||
var connected = false
|
||||
var datased = false
|
||||
var STOP = false
|
||||
infos()
|
||||
var user = ""
|
||||
var ip = ""
|
||||
var password = ""
|
||||
var destroyedip = []
|
||||
var codeline = ["fn destroy(oiaf){executeshellcomand('destroy oiaf')}","hack-server()","destroy()","fn hack-server(files){for(var i = 0, i<len(files)){if (type_of_file(files[i])==='password_files_and_datas_files'){execcommand('copyfile_to_my_computer'); destroy(files)};", "print(01020003957058098409438409340&àà_09232983983983923999832983928398329389238938923892382938923899201809381093809é'802984029804802948049820840938éàç8309é_à'ç_éà'_09790872çà'àç_éè409724097240942èàçé'8è290479024798047298047904èé4908éè4) in serverdatas"]
|
||||
termshow('starting session ...')
|
||||
var me = ''
|
||||
var list_of_command = ['ls','ssh','pbk','exit','theme','matrix','hack','attack','save','import','help','exit']
|
||||
function autocomplete(){
|
||||
let inptval = document.getElementById('terminpt').value
|
||||
termshow('List of available commands starting with " '+inptval+' " :')
|
||||
for(let i = 0; i<list_of_command.length; i++){
|
||||
if(list_of_command[i].startsWith(inptval)){
|
||||
termshow('- '+list_of_command[i])
|
||||
}
|
||||
}
|
||||
}
|
||||
named = false
|
||||
// example of serversdatas: "ip":{"destroyed":true (or false), "files":listoffiles, "password":"password"}
|
||||
var gamedatas = {
|
||||
"serversdatas":{},
|
||||
"username": me,
|
||||
'colorscheme': 'default' //it can be green / red / blue / yellow
|
||||
}
|
||||
// START OF MAIN-MODE CODE
|
||||
function gettheme(){
|
||||
let r = document.querySelector(':root')
|
||||
if (gamedatas.colorscheme ==='default'){
|
||||
r.style.setProperty('--txt-color','white')
|
||||
}
|
||||
else if (gamedatas.colorscheme === 'green'){
|
||||
r.style.setProperty('--txt-color','green')
|
||||
}
|
||||
else if (gamedatas.colorscheme === 'red'){
|
||||
r.style.setProperty('--txt-color','red')
|
||||
}
|
||||
else if (gamedatas.colorscheme === 'blue'){
|
||||
r.style.setProperty('--txt-color','blue')
|
||||
}
|
||||
else if (gamedatas.colorscheme === 'yellow'){
|
||||
r.style.setProperty('--txt-color','yellow')
|
||||
}
|
||||
}
|
||||
var ipdatas = {}
|
||||
document.getElementById('terminpt').focus()
|
||||
async function loop(){
|
||||
gamedatas.serversdatas = ipdatas
|
||||
if(named){
|
||||
if(connected){
|
||||
x = terminput(`${user}@${ip} $ `)
|
||||
}
|
||||
else{
|
||||
x = terminput(`${me}@MYCOMPUTER # `)
|
||||
}
|
||||
if(x==='ERR'){}
|
||||
else{
|
||||
//historic.push(x)
|
||||
lastx = x
|
||||
let lowx = x.toLowerCase()
|
||||
if(connected){
|
||||
termshow(`${user}@${ip} $ ${x}`)
|
||||
}
|
||||
else{
|
||||
termshow(`${me}@MYCOMPUTER # ${x}`)
|
||||
}
|
||||
if (lowx.startsWith('ssh')){
|
||||
hackssh(x)
|
||||
}
|
||||
else if (lowx.startsWith('pbk')){
|
||||
hackpbk(x)
|
||||
}
|
||||
|
||||
else if (lowx.startsWith('theme')){
|
||||
hacktheme(x)
|
||||
}
|
||||
else if (lowx.startsWith('matrix')){
|
||||
hackmatrix(x)
|
||||
}
|
||||
else if(lowx==='save'){
|
||||
hacksave()
|
||||
}
|
||||
else if(lowx==='import'){
|
||||
hackimport()
|
||||
}
|
||||
else if (lowx=='ls'){
|
||||
hackls()
|
||||
}
|
||||
else if (lowx=='attack'){
|
||||
hackattack()
|
||||
}
|
||||
else if( x==='help'){
|
||||
hackhelp()
|
||||
}
|
||||
else if (lowx==='exit'){
|
||||
hackexit()
|
||||
}
|
||||
else if (lowx==='hack'){
|
||||
hackhack()
|
||||
}
|
||||
else if (lowx=='infos'){
|
||||
infos()
|
||||
}
|
||||
else if(x.startsWith('$$$')){
|
||||
execjscode(x)
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
else{
|
||||
let temp = terminput('your name: ')
|
||||
if(temp.length<4){
|
||||
document.getElementById('inptindic').innerHTML ='your name must have more than 4 characters '
|
||||
}
|
||||
else{
|
||||
me = temp
|
||||
named = true
|
||||
document.getElementById('inptindic').innerHTML=''
|
||||
}
|
||||
}
|
||||
window.requestAnimationFrame(loop)
|
||||
}
|
||||
loop()
|
||||
//----------------------------------------------------------------------------------------------
|
||||
//END OF MAIN-MODE CODE
|
||||
// START OF COMMAND FUNCTIONS
|
||||
async function execjscode(cx){
|
||||
if(cx === '$$$' || cx === '$$$ '){
|
||||
termshow('this command is for execute js code enter your js code after the $$$')
|
||||
}
|
||||
else{
|
||||
try{
|
||||
let tempcode = cx.substring('$$$ '.length)
|
||||
let newfunc = new Function (tempcode)
|
||||
newfunc()
|
||||
}
|
||||
catch(e){
|
||||
termshow('Il y a eu une erreur : '+e)
|
||||
}
|
||||
}
|
||||
}
|
||||
async function hackhack(){
|
||||
if (connected){
|
||||
termshow('--Start-of-the-hacking-program--')
|
||||
for(let i = 0; i<randint(0,50);i++){
|
||||
termshow(randchoice(codeline))
|
||||
}
|
||||
}
|
||||
else{
|
||||
termshow('you have to be connected')
|
||||
}
|
||||
}
|
||||
async function hackexit(){
|
||||
if (connected){
|
||||
termshow('disconnecting...')
|
||||
connected=false
|
||||
}
|
||||
else{
|
||||
termshow('Exiting the session...')
|
||||
termshow('Exiting the game, thank to play to this game, don\'t hesitate to help me or to give me your feedback')
|
||||
STOP = true
|
||||
location = '/'
|
||||
}
|
||||
}
|
||||
function hackhelp(){
|
||||
|
||||
termshow('The available commands: \n- help : print this message\n- ls : list the files and folders\n- pbk (only in your computer) : Get the password of an user from an ip address\n- ssh (only in your computer) : conect to a distant server with an user and an ip address (you have to use pbk to get the password)\n- attack (only in ssh servers) : start an attack that will add all the datas on the server in your servers_data.zip file and will destroy the server (warning this will no destroy only the server from the user it will destroy ALL the server (the address))\n- theme : switch the theme of the game\n- save : save the game in your localStorage (alternative to cookies)\n- import : import the game from your localStorage\n- matrix : start or stop a matrix rain animation (just for fun...)\n- exit : if you are connected to distant server (ssh) it deconnect you, if you are not connected it exit this game\n- infos : display infos on this game')
|
||||
}
|
||||
async function hackattack(){
|
||||
|
||||
if( connected){
|
||||
termshow('the attack start... \n copying all the data in this server to your servers_data.zip file in your computer (it include all the file, folder etc.)...\nbreaking the server...\nDisconnected: The server is destroy')
|
||||
connected = false
|
||||
datased = true
|
||||
ipdatas[ip]['destroyed'] = true
|
||||
}
|
||||
else{
|
||||
termshow('error you are not connected, please connect to a distant server before executing this command')
|
||||
}
|
||||
}
|
||||
async function hackls(){
|
||||
|
||||
if (connected){
|
||||
if (ipdatas[ip]['files'] == undefined){
|
||||
termshow('This is the file on the distant machine')
|
||||
let fileiplist = []
|
||||
for(let i=0; i < parseInt(randint(1,10)); i++){
|
||||
let currentchoicefile = randchoice(filelist)
|
||||
termshow('-'+currentchoicefile)
|
||||
fileiplist.push(currentchoicefile)
|
||||
}
|
||||
ipdatas[ip]['files'] = fileiplist
|
||||
}
|
||||
else{
|
||||
termshow('This is the file on the distant machine')
|
||||
for(let i = 0; i<ipdatas[ip]['files'].length; i++){
|
||||
termshow('-'+ ipdatas[ip]['files'][i])
|
||||
}
|
||||
}
|
||||
}
|
||||
else{
|
||||
if (datased){
|
||||
termshow('This is the file on your computer: \n- my_datas.zip \n- servers_data.zip')
|
||||
}
|
||||
else{
|
||||
termshow('This is the file on your computer: \n- my_datas.zip')
|
||||
}
|
||||
}
|
||||
}
|
||||
async function hackimport(){
|
||||
|
||||
let tmpdatas = localStorage.getItem('hackergamedatas')
|
||||
if (tmpdatas == undefined){
|
||||
termshow('you don\'t have any data saved, please execute the save command before to import')
|
||||
}
|
||||
else{
|
||||
gamedatas = JSON.parse(tmpdatas)
|
||||
}
|
||||
}
|
||||
function hacksave(){
|
||||
|
||||
localStorage.setItem('hackergamedatas',JSON.stringify(gamedatas))
|
||||
termshow('Data saved')
|
||||
termshow(localStorage.getItem('hackergamedatas'))
|
||||
}
|
||||
function hackmatrix(lowx){
|
||||
|
||||
if(lowx==='matrix'||lowx==='matrix '){
|
||||
matrix(gamedatas.colorscheme)
|
||||
}
|
||||
else{
|
||||
let nx = x.substring('matrix '.length)
|
||||
if(nx==='yellow' || nx ==='blue' || nx==='white' || nx ==='red' || nx === 'green'||nx=='purple'|| nx=='cyan' || nx=='magenta'){
|
||||
matrix(nx)
|
||||
}
|
||||
else if(nx==='stop'){
|
||||
stopmatrix()
|
||||
}
|
||||
else{
|
||||
termshow('Switch the theme with this command,\n the available colors are : default , yellow , red , blue , green . \n execute the command like this: theme default or theme yellow , etc.')
|
||||
}
|
||||
}
|
||||
}
|
||||
function hacktheme(lowx){
|
||||
|
||||
if(lowx==='theme'||lowx==='theme '){
|
||||
termshow('Switch the theme with this command,\n the available colors are : default , yellow , red , blue , green . \n execute the command like this: theme default or theme yellow , etc.')
|
||||
}
|
||||
else{
|
||||
let nx = x.substring('theme '.length)
|
||||
if(nx==='yellow' || nx ==='blue' || nx==='default' || nx ==='red' || nx === 'green'){
|
||||
gamedatas.colorscheme = nx
|
||||
gettheme()
|
||||
}
|
||||
else{
|
||||
termshow('Switch the theme with this command,\n the available colors are : default , yellow , red , blue , green . \n execute the command like this: theme default or theme yellow , etc.')
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
async function hackpbk(x){
|
||||
|
||||
if (connected){
|
||||
termshow('error you are on a distant server')
|
||||
}
|
||||
else{
|
||||
if (splitaddr(x,'pbk')==='ERROR'){
|
||||
splitaddr(x,'pbk')
|
||||
}
|
||||
else{
|
||||
user=splitaddr(x, 'pbk')[0]
|
||||
ip = splitaddr(x, 'pbk')[1]
|
||||
if(ipdatas[ip]==undefined){
|
||||
ipdatas[ip]={}
|
||||
}
|
||||
termshow('Breaking the password of the user '+user+' to the computer with the ip '+ip+' ...')
|
||||
password= randchoice(passwordlist)
|
||||
ipdatas[ip]['password']=password
|
||||
termshow('The password is : '+ password)
|
||||
}
|
||||
}
|
||||
}
|
||||
async function hackssh(x){
|
||||
|
||||
if (connected){
|
||||
termshow('error you already are in distant server')
|
||||
}
|
||||
else{
|
||||
if (splitaddr(x, 'ssh') === 'ERROR'){
|
||||
}
|
||||
else{
|
||||
user = splitaddr(x, 'ssh')[0]
|
||||
ip = splitaddr(x, 'ssh')[1]
|
||||
if(ipdatas[ip]==undefined){
|
||||
ipdatas[ip]={}
|
||||
}
|
||||
termshow('connect to the computer with the ip '+ip+' from the user '+user+' ...')
|
||||
if (ipdatas[ip]['destroyed']){
|
||||
termshow('error this server is destroyed')
|
||||
}
|
||||
else{
|
||||
if(ipdatas[ip]['password']==undefined){
|
||||
termshow('you don\'t have the password of this server')
|
||||
}
|
||||
else{
|
||||
await sleep(1)
|
||||
termshow('Password: AUTOMATIC_PASSWORD_SYSTEM')
|
||||
// while(temppass != ipdatas[ip]['password']){
|
||||
// temppass = terminput('Password: ')
|
||||
// }
|
||||
await sleep(1)
|
||||
termshow('connected')
|
||||
connected=true
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
//----------------------------------------------------------------------------------------------------------------
|
||||
// END OF COMMAND FUNCTIONS
|
||||
|
||||
|
||||
if(true){}
|
||||
else{
|
||||
//START OF INGAME PROGRAM CODES
|
||||
//sorry it is too difficult to create
|
||||
//t and x for transform and execute
|
||||
function tandx(code, originactions={'ALERTME':'','ADD':''}){
|
||||
let lcode = code.split('\n')
|
||||
for(let i =0; i<lcode.length; i++){
|
||||
if(lcode==='ALERTME'){
|
||||
termshow('ALERT : '+originactions['ALERTME'])
|
||||
}
|
||||
else if(lcode==='ADD'){
|
||||
try{
|
||||
new Function(originactions['ADD'])()
|
||||
}
|
||||
catch(e){cwarn('ERREUR DANS LE CODE SOURCE: '+e)}
|
||||
}
|
||||
}
|
||||
}
|
||||
var listofconnected = []
|
||||
var connectedevent = {
|
||||
'name':'',
|
||||
'ip':''
|
||||
}
|
||||
function on_connected_to_me(code){
|
||||
let actions={
|
||||
'ALERTME': 'ALERT SOMEONE CONNECT TO YOU',
|
||||
'ADD':'listofconnected.push(connectedevent.name+";"+connectedevent.ip")'
|
||||
}
|
||||
tandx(code, actions)
|
||||
}
|
||||
// END OF REAL PROGRAM CODES
|
||||
|
||||
// sorry it's very difficult
|
||||
//START OF STORY MODE CODE
|
||||
var lifes = 3
|
||||
function storyloop(condition, toexecute, quantity_of_try=3){
|
||||
x = terminput(me+'@'+'storymode')
|
||||
let trys=0
|
||||
if(x==='ERR'){}
|
||||
else{
|
||||
if(condition){
|
||||
toexecute()
|
||||
}
|
||||
else{
|
||||
quantity
|
||||
}
|
||||
}
|
||||
}
|
||||
async function chap1m1(){
|
||||
termshow('WELCOME TO THE STORY MODE')
|
||||
await sleep(2)
|
||||
termshow('NOW YOU WILL HAVE TO HACK A SERVER')
|
||||
await sleep(2)
|
||||
termshow('SORRY YOU DON\'T KNOW WHO I AM')
|
||||
await sleep(0.5)
|
||||
termshow('MY NAME IS HACKIA AND I\'M AN IA CREATED TO HELP THE HACKER BEGINNER')
|
||||
termshow('NOW SSH TO THE SERVER AT THE IP 1234.5678.9012 FROM THE USER ROBERT (type ssh name_of_user@ip_of_server)')
|
||||
|
||||
}
|
||||
|
||||
// END OF STORY MODE CODE
|
||||
}
|
||||
|
81
main-site/CyberTermHack/api.html
Normal file
81
main-site/CyberTermHack/api.html
Normal file
|
@ -0,0 +1,81 @@
|
|||
<!--YOUR PAGE HAVE TO CONTAIN THESE ELEMENT FOR THE API TO WORK:-->
|
||||
<script>
|
||||
document.body.innerText = `
|
||||
YOUR PAGE HAVE TO CONTAIN THESE ELEMENT FOR THE API TO WORK:
|
||||
|
||||
<!DOCTYPE html>
|
||||
<html lang="fr">
|
||||
<head>
|
||||
<title>TO REPLACE WITH YOUR TITLE</title>
|
||||
<meta charset="UTF-8">
|
||||
<style>
|
||||
:root{
|
||||
--bg-color: black;
|
||||
--txt-color: white;
|
||||
}
|
||||
html, body{
|
||||
background-color:var(--bg-color);
|
||||
color: var(--txt-color);
|
||||
margin:0;
|
||||
height:100%;
|
||||
min-height:100vh;
|
||||
display:flex;
|
||||
flex-direction:column;
|
||||
word-wrap: break-word;
|
||||
word-break: break-all;
|
||||
z-index:2
|
||||
}
|
||||
.second {
|
||||
flex-grow: 1;
|
||||
}
|
||||
#termcontent{
|
||||
display: fixed;
|
||||
left:0;
|
||||
top:0;
|
||||
height:95%;
|
||||
width:100%;
|
||||
overflow: auto
|
||||
}
|
||||
#divinput{
|
||||
display:flex;
|
||||
left:0;
|
||||
bottom:0;
|
||||
height:5%;
|
||||
width:100%
|
||||
}
|
||||
#terminpt{
|
||||
border: 0px solid !important;
|
||||
background-color: var(--bg-color);
|
||||
color:var(--txt-color);
|
||||
width:95%
|
||||
}
|
||||
/*#terminptdiv{
|
||||
float: none
|
||||
}*/
|
||||
*:focus {
|
||||
outline: none;
|
||||
}
|
||||
/*#divofinfos{
|
||||
float:left
|
||||
}*/
|
||||
#matrixcanvas{
|
||||
width:100%;
|
||||
height:100%;
|
||||
position:fixed;
|
||||
z-index:-1
|
||||
}
|
||||
</style>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
</head>
|
||||
<body>
|
||||
<!--username and ip: green, $ or %: white, commands: white-->
|
||||
<div id="termcontent">
|
||||
</div>
|
||||
<div id="divinput">
|
||||
<span id=spanofinfos><span id="inptindic"></span><span id="inptname"></span></span><span class=second><input id=terminpt type="text"/></span>
|
||||
</div>
|
||||
<canvas id=matrixcanvas style='width:100%; height: 100%'>
|
||||
</canvas>
|
||||
<script src="//api.gzod01.fr/scripts/termapi.js"></script>
|
||||
</body>
|
||||
</html>`</script>
|
32
main-site/CyberTermHack/index.html
Normal file
32
main-site/CyberTermHack/index.html
Normal file
|
@ -0,0 +1,32 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="fr">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<link rel="icon" href="//api.gzod01.fr/pictures/gzod01.ico">
|
||||
<link rel="stylesheet" href="//api.gzod01.fr/css/style.css">
|
||||
<script src="//api.gzod01.fr/scripts/main.js"></script>
|
||||
<title>index.html</title>
|
||||
</head>
|
||||
<body>
|
||||
<div id="header"></div>
|
||||
<div class=content>
|
||||
<ul><h1>Liste des versions</h1><li-a ref="V0.1/">Version 0.1</li-a><li-a ref="./V0.1.2:OPTIMIZED/">Version O.1.2 OPTIMISEE</li-a><li-a ref="V0.2/">Version 0.2 <span style="color:white; background-color:red">NEWEST</span></li-a></ul>
|
||||
<script>
|
||||
class ListAnchor extends HTMLElement { // (1)
|
||||
connectedCallback() {
|
||||
let t_li = document.createElement('li')
|
||||
let t_a = document.createElement('a')
|
||||
t_a.href= this.getAttribute('ref')
|
||||
t_a.innerHTML = this.innerHTML
|
||||
t_li.appendChild(t_a)
|
||||
this.replaceWith(t_li)
|
||||
}
|
||||
}
|
||||
customElements.define("li-a", ListAnchor);
|
||||
</script>
|
||||
</div>
|
||||
<div id="footer"></div>
|
||||
</body>
|
||||
</html>
|
34
main-site/about.html
Normal file
34
main-site/about.html
Normal file
|
@ -0,0 +1,34 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="fr">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<link rel="icon" href="//api.gzod01.fr/pictures/gzod01.ico">
|
||||
<link rel="stylesheet" href="//api.gzod01.fr/css/style.css">
|
||||
<script src="//api.gzod01.fr/scripts/main.js"></script>
|
||||
<title>A Propos</title>
|
||||
</head>
|
||||
<body>
|
||||
<div id="header"></div>
|
||||
<div class=content>
|
||||
<p>Ceci est le site de GZod01 sur ce site vous pouvez trouver les <a href="/games">Jeux</a> que j'ai créé (sauf exceptions), les <a href="/services">Services</a> que je propose, mes <a href="/projects">Projets</a> et autres.</p>
|
||||
<p>Si vous voulez me contacter pour me demander des infos, me suggèrer quelque chose, me rejoindre, me proposer un projet ou autres, vous pouvez vous rendre sur la page de <a href="/contact">Contact</a>.</p>
|
||||
<p>Le <a href="/sitemap">Plan du Site</a> regroupe des liens vers toutes les pages disponibles sur mon site (en tout cas les pages principales).</p>
|
||||
<p> Vous pouvez retrouver les <a href=/legal>Mentions Légales</a> sur <a href="/legal">cette page</a>.</p><br>
|
||||
<p>Autres Sites (Sous Domaines de celui-ci):</p>
|
||||
<ul>
|
||||
<li><a href="//blog.gzod01.fr">blog.gzod01.fr</a> : Mon Blog principal sur lequel je poste des articles sur la programmation (et moins souvent sur les jeux vidéos).</li>
|
||||
<li><a href="//blog2.gzod01.fr">blog2.gzod01.fr</a> : Mon Blog secondaire sur lequel je poste des articles sur des sujets plus globaux (un peu sur tout et n'importe quoi).</li>
|
||||
<li><a href="//host.gzod01.fr">host.gzod01.fr</a> : Mon service d'hébérgement de page (explications sur le site).</li>
|
||||
<li><a href="//api.gzod01.fr">api.gzod01.fr</a> : Les apis que j'ai créé pour mon site ou pour d'autres projets sont sur ce domaine (StyleSheet CSS, Script JS, Headers et Footers HTML, etc.)</li>
|
||||
<li><a href="//auth.gzod01.fr">auth.gzod01.fr</a> : Mon service d'authentification</li>
|
||||
</ul>
|
||||
<br>
|
||||
<p>
|
||||
A propos de moi: Developpeur Français, j'ai des compétences en Python, HTML, JS, un peu de CSS, un peu de GDScript(le language de Godot). J'essaye d'apprendre des languages de programmation comme: PHP, C, C++, C#, Rust. J'utilise le pseudonyme de GZod01 car je préfère garder mon identité secrète pour le moment.</p>
|
||||
<br><br><br><p>Au fait, petit easter egg, appuyez sur ce bouton pour activer le thème matrix sur ce site</p><button onclick="localStorage.setItem('colorscheme','matrix'); gettheme()">THEME MATRIX</button>
|
||||
</div>
|
||||
<div id="footer"></div>
|
||||
</body>
|
||||
</html>
|
278
main-site/bookmark.html
Normal file
278
main-site/bookmark.html
Normal file
|
@ -0,0 +1,278 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<title>Site Bookmarker</title>
|
||||
|
||||
<style>
|
||||
*{
|
||||
box-sizing: border-box;
|
||||
font-family: sans-serif;
|
||||
}
|
||||
body{
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
background-color: #333333;
|
||||
}
|
||||
a{
|
||||
text-decoration: none;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
/*Styling title*/
|
||||
h1{
|
||||
width: 100%;
|
||||
height: 80px;
|
||||
text-align: center;
|
||||
line-height: 80px;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
background-color: #47CF73;
|
||||
letter-spacing: 2px;
|
||||
word-spacing: 8px;
|
||||
color: #000;
|
||||
}
|
||||
h2{
|
||||
color: #47CF73;
|
||||
}
|
||||
.container{
|
||||
width: 600px;
|
||||
min-height: 150px;
|
||||
background-color: #333333;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
/*Styling form section*/
|
||||
.form{
|
||||
width: 100%;
|
||||
height: auto;
|
||||
background-color: #555555;
|
||||
padding: 40px 50px;
|
||||
margin: 20px 0;
|
||||
|
||||
}
|
||||
.input-field{
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
margin-bottom: 15px;
|
||||
}
|
||||
.input-field input[type="text"]{
|
||||
width: 250px;
|
||||
height: 25px;
|
||||
outline: none;
|
||||
border: none;
|
||||
background-color: transparent;
|
||||
border-bottom: 2px solid #47CF73;
|
||||
padding-left: 10px;
|
||||
color: #fff;
|
||||
}
|
||||
.input-field label{
|
||||
color: #47CF73;
|
||||
font-weight: bold;
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
.save_button{
|
||||
display: block;
|
||||
margin: 0 auto;
|
||||
border: none;
|
||||
width: 70px;
|
||||
height: 25px;
|
||||
background-color: #47CF73;
|
||||
color: #000;
|
||||
cursor: pointer;
|
||||
outline: none;
|
||||
}
|
||||
|
||||
/*Styling Bookmarks section*/
|
||||
.bookmarks{
|
||||
width: 100%;
|
||||
background-color: #555555;
|
||||
padding: 20px;
|
||||
}
|
||||
.bookmark{
|
||||
display: flex;
|
||||
align-items: center;
|
||||
width: 300px;
|
||||
height: 40px;
|
||||
padding: 5px 20px;
|
||||
background-color: #FAFAFA;
|
||||
margin-bottom: 10px;
|
||||
background-color: #333333;
|
||||
}
|
||||
.bookmark span{
|
||||
flex: 1;
|
||||
font-weight: bold;
|
||||
letter-spacing: 1.5px;
|
||||
color: #fff;
|
||||
}
|
||||
.bookmark .visit{
|
||||
width: 50px;
|
||||
height: 25px;
|
||||
line-height: 25px;
|
||||
text-align: center;
|
||||
background-color: #47CF73;
|
||||
color: #000;
|
||||
border-radius: 5px;
|
||||
margin: 0 5px;
|
||||
}
|
||||
.bookmark .delete{
|
||||
width: 60px;
|
||||
height: 25px;
|
||||
line-height: 25px;
|
||||
text-align: center;
|
||||
background-color: #F44336;
|
||||
border-radius: 5px;
|
||||
}
|
||||
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<h1>Site Bookmarker</h1>
|
||||
|
||||
<div class="container">
|
||||
<!-- form to enter details of site -->
|
||||
<form class="form" method=post action="#">
|
||||
<div class="input-field">
|
||||
<label for="site_name">Name</label>
|
||||
<input name="site_name" type="text"
|
||||
placeholder="site name">
|
||||
</div>
|
||||
|
||||
<div class="input-field">
|
||||
<label for="url">URL</label>
|
||||
<input name="url" type="text"
|
||||
placeholder="https://www.example.com">
|
||||
</div>
|
||||
|
||||
<button class="save_button">Save</button>
|
||||
</form>
|
||||
|
||||
<!-- section where bookmarks will be displayed -->
|
||||
<h2>Saved Bookmarks</h2>
|
||||
|
||||
<div class="bookmarks"></div>
|
||||
</div>
|
||||
|
||||
<!-- link the JavaScript file here -->
|
||||
<script>
|
||||
// Select the save button
|
||||
var button = document.querySelector(".save_button");
|
||||
|
||||
// Select the input box
|
||||
var siteName = document.querySelector("[name='site_name']");
|
||||
var url = document.querySelector("[name='url']");
|
||||
|
||||
// Select the <div> with class="bookmarks"
|
||||
var bookmarksSection = document.querySelector(".bookmarks");
|
||||
|
||||
// Hold bookmarks in local storage
|
||||
if(typeof(localStorage.bookmark) == "undefined"){
|
||||
localStorage.bookmark = "";
|
||||
}
|
||||
// listen for form submit
|
||||
|
||||
button.addEventListener("click", function(e){
|
||||
|
||||
// Prevent the page from reloading when submitting the form
|
||||
e.preventDefault();
|
||||
|
||||
let patterURL = /https?:\/\/(www\.)?[-a-zA-Z0-9@:%._\+~#=]{2,256}\.[a-z]{2,6}\b([-a-zA-Z0-9@:%_\+.~#?&//=]*)?/gi;
|
||||
|
||||
let arrayItems, check = false, adr, itemAdr;
|
||||
|
||||
// Validation of form and URL
|
||||
|
||||
if(siteName.value === ""){
|
||||
alert("you must fill the siteName input");
|
||||
} else if(url.value === ""){
|
||||
alert("you must fill the url input");
|
||||
} else if(!patterURL.test(url.value)){
|
||||
alert("you must enter a valid url");
|
||||
} else{
|
||||
|
||||
arrayItems = localStorage.bookmark.split(";");
|
||||
adr = url.value;
|
||||
adr = adr.replace(/http:\/\/|https:\/\//i, "");
|
||||
arrayItems.length--;
|
||||
|
||||
// Check if website is already bookmarked
|
||||
for(item of arrayItems){
|
||||
itemAdr = item.split(',')[1].replace(/http:\/\/|https:\/\//i,"");
|
||||
if(itemAdr == adr){
|
||||
check = true;
|
||||
}
|
||||
}
|
||||
|
||||
if(check == true){
|
||||
alert("This website is already bookmarked");
|
||||
}
|
||||
else{
|
||||
|
||||
// If all checks are correct,add bookmark to local storage
|
||||
localStorage.bookmark += `${siteName.value},${url.value};`;
|
||||
addBookmark(siteName.value, url.value);
|
||||
siteName.value = "";
|
||||
url.value = "";
|
||||
}
|
||||
}
|
||||
});
|
||||
// Function to add the bookmark
|
||||
|
||||
function addBookmark(name, url){
|
||||
let dataLink = url;
|
||||
|
||||
// After obtaining a bookmark, we display it in a div and add
|
||||
// a button to visit the link or to delete it
|
||||
if(!url.includes("http")){
|
||||
url = "//" + url;
|
||||
}
|
||||
let item = `<div class="bookmark">
|
||||
<span>${name}</span>
|
||||
<a class="visit" href="${url}" target="_blank"
|
||||
data-link='${dataLink}'>Visit</a>
|
||||
<a onclick="removeBookmark(this)"
|
||||
class="delete" href="#">delete</a>
|
||||
</div>`;
|
||||
bookmarksSection.innerHTML += item;
|
||||
}
|
||||
// function to render the saved bookmarks
|
||||
|
||||
(function fetchBoookmark(){
|
||||
if(typeof(localStorage.bookmark) != "undefined" && localStorage.bookmark !== ""){
|
||||
let arrayItems = localStorage.bookmark.split(";");
|
||||
arrayItems.length--;
|
||||
for(item of arrayItems){
|
||||
let itemSpli = item.split(',');
|
||||
addBookmark(itemSpli[0], itemSpli[1]);
|
||||
}
|
||||
}
|
||||
})();
|
||||
// Function to remove the bookmark
|
||||
|
||||
function removeBookmark(thisItem){
|
||||
let arrayItems = [],
|
||||
index,
|
||||
item = thisItem.parentNode,
|
||||
itemURL = item.querySelector(".visit").dataset.link,
|
||||
itemName = item.querySelector("span").innerHTML;
|
||||
arrayItems = localStorage.bookmark.split(";");
|
||||
|
||||
for(i in arrayItems){
|
||||
if(arrayItems[i] == `${itemName},${itemURL}`){
|
||||
index = i;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
//update the localStorage
|
||||
index = arrayItems.indexOf(`${itemName},${itemURL}`);
|
||||
arrayItems.splice(index,1);
|
||||
localStorage.bookmark = arrayItems.join(";");
|
||||
|
||||
//update the bookmark Section
|
||||
bookmarksSection.removeChild(item);
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
29
main-site/chat/client.html
Normal file
29
main-site/chat/client.html
Normal file
|
@ -0,0 +1,29 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="fr">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Chat App with Websocket</title>
|
||||
<style>
|
||||
.clientinfos{
|
||||
background-color: darkgrey;
|
||||
}
|
||||
.clientmessages{
|
||||
background-color: lightblue;
|
||||
border: 1px;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="clientinfos">
|
||||
<button id="connect">connect</button>
|
||||
</div>
|
||||
<div class=clientmessages id="clientmessages"></div>
|
||||
<div class="clientsend">
|
||||
<input type="text" id="messageinput">
|
||||
<button id="sendbutton">Send</button>
|
||||
</div>
|
||||
<script src="client.js"></script>
|
||||
</body>
|
||||
</html>
|
54
main-site/chat/client.js
Normal file
54
main-site/chat/client.js
Normal file
|
@ -0,0 +1,54 @@
|
|||
if (sessionStorage.getItem('serveraddr')==null){
|
||||
let addr = prompt('server address (ws or wss): ')
|
||||
const socket = new WebSocket(addr);
|
||||
sessionStorage.setItem('serveraddr',addr)
|
||||
}
|
||||
else if (sessionStorage.getItem('serveraddr')!=null){
|
||||
const socket = new WebSocket(sessionStorage.getItem('serveraddr'))
|
||||
}
|
||||
else{alert('error')}
|
||||
socket.addEventListener('message', function (event) {
|
||||
e=JSON.parse(event)
|
||||
for(let i = 0; i < length(e); i++){
|
||||
let m= e[i]
|
||||
let d = document.createElement('div')
|
||||
d.className = 'message'
|
||||
let u = document.createElement('div')
|
||||
u.innerText = m["username"]
|
||||
u.className= 'messageusername'
|
||||
let c = document.createElement('div')
|
||||
c.innerText = m["content"]
|
||||
c.className = 'messagecontent'
|
||||
let h = document.createElement('div')
|
||||
h.innerText= m['date']
|
||||
h.className = 'messagedate'
|
||||
d.appendChild(u)
|
||||
d.appendChild(c)
|
||||
d.appendChild(h)
|
||||
document.getElementById('clientmessages').appendChild(d)
|
||||
}
|
||||
});
|
||||
function sendtoserver(){
|
||||
let user = sessionStorage.getItem('username')
|
||||
if(user == null){alert('you have to be connected for send message, click on the "connect" button')}
|
||||
else{
|
||||
let message = document.getElementById('messageinput')
|
||||
let today = new Date();
|
||||
let date = today.getFullYear()+'-'+(today.getMonth()+1)+'-'+today.getDate();
|
||||
let time = today.getHours() + ":" + today.getMinutes() + ":" + today.getSeconds();
|
||||
let dateTime = date+' '+time;
|
||||
let tosend={
|
||||
'username': `${user}`,
|
||||
'content':`${message}`,
|
||||
'date': `${dateTime}`,
|
||||
}
|
||||
let strtosend = JSON.stringify(tosend)
|
||||
socket.send(strtosend)
|
||||
}
|
||||
}
|
||||
function toconnect(){
|
||||
let usrname = prompt('your username: ')
|
||||
sessionStorage.setItem('username',usrname)
|
||||
}
|
||||
document.getElementById('sendbutton').addEventListener('click',sendtoserver)
|
||||
document.getElementById('connect').addEventListener('click',toconnect)
|
38
main-site/chat/server.py
Normal file
38
main-site/chat/server.py
Normal file
|
@ -0,0 +1,38 @@
|
|||
"""
|
||||
message templates:
|
||||
{
|
||||
"name":username,
|
||||
"content":content,
|
||||
"date":date,
|
||||
}
|
||||
|
||||
|
||||
"""
|
||||
|
||||
|
||||
|
||||
import asyncio;
|
||||
import json;
|
||||
import websockets;
|
||||
|
||||
dataslist = []
|
||||
|
||||
async def handler(websocket, path):
|
||||
global dataslist
|
||||
data = await websocket.recv()
|
||||
try:
|
||||
data = json.dumps(data)
|
||||
except TypeError:
|
||||
await websocket.send('TypeError')
|
||||
await websocket.send(str(dataslist))
|
||||
dataslist.append(data)
|
||||
|
||||
|
||||
|
||||
start_server = websockets.serve(handler, "0.0.0.0", 8000)
|
||||
|
||||
|
||||
|
||||
asyncio.get_event_loop().run_until_complete(start_server)
|
||||
|
||||
asyncio.get_event_loop().run_forever()
|
62
main-site/contact.html
Normal file
62
main-site/contact.html
Normal file
|
@ -0,0 +1,62 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="fr">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<link rel="icon" href="//api.gzod01.fr/pictures/gzod01.ico">
|
||||
<link rel="stylesheet" href="//api.gzod01.fr/css/style.css">
|
||||
<script src="//api.gzod01.fr/scripts/main.js"></script>
|
||||
<title>Contact</title>
|
||||
</head>
|
||||
<body>
|
||||
<div id="header"></div>
|
||||
<div class=content>
|
||||
<b>Me contacter par mail grâce au formulaire de contact</b>
|
||||
<form onsubmit="sendmail()">
|
||||
<label for="name">Votre nom:</label><input type="text" name="name" id=name><br>
|
||||
<label for="email">Votre Email:</label><input type="email" name="email" id="email"><br>
|
||||
<label for="objet">Le sujet:</label><br>
|
||||
<select name="objet" id="objet">
|
||||
<option value="">--Choisissez une option--</option>
|
||||
<option value="infos">Demande d'infos</option>
|
||||
<option value="suggest">Suggestion</option>
|
||||
<option value="join"><abbr title="Si vous avez des compétences dans n'importe quel domaine et que vous voulez m'aider pour le site ou pour d'autres projets">Rejoindre</abbr></option>
|
||||
<option value="parrot"><abbr title="veuillez préciser au début du message">Autres</abbr></option>
|
||||
</select><br>
|
||||
<label for=messagecontent>Votre message:</label><div contenteditable style="color: black; border: solid black; background-color: white" id="messagecontent" name="messagecontent">Votre message ici</div><br>
|
||||
<button type="submit">Envoyer</button>
|
||||
</form>
|
||||
<script>
|
||||
function gid(id){
|
||||
return document.getElementById(id)
|
||||
}
|
||||
function sendmail(){
|
||||
let bodystr = `Nom: ${gid('name').value} \n Email: ${gid('email').value}\n------\n${gid('messagecontent').innerHTML}`
|
||||
let body = bodystr.replace('\n','<br>')
|
||||
open(`mailto:gzod01@gzod01.fr?subject=${encodeURIComponent(gid('objet').value)}&body=${encodeURIComponent(body)}`)
|
||||
}
|
||||
</script><br><br>
|
||||
<div name=line style="width:100%; border-bottom:solid 5px var(\-\-main-txt-color)"></div>
|
||||
Ou me contacter grâce à mes moyens de communication ou les plateformes sur lesquelles je suis:
|
||||
<a href="javascript:void(0)"title="GZod01">Steam</a> <a href="javascript:void(0)"title="G_Zod#1311">Discord</a> <a href="//github.com/gzod01/" title="GZod01">Github</a> <a href="//dsc.gg/cgms"title="Serveur Discord">Mon serveur discord</a> <a href="mailto:gzod01@gzod01.fr" title="gzod01@gzod01.fr">Mail</a>
|
||||
<!--<b>Ou me contacter grâce à cette boite de commentaire (les commentaires peuvent être laisser anonymement)</b>
|
||||
<div id="cusdis_thread"
|
||||
data-host="https://cusdis.com"
|
||||
B
|
||||
data-app-id="2197b528-be9f-462b-98dc-57ac47aef210"
|
||||
data-page-id="contact-form-mainsite"
|
||||
data-page-url="//gzod01.fr/contact"
|
||||
data-page-title="Me Contacter(MainSite)"
|
||||
data-theme='auto'
|
||||
></div>
|
||||
<script async defer src="https://cusdis.com/js/cusdis.es.js"></script>
|
||||
<script>let clschm = localStorage.getItem('colorscheme');
|
||||
if(clschm === 'light' || clschm ==='dark'){
|
||||
document.getElementById('cusdis_thread').setAttribute('data-theme',clschm)
|
||||
} else{
|
||||
document.getElementById('cusdis_thread').setAttribute('data-theme','auto')}</script>-->
|
||||
</div>
|
||||
<div id="footer"></div>
|
||||
</body>
|
||||
</html>
|
28
main-site/easy-contact.html
Normal file
28
main-site/easy-contact.html
Normal file
|
@ -0,0 +1,28 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="fr">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<link rel="icon" href="//api.gzod01.fr/pictures/gzod01.ico">
|
||||
<link rel="stylesheet" href="//api.gzod01.fr/css/style.css">
|
||||
<script src="//api.gzod01.fr/scripts/main.js"></script>
|
||||
<title>easy-contact.html</title>
|
||||
</head>
|
||||
<body>
|
||||
<div id="header"></div>
|
||||
<div class=content>
|
||||
Write your message here:
|
||||
|
||||
<div id="cusdis_thread"
|
||||
data-host="https://cusdis.com"
|
||||
data-app-id="2197b528-be9f-462b-98dc-57ac47aef210"
|
||||
data-page-id="{{ PAGE_ID }}"
|
||||
data-page-url="{{ PAGE_URL }}"
|
||||
data-page-title="{{ PAGE_TITLE }}"
|
||||
></div>
|
||||
<script async defer src="https://cusdis.com/js/cusdis.es.js"></script>
|
||||
</div>
|
||||
<div id="footer"></div>
|
||||
</body>
|
||||
</html>
|
23
main-site/error404.html
Normal file
23
main-site/error404.html
Normal file
|
@ -0,0 +1,23 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="fr">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<link rel="icon" href="//api.gzod01.fr/pictures/gzod01.ico">
|
||||
<link rel="stylesheet" href="//api.gzod01.fr/css/style.css">
|
||||
<script src="//api.gzod01.fr/scripts/main.js"></script>
|
||||
<title>404 Bad Request</title>
|
||||
</head>
|
||||
<body>
|
||||
<div id="header"></div>
|
||||
<div style="height:100%"class=content>
|
||||
<div class="fullcenteredparent">
|
||||
<div class=fullcentered>
|
||||
<h1>404 ERROR</h1>
|
||||
<h2>LA PAGE DEMANDÉE N'EXISTE PAS!</h2>
|
||||
</div></div>
|
||||
</div>
|
||||
<div id="footer"></div>
|
||||
</body>
|
||||
</html>
|
36
main-site/fractal/dashboard.html
Normal file
36
main-site/fractal/dashboard.html
Normal file
|
@ -0,0 +1,36 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="fr">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<link rel="stylesheet" href="fractaldashboard.css">
|
||||
<script src="fractaldashboard.js"></script>
|
||||
<title>Fractal Dashboard</title>
|
||||
</head>
|
||||
<body>
|
||||
<header>
|
||||
<div class=headerelement id=connectedas>Connected as
|
||||
<span id=playername>MYNAME</span><img id=playerprofile/><br>
|
||||
<span id="logout">logout</span>
|
||||
</div>
|
||||
</header>
|
||||
<div id="dashboardcontent">
|
||||
|
||||
</div>
|
||||
<br>
|
||||
<footer>
|
||||
<div class=footerleft>
|
||||
<a href="//discord.gg/cnBCTZ37nP">Join the Discord Server</a>
|
||||
<a href="javascript:void(0)" onclick="navigator.share({
|
||||
title: 'FRACTAL',
|
||||
text: 'Venez jouez avec moi à Fractal',
|
||||
url: 'https:/\/gzod01.fr/fractal/',
|
||||
})">Share the game</a>
|
||||
<!--<button class=langchoose id="french"></button><button class="langchoose" id="english"></button>-->
|
||||
</div>
|
||||
<div class="footerright">
|
||||
<a href="javascript:'Game In development'">Buy the game</a>
|
||||
</div>
|
||||
</footer>
|
||||
</body>
|
143
main-site/fractal/fractaldashboard.css
Normal file
143
main-site/fractal/fractaldashboard.css
Normal file
|
@ -0,0 +1,143 @@
|
|||
body {
|
||||
min-height: 100vh;
|
||||
margin: 0;
|
||||
word-break: break-word;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
background-color: darkslategrey;
|
||||
}
|
||||
.dash-full-box{
|
||||
display: grid; /*or BLOCK BUT GRID IS BEST...*/
|
||||
position: relative;
|
||||
border-radius: 10px;
|
||||
min-height: 50px;
|
||||
height: max-content;
|
||||
padding: 10px;
|
||||
text-align: center;
|
||||
}
|
||||
#green{
|
||||
background-color: limegreen;
|
||||
}
|
||||
#red{
|
||||
background-color: rgb(197, 23, 23);
|
||||
}
|
||||
#blue{
|
||||
background-color: slateblue;
|
||||
}
|
||||
#yellow{
|
||||
background-color: rgb(191, 191, 19);
|
||||
}
|
||||
#orange{
|
||||
background-color: darkorange;
|
||||
}
|
||||
#withdrawalbutton{
|
||||
display:table-row;
|
||||
height: 100px;
|
||||
width: 50%;
|
||||
color: white;
|
||||
background: repeating-linear-gradient(
|
||||
45deg,
|
||||
darkorange,
|
||||
darkorange 10px,
|
||||
red 10px,
|
||||
red 20px
|
||||
);
|
||||
}
|
||||
#withdrawalbutton:hover{
|
||||
background: repeating-linear-gradient(
|
||||
45deg,
|
||||
red,
|
||||
red 10px,
|
||||
darkorange 10px,
|
||||
darkorange 20px
|
||||
);
|
||||
}
|
||||
button{
|
||||
border-radius: 5px;
|
||||
padding: 5px;
|
||||
min-height: 10px;
|
||||
border: 0px;
|
||||
}
|
||||
.fullcentered{
|
||||
text-align:center;
|
||||
margin: 0;
|
||||
position: relative;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
-ms-transform: translate(-50%, -50%);
|
||||
transform: translate(-50%, -50%);
|
||||
}
|
||||
.dash-title{
|
||||
text-decoration: underline;
|
||||
font-size: large;
|
||||
font-weight: bold;
|
||||
}
|
||||
header{
|
||||
margin:0;
|
||||
background-color: slateblue;
|
||||
color: white;
|
||||
padding-bottom: 2px;
|
||||
overflow: hidden;
|
||||
}
|
||||
.headerelement{
|
||||
text-decoration: none;
|
||||
float:left;
|
||||
display:block;
|
||||
text-align:center;
|
||||
padding:14px 16px;
|
||||
font-size: 17px
|
||||
}
|
||||
#connectedas{
|
||||
float: right;
|
||||
}
|
||||
footer{
|
||||
padding-top: 5px;
|
||||
padding-bottom: 5px;
|
||||
margin-top: auto;
|
||||
display: flex ;
|
||||
text-align: center;
|
||||
width: 100%;
|
||||
left: 0;
|
||||
background-color:slateblue ;
|
||||
color: white;
|
||||
}
|
||||
footer *{
|
||||
text-decoration: none;
|
||||
display:block;
|
||||
text-align:center;
|
||||
padding:14px 16px;
|
||||
font-size: 17px;
|
||||
color: white;
|
||||
}
|
||||
footer a:hover{
|
||||
color: darkgray;
|
||||
}
|
||||
.footerleft{
|
||||
height: 100%;
|
||||
left:0;
|
||||
width:50%;
|
||||
}
|
||||
.footerright{
|
||||
height: 100%;
|
||||
right:0;
|
||||
width:50%
|
||||
}
|
||||
table, th, td{
|
||||
border:solid 2px black
|
||||
}
|
||||
table{
|
||||
width:100%
|
||||
}
|
||||
.tablecontainer{
|
||||
overflow: auto;
|
||||
max-height: 200px;
|
||||
}
|
||||
#logindiv{
|
||||
text-align:center;
|
||||
margin: 0;
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
-ms-transform: translate(-50%, -50%);
|
||||
transform: translate(-50%, -50%);
|
||||
}
|
197
main-site/fractal/fractaldashboard.js
Normal file
197
main-site/fractal/fractaldashboard.js
Normal file
|
@ -0,0 +1,197 @@
|
|||
const logindb = {
|
||||
loginplayer:[{username:'testuser',password:'testpwd'}]
|
||||
}
|
||||
var loginusername=''
|
||||
var loginpassword=''
|
||||
function addItemToMarketTable(item,price){
|
||||
let table = document.getElementById('balanceitems')
|
||||
let tr=document.createElement('tr')
|
||||
let tditem=document.createElement('td')
|
||||
tditem.innerHTML=item
|
||||
let tdprice=document.createElement('td')
|
||||
tdprice.innerHTML=price
|
||||
tr.appendChild(tditem)
|
||||
tr.appendChild(tdprice)
|
||||
table.appendChild(tr)
|
||||
}
|
||||
function addPlayerToLBTable(player,index){
|
||||
let table = document.getElementById('playerlb')
|
||||
let tr=document.createElement('tr')
|
||||
let tditem=document.createElement('td')
|
||||
tditem.innerHTML=player
|
||||
let tdindex=document.createElement('td')
|
||||
tdindex.innerHTML=index
|
||||
tr.appendChild(tditem)
|
||||
tr.appendChild(tdindex)
|
||||
table.appendChild(tr)
|
||||
}
|
||||
function addGuildToLBTable(guild,index){
|
||||
let table = document.getElementById('guildlb')
|
||||
let tr=document.createElement('tr')
|
||||
let tditem=document.createElement('td')
|
||||
tditem.innerHTML=guild
|
||||
let tdindex=document.createElement('td')
|
||||
tdindex.innerHTML=index
|
||||
tr.appendChild(tditem)
|
||||
tr.appendChild(tdindex)
|
||||
table.appendChild(tr)
|
||||
}
|
||||
function createDashBox(color,title=null){
|
||||
let dashBox = document.createElement('div')
|
||||
dashBox.className='dash-full-box'
|
||||
dashBox.id=color
|
||||
if(title!=null){
|
||||
let dashtitle = document.createElement('p')
|
||||
dashtitle.className='dash-title'
|
||||
dashtitle.innerText=title
|
||||
dashBox.appendChild(dashtitle)
|
||||
}
|
||||
document.getElementById('dashboardcontent').appendChild(dashBox)
|
||||
let br= document.createElement('br')
|
||||
document.getElementById('dashboardcontent').appendChild(br)
|
||||
return dashBox
|
||||
}
|
||||
function spawnBaseDashBox(){
|
||||
let wdmbox = createDashBox('red')
|
||||
wdmbox.innerHTML=`<div class=fullcentered>
|
||||
<button id="withdrawalbutton" name="withdrawalbutton">Immediate Withdrawal</button>
|
||||
</div>`
|
||||
let mobox = createDashBox('green','MONEY INFOS:')
|
||||
mobox.innerHTML = `
|
||||
<p><b>Your Current balance: </b><span id="playermoney">NODATA</span>$</p>
|
||||
<p><b>Current balance of your Guild: </b><span id=guildmoney>NODATA</span>$</p>`
|
||||
let markbox = createDashBox('yellow','TRADE INFOS:')
|
||||
markbox.innerHTML=`<b>Market price of items:</b>
|
||||
<div class="tablecontainer">
|
||||
<table >
|
||||
<thead>
|
||||
<th>
|
||||
Items:
|
||||
</th>
|
||||
<th>
|
||||
Price:
|
||||
</th>
|
||||
</thead>
|
||||
<tbody id="balanceitems">
|
||||
</tbody>
|
||||
</table>
|
||||
</div>`
|
||||
let lbbox = createDashBox('orange','LEADERBOARD:')
|
||||
lbbox.innerHTML=`<div class="tablecontainer">
|
||||
<table>
|
||||
<thead>
|
||||
<th>
|
||||
Player:
|
||||
</th>
|
||||
<th>
|
||||
Place:
|
||||
</th>
|
||||
</thead>
|
||||
<tbody id="playerlb">
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="tablecontainer">
|
||||
<table>
|
||||
<thead>
|
||||
<th>
|
||||
Guild:
|
||||
</th>
|
||||
<th>
|
||||
Place:
|
||||
</th>
|
||||
</thead>
|
||||
<tbody id="guildlb">
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
`
|
||||
|
||||
}
|
||||
function loadscript(){
|
||||
createauth()
|
||||
}
|
||||
window.onload=loadscript
|
||||
function startscript(){
|
||||
if(auth(loginusername,loginpassword)){
|
||||
mainscript(loginusername,loginpassword)
|
||||
}
|
||||
}
|
||||
function mainscript(username,password){
|
||||
spawnBaseDashBox()
|
||||
showGameDatas(username,password)
|
||||
}
|
||||
function createauth(){
|
||||
document.getElementById('dashboardcontent').innerHTML=`<div id=logindiv id=logindiv><div id=loginindic style="background-color:red; color:white"></div><input type=text id=loginusername placeholder="Your UserName"><br><input type=password id=loginpassword placeholder="Your PassWord"><br><button onclick="loginsubmit()">Se connecter</button></div>`
|
||||
}
|
||||
function loginsubmit(){
|
||||
loginusername = document.getElementById('loginusername').value
|
||||
loginpassword = document.getElementById('loginpassword').value
|
||||
startscript()
|
||||
}
|
||||
function auth(username,password){
|
||||
if(checkauth(username,password)){
|
||||
document.getElementById('logindiv').remove()
|
||||
return true
|
||||
}
|
||||
else{
|
||||
document.getElementById('loginindic').innerHTML='Bad Password or Username'
|
||||
return false
|
||||
}
|
||||
}
|
||||
function checkauth(username, password){
|
||||
const [check, index] = checkusername(username)
|
||||
if(check){
|
||||
if(logindb.loginplayer[index].password===password){
|
||||
return true
|
||||
}
|
||||
}
|
||||
return false
|
||||
}
|
||||
function checkusername(username){
|
||||
for(let i=0; i<logindb.loginplayer.length;i++){
|
||||
if(username===logindb.loginplayer[i].username){
|
||||
return [true , i]
|
||||
}
|
||||
}
|
||||
return [false , null]
|
||||
}
|
||||
|
||||
function fetchGameDatas(username,password){
|
||||
//fetch: return this normally
|
||||
let gamedatas = {
|
||||
playermoney:999999,
|
||||
guildmoney:999999999999,
|
||||
itemprice:[['Uranium',299],['EpicRubadium',599],['SuperExoticalFractalium',99999],['Iron',50],['Wood',20],['Steak',10],['Apple',5]],
|
||||
playerlb:['TheBestUser','TheSecondUser','ThethirdUser','hello','world','how','are','you','men'],
|
||||
guildlb:['BestGuild','SecondGuild','ThirdGuild','vote','for','the','best','guild','that','is','adminGuild!!!'],
|
||||
playerusername:'testuser',
|
||||
playerpicture:'https://cdn.discordapp.com/avatars/917123777488384021/d3a5dbeb89d98da26f30b061156e6868.webp?size=128'
|
||||
}
|
||||
return gamedatas //else if error return null
|
||||
}
|
||||
function showGameDatas(username,password){
|
||||
let gamedatas = fetchGameDatas(username,password)
|
||||
if(gamedatas!=null){
|
||||
gid('playermoney').innerHTML=gamedatas.playermoney
|
||||
gid('guildmoney').innerHTML=gamedatas.guildmoney
|
||||
for(let i =0; i< gamedatas.itemprice.length;i++){
|
||||
addItemToMarketTable(gamedatas.itemprice[i][0],gamedatas.itemprice[i][1])
|
||||
}
|
||||
for(let i=0;i<gamedatas.guildlb.length;i++){
|
||||
addGuildToLBTable(gamedatas.guildlb[i],i)
|
||||
}
|
||||
for(let i = 0; i<gamedatas.playerlb.length;i++){
|
||||
addPlayerToLBTable(gamedatas.playerlb[i],i)
|
||||
}
|
||||
gid('playername').innerHTML=gamedatas.playerusername
|
||||
gid('playerpicture').src=gamedatas.playerpicture
|
||||
}
|
||||
}
|
||||
function gid(id){
|
||||
return document.getElementById(id)
|
||||
}
|
||||
function withdrawal(){
|
||||
alert('Order Send, you\'re troops back home to your base')
|
||||
}
|
||||
document.getElementById('withdrawalbutton').addEventListener('click',withdrawal)
|
21
main-site/fractal/index.html
Normal file
21
main-site/fractal/index.html
Normal file
|
@ -0,0 +1,21 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="fr">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<link rel="icon" href="//api.gzod01.fr/pictures/gzod01.ico">
|
||||
<link rel="stylesheet" href="//api.gzod01.fr/css/style.css">
|
||||
<script src="//api.gzod01.fr/scripts/main.js"></script>
|
||||
<title>fractal/index.html</title>
|
||||
</head>
|
||||
<body>
|
||||
<div id="header"></div>
|
||||
<div class=content>
|
||||
<div class=fullcentered>
|
||||
<a href="dashboard">Go to your dashboard (you need to create an account and a base in the game before)</a>
|
||||
</div>
|
||||
</div>
|
||||
<div id="footer"></div>
|
||||
</body>
|
||||
</html>
|
100
main-site/fullsitemaptree.html
Normal file
100
main-site/fullsitemaptree.html
Normal file
|
@ -0,0 +1,100 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<meta name="Author" content="Made by 'tree'">
|
||||
<meta name="GENERATOR" content="$Version: $ tree v1.8.0 (c) 1996 - 2018 by Steve Baker, Thomas Moore, Francesc Rocher, Florian Sesser, Kyosuke Tokoro $">
|
||||
<title>GZOD01</title>
|
||||
<style type="text/css">
|
||||
<!--
|
||||
BODY { font-family : ariel, monospace, sans-serif; }
|
||||
P { font-weight: normal; font-family : ariel, monospace, sans-serif; color: black; background-color: transparent;}
|
||||
B { font-weight: normal; color: black; background-color: transparent;}
|
||||
A:visited { font-weight : normal; text-decoration : none; background-color : transparent; margin : 0px 0px 0px 0px; padding : 0px 0px 0px 0px; display: inline; }
|
||||
A:link { font-weight : normal; text-decoration : none; margin : 0px 0px 0px 0px; padding : 0px 0px 0px 0px; display: inline; }
|
||||
A:hover { color : #000000; font-weight : normal; text-decoration : underline; background-color : yellow; margin : 0px 0px 0px 0px; padding : 0px 0px 0px 0px; display: inline; }
|
||||
A:active { color : #000000; font-weight: normal; background-color : transparent; margin : 0px 0px 0px 0px; padding : 0px 0px 0px 0px; display: inline; }
|
||||
.VERSION { font-size: small; font-family : arial, sans-serif; }
|
||||
.NORM { color: black; background-color: transparent;}
|
||||
.FIFO { color: purple; background-color: transparent;}
|
||||
.CHAR { color: yellow; background-color: transparent;}
|
||||
.DIR { color: blue; background-color: transparent;}
|
||||
.BLOCK { color: yellow; background-color: transparent;}
|
||||
.LINK { color: aqua; background-color: transparent;}
|
||||
.SOCK { color: fuchsia;background-color: transparent;}
|
||||
.EXEC { color: green; background-color: transparent;}
|
||||
-->
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<h1>GZOD01</h1><p>
|
||||
<a href="//gzod01.fr/">//gzod01.fr/</a><br>
|
||||
<a href="//gzod01.fr//about.html">about.html</a><br>
|
||||
<a href="//gzod01.fr//bookmark.html">bookmark.html</a><br>
|
||||
<a href="//gzod01.fr//chat/">chat</a><br>
|
||||
<a href="//gzod01.fr//chat/client.html">client.html</a><br>
|
||||
<a href="//gzod01.fr//chat/client.js">client.js</a><br>
|
||||
<a href="//gzod01.fr//chat/server.py">server.py</a><br>
|
||||
<a href="//gzod01.fr//contact.html">contact.html</a><br>
|
||||
<a href="//gzod01.fr//CyberTermHack/">CyberTermHack</a><br>
|
||||
<a href="//gzod01.fr//CyberTermHack/api.html">api.html</a><br>
|
||||
<a href="//gzod01.fr//CyberTermHack/Commented_Code/">Commented_Code</a><br>
|
||||
<a href="//gzod01.fr//CyberTermHack/Commented_Code/COMMENTED_CODE/">COMMENTED_CODE</a><br>
|
||||
<a href="//gzod01.fr//CyberTermHack/Commented_Code/COMMENTED_CODE/CyberTermHackjsorganized2.js">CyberTermHackjsorganized2.js</a><br>
|
||||
<a href="//gzod01.fr//CyberTermHack/Commented_Code/COMMENTED_CODE/CyberTermHackjsorganized.js">CyberTermHackjsorganized.js</a><br>
|
||||
<a href="//gzod01.fr//CyberTermHack/CONSOLE/">CONSOLE</a><br>
|
||||
<a href="//gzod01.fr//CyberTermHack/CONSOLE/console.html">console.html</a><br>
|
||||
<a href="//gzod01.fr//CyberTermHack/CONSOLE/console.js">console.js</a><br>
|
||||
<a href="//gzod01.fr//CyberTermHack/index.html">index.html</a><br>
|
||||
<a href="//gzod01.fr//CyberTermHack/V0.1/">V0.1</a><br>
|
||||
<a href="//gzod01.fr//CyberTermHack/V0.1/index.html">index.html</a><br>
|
||||
<a href="//gzod01.fr//CyberTermHack/V0.1/jsversion.js">jsversion.js</a><br>
|
||||
<a href="//gzod01.fr//CyberTermHack/V0.1/js-web-CyberTermHack.html">js-web-CyberTermHack.html</a><br>
|
||||
<a href="//gzod01.fr//CyberTermHack/V0.1/otherjsversion.js">otherjsversion.js</a><br>
|
||||
<a href="//gzod01.fr//CyberTermHack/V0.1/py-curses-CyberTermHack.py">py-curses-CyberTermHack.py</a><br>
|
||||
<a href="//gzod01.fr//CyberTermHack/V0.1/py-term-CyberTermHack.py">py-term-CyberTermHack.py</a><br>
|
||||
<a href="//gzod01.fr//CyberTermHack/V0.1.2:OPTIMIZED/">V0.1.2:OPTIMIZED</a><br>
|
||||
<a href="//gzod01.fr//CyberTermHack/V0.1.2:OPTIMIZED/index.html">index.html</a><br>
|
||||
<a href="//gzod01.fr//CyberTermHack/V0.1.2:OPTIMIZED/maincode.js">maincode.js</a><br>
|
||||
<a href="//gzod01.fr//CyberTermHack/V0.2/">V0.2</a><br>
|
||||
<a href="//gzod01.fr//CyberTermHack/V0.2/devlog.txt">devlog.txt</a><br>
|
||||
<a href="//gzod01.fr//CyberTermHack/V0.2/index.html">index.html</a><br>
|
||||
<a href="//gzod01.fr//CyberTermHack/V0.2/maincode.js">maincode.js</a><br>
|
||||
<a href="//gzod01.fr//easy-contact.html">easy-contact.html</a><br>
|
||||
<a href="//gzod01.fr//error404.html">error404.html</a><br>
|
||||
<a href="//gzod01.fr//fullsitemap.html">fullsitemap.html</a><br>
|
||||
<a href="//gzod01.fr//games.html">games.html</a><br>
|
||||
<a href="//gzod01.fr//index.html">index.html</a><br>
|
||||
<a href="//gzod01.fr//index-with-iframes.html">index-with-iframes.html</a><br>
|
||||
<a href="//gzod01.fr//legal.html">legal.html</a><br>
|
||||
<a href="//gzod01.fr//page-builder.html">page-builder.html</a><br>
|
||||
<a href="//gzod01.fr//projects.html">projects.html</a><br>
|
||||
<a href="//gzod01.fr//search.html">search.html</a><br>
|
||||
<a href="//gzod01.fr//services.html">services.html</a><br>
|
||||
<a href="//gzod01.fr//sitemap.html">sitemap.html</a><br>
|
||||
<a href="//gzod01.fr//sitemap.json">sitemap.json</a><br>
|
||||
<a href="//gzod01.fr//sitemap.xml">sitemap.xml</a><br>
|
||||
<a href="//gzod01.fr//testofsitemap.html">testofsitemap.html</a><br>
|
||||
<a href="//gzod01.fr//time.html">time.html</a><br>
|
||||
<a href="//gzod01.fr//uscpm/">uscpm</a><br>
|
||||
<a href="//gzod01.fr//uscpm/about.html">about.html</a><br>
|
||||
<a href="//gzod01.fr//uscpm/alpha-neostyle-uscpm.html">alpha-neostyle-uscpm.html</a><br>
|
||||
<a href="//gzod01.fr//uscpm/beta.html">beta.html</a><br>
|
||||
<a href="//gzod01.fr//uscpm/hashchars.json">hashchars.json</a><br>
|
||||
<a href="//gzod01.fr//uscpm/index.html">index.html</a><br>
|
||||
<a href="//gzod01.fr//uscpm/play.bat">play.bat</a><br>
|
||||
<a href="//gzod01.fr//uscpm/texttoshare.html">texttoshare.html</a><br>
|
||||
<br><br>
|
||||
</p>
|
||||
<p>
|
||||
<br><br>
|
||||
</p>
|
||||
<hr>
|
||||
<p class="VERSION">
|
||||
tree v1.8.0 © 1996 - 2018 by Steve Baker and Thomas Moore <br>
|
||||
HTML output hacked and copyleft © 1998 by Francesc Rocher <br>
|
||||
JSON output hacked and copyleft © 2014 by Florian Sesser <br>
|
||||
Charsets / OS/2 support © 2001 by Kyosuke Tokoro
|
||||
</p>
|
||||
</body>
|
||||
</html>
|
44
main-site/games.html
Normal file
44
main-site/games.html
Normal file
|
@ -0,0 +1,44 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="fr">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<link rel="icon" href="//api.gzod01.fr/pictures/gzod01.ico">
|
||||
<link rel="stylesheet" href="//api.gzod01.fr/css/style.css">
|
||||
<script src="//api.gzod01.fr/scripts/main.js"></script>
|
||||
<title>Jeux</title>
|
||||
</head>
|
||||
<body>
|
||||
<div id="header"></div>
|
||||
<div class=content>
|
||||
Dans la liste suivante de jeu, seule ceux pour lesquels je le précise n'ont pas été créé par moi (ex: USCPM) tous les autres ont été créé par moi... <br><br>
|
||||
<a href="/uscpm">USCPM</a>: USCPM est une version améliorée du jeu SuperChronoPortalMaker (fait par Maxime Euzière et Anders Kaare pour les JS13K (deux personnes que je ne connais absolument pas mais leur jeu est sympa et, avec des compétences en JS, facile à modifier)), USCPM a quelques fonctionnalités qui le rendent différent du jeu original. (Par conséquent ce n'est pas moi qui ai créé l'original du jeu)
|
||||
<br>
|
||||
<a href="/CyberTermHack/">CyberTermHack</a> : CyberTermHack est un jeu que j'ai créé (contrairement à USCPM), l'interface
|
||||
de ce jeu et de type terminal (meme la version WEB), vous jouez un hacker et... amusez vous a hacker (bien evidemment, ce jeu ne met pas en scène des vrais techniques de piratage... ce serait bien trop dangereux...)
|
||||
<br>
|
||||
<a href="//blog.gzod01.fr/posts/subaqualien-explorer-arrive">SubAquAlien Explorer (Article du Blog expliquant comment le télécharger)</a>: SubAquAlien Explorer est un jeu que j'ai créé dans lequel vous incarnez un alien explorant le monde subaquatique
|
||||
d'une planète alien, faites attention aux ennemis...
|
||||
<br>
|
||||
<a href="https://github.com/GZod01/NoEndSpaceRunner/releases/">NoEnd Space Runner</a> A new endless runner in the space
|
||||
</div>
|
||||
<div id="remark42"></div>
|
||||
<script>!function(e,n){for(var o=0;o<e.length;o++){var r=n.createElement("script"),c=".js",d=n.head||n.body;"noModule"in r?(r.type="module",c=".mjs"):r.async=!0,r.defer=!0,r.src=remark_config.host+"/web/"+e[o]+c,d.appendChild(r)}}(remark_config.components||["embed"],document);</script>
|
||||
<script>
|
||||
var remark_config = {
|
||||
host: 'https://api.gzod01.fr/remark42',
|
||||
site_id: 'GZod01-main-games',
|
||||
components: ['embed', 'last-comments']
|
||||
max_shown_comments: 100,
|
||||
theme: 'dark',
|
||||
page_title: 'Games',
|
||||
locale: 'fr',
|
||||
show_email_subscription: true,
|
||||
simple_view: true,
|
||||
no_footer: false
|
||||
}
|
||||
</script>
|
||||
<div id="footer"></div>
|
||||
</body>
|
||||
</html>
|
29
main-site/games.html.save
Normal file
29
main-site/games.html.save
Normal file
|
@ -0,0 +1,29 @@
|
|||
CTYPE html>
|
||||
<html lang="fr">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<link rel="icon" href="//api.gzod01.fr/pictures/gzod01.ico">
|
||||
<link rel="stylesheet" href="//api.gzod01.fr/css/style.css">
|
||||
<script src="//api.gzod01.fr/scripts/main.js"></script>
|
||||
<title>Jeux</title>
|
||||
</head>
|
||||
<body>
|
||||
<div id="header"></div>
|
||||
<div class=content>
|
||||
Dans la liste suivante de jeu, seule ceux pour lesquels je le précise n'ont pas été créé par moi (ex: USCPM) tous les autres ont été créé par moi... <br><br>
|
||||
<a href="/uscpm">USCPM</a>: USCPM est une version améliorée du jeu SuperChronoPortalMaker (fait par Maxime Euzière et Anders Kaare pour les JS13K (deux personnes que je ne connais absolument pas mais leur jeu est sympa et, avec des compétences en JS, facile à modifier)), USCPM a quelques fonctionnalités qui le rendent différent du jeu original. (Par conséquent ce n'est pas moi qui ai créé l'original du jeu)
|
||||
<br>
|
||||
<a href="/CyberTermHack/">CyberTermHack</a> : CyberTermHack est un jeu que j'ai créé (contrairement à USCPM), l'interface
|
||||
de ce jeu et de type terminal (meme la version WEB), vous jouez un hacker et... amusez vous a hacker (bien evidemment, ce jeu ne met pas en scène des vrais techniques de piratage... ce serait bien trop dangereux...)
|
||||
<br>
|
||||
<a href="//blog.gzod01.fr/posts/subaqualien-explorer-arrive">SubAquAlien Explorer (Article du Blog expliquant comment le télécharger)</a>: SubAquAlien Explorer est un jeu que j'ai créé dans lequel vous incarnez un alien explorant le monde subaquatique
|
||||
d'une planète alien, faites attention aux ennemis...
|
||||
<br>
|
||||
<a href="https://github.com/GZod01/NoEndSpaceRunner/releases/">NoEnd Space Runner</a> A new endless runner in the space
|
||||
</div>
|
||||
<div id="footer"></div>
|
||||
</body>
|
||||
</html>
|
||||
|
50
main-site/index-with-iframes.html
Normal file
50
main-site/index-with-iframes.html
Normal file
|
@ -0,0 +1,50 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="fr">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<link rel="icon" href="//api.gzod01.fr/pictures/gzod01.ico">
|
||||
<link rel="stylesheet" href="//api.gzod01.fr/css/style.css">
|
||||
<script src="//api.gzod01.fr/scripts/main.js"></script>
|
||||
<title>GZod01</title>
|
||||
</head>
|
||||
<body>
|
||||
<div id="header"></div>
|
||||
<div class="content">
|
||||
<script>
|
||||
function changeframe(){
|
||||
let framelist = document.querySelectorAll('iframe')
|
||||
for(let i= 0; i<framelist.length; i++){
|
||||
let cframe = framelist[i]
|
||||
cframe.contentWindow.document.querySelector('header').remove()
|
||||
cframe.contentWindow.document.querySelector('footer').remove()
|
||||
cframe.width = innerWidth
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<noscript>Si vous voyez ce message votre navigateur ne supporte pas JAVASCRIPT ou celui ci n'est pas installé sur votre ordinateur, veuillez installer Javascript (beaucoup de fonctionallitées de ce site nécessitent javascript)</noscript>
|
||||
<h1><b>Bienvenue sur le site de GZod01!</b></h1>
|
||||
<p>Sur ce site vous pouvez trouver (pages principales, memes liens que dans la barre de navigation dans les headers et footers):</p>
|
||||
<div id=tellforframe><button onclick="document.getElementById('iframesdiv').hidden = !document.getElementById('iframesdiv').hidden">Afficher/Masquer les Iframes</button></div>
|
||||
<div id=iframesdiv hidden>
|
||||
<h2><a href="/games">Des Jeux</a></h2>
|
||||
<iframe src="/games">si vous voyez ce message, votre navigateur ne supporte pas les frames... c'est triste</iframe>
|
||||
<h2><a href="/services">Des Services</a></h2>
|
||||
<iframe src="/services">si vous voyez ce message, votre navigateur ne supporte pas les frames... c'est triste</iframe>
|
||||
<h2><a href="/projects">Mes Projets</a></h2>
|
||||
<iframe src="/projects">si vous voyez ce message, votre navigateur ne supporte pas les frames... c'est triste</iframe>
|
||||
<h2><a href="/contact">Me Contacter</a></h2>
|
||||
<iframe src="/contact" height="300">si vous voyez ce message, votre navigateur ne supporte pas les frames... c'est triste</iframe>
|
||||
<h2><a href="/sitemap">Le Plan Du Site</a></h2>
|
||||
<iframe src="/sitemap">si vous voyez ce message, votre navigateur ne supporte pas les frames... c'est triste</iframe>
|
||||
<h2><a href="/about">Des informations sur ce site et sur moi</a></h2>
|
||||
<iframe src="/about">si vous voyez ce message, votre navigateur ne supporte pas les frames... c'est triste</iframe>
|
||||
<h2><a href="/legal">Les Mentions Légales</a></h2>
|
||||
<iframe src="/legal">si vous voyez ce message, votre navigateur ne supporte pas les frames... c'est triste</iframe>
|
||||
</div>
|
||||
<script>window.onload = function(){changeframe(); mainscript()}</script>
|
||||
</div>
|
||||
<div id="footer"></div>
|
||||
</body>
|
||||
</html>
|
31
main-site/index.html
Normal file
31
main-site/index.html
Normal file
|
@ -0,0 +1,31 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="fr">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta name="google-site-verification" content="M5WSsDz4u-8XDQV4EnuSIT0mZsqPIuwOmf5M-JglNTc" />
|
||||
<link rel="icon" href="//api.gzod01.fr/pictures/gzod01.ico">
|
||||
<link rel="stylesheet" href="//api.gzod01.fr/css/style.css">
|
||||
<script src="//api.gzod01.fr/scripts/main.js"></script>
|
||||
<title>GZod01</title>
|
||||
</head>
|
||||
<body>
|
||||
<div id="header"></div>
|
||||
<div class="content">
|
||||
<noscript>Si vous voyez ce message votre navigateur ne supporte pas JAVASCRIPT ou celui ci n'est pas installé sur votre ordinateur, veuillez installer Javascript (beaucoup de fonctionallitées de ce site nécessitent javascript)</noscript>
|
||||
<h1><b>Bienvenue sur le site de GZod01!</b></h1>
|
||||
<p>Sur ce site vous pouvez trouver (pages principales, memes liens que dans la barre de navigation dans les headers et footers):</p>
|
||||
<h2><a href="/games">Des Jeux</a></h2>
|
||||
<h2><a href="/services">Des Services</a></h2>
|
||||
<h2><a href="/projects">Mes Projets</a></h2>
|
||||
<h2><a href="/contact">Me Contacter</a></h2>
|
||||
<h2><a href="/sitemap">Le Plan Du Site</a></h2>
|
||||
<h2><a href="/about">Des informations sur ce site et sur moi</a></h2>
|
||||
<h2><a href="/legal">Les Mentions Légales</a></h2>
|
||||
<a href="/index-with-iframes">Page d'accueil avec Iframes (chargement plus long)</a>
|
||||
<a href="/fullsitemaptree" hidden>FullSiteMap</a>
|
||||
</div>
|
||||
<div id="footer"></div>
|
||||
</body>
|
||||
</html>
|
41
main-site/legal.html
Normal file
41
main-site/legal.html
Normal file
|
@ -0,0 +1,41 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="fr">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<link rel="icon" href="//api.gzod01.fr/pictures/gzod01.ico">
|
||||
<link rel="stylesheet" href="//api.gzod01.fr/css/style.css">
|
||||
<script src="//api.gzod01.fr/scripts/main.js"></script>
|
||||
<title>Mentions Légales</title>
|
||||
</head>
|
||||
<body>
|
||||
<div id="header"></div>
|
||||
<div class=content>
|
||||
<h1>Mentions Légales</h1>
|
||||
<h2>Responsable du Site</h2>
|
||||
<p>Ce site appartient à GZod01, il est géré, créé, codé et hébérgé par GZod01</p>
|
||||
<br>
|
||||
<h1>Politique de Confidentialité</h1>
|
||||
<h2>Utilisation des Cookies</h2>
|
||||
<p>Les seuls cookies utilisés par ce site sont pour le bon fonctionnement de celui-ci (theme de couleur, données des jeux pour les sauvegardes)</p>
|
||||
<button onclick="let x= prompt('êtes vous sure de vouloir effacer le localStorage de ce site? écrivez OUI (en majuscule) pour effacer'); if(x==='OUI'){localStorage.clear(); console.warn('localStorageCleared')}">Effacer les cookies</button><b> (attention dangereux si vous avez fait des sauvegardes dans un des jeux sur ce site vous risquez de les perdre pour toujours (ça fait beaucoup de temps))</b>
|
||||
<p>Tous les cookies présent sur ce site restent sur votre ordinateur, aucun cookies n'est envoyé a des services tiers.</p>
|
||||
<p>Les cookies ne sont donc a aucun moment récoltés par un quelconque serveur</p>
|
||||
|
||||
</div>
|
||||
<div id="footer"></div>
|
||||
</body>
|
||||
</html>
|
||||
<!--
|
||||
just a function i want to keep to get my ip:
|
||||
<script>
|
||||
function text(url) {
|
||||
return fetch(url).then(res => res.text());
|
||||
}
|
||||
|
||||
text('https://www.cloudflare.com/cdn-cgi/trace').then(data => {
|
||||
console.log(data)
|
||||
});
|
||||
</script>
|
||||
-->
|
21
main-site/owner.html
Normal file
21
main-site/owner.html
Normal file
|
@ -0,0 +1,21 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="fr">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<link rel="icon" href="//api.gzod01.fr/pictures/gzod01.ico">
|
||||
<link rel="stylesheet" href="//api.gzod01.fr/css/style.css">
|
||||
<script src="//api.gzod01.fr/scripts/main.js"></script>
|
||||
<title>owner.html</title>
|
||||
</head>
|
||||
<body>
|
||||
<div id="header"></div>
|
||||
<div class=content>
|
||||
<p>Ce site est la propriété de GZod01</p>
|
||||
<p>alias Aurélien Sézille</p>
|
||||
<p>Copyright © 2023</p>
|
||||
</div>
|
||||
<div id="footer"></div>
|
||||
</body>
|
||||
</html>
|
66
main-site/page-builder.html
Normal file
66
main-site/page-builder.html
Normal file
|
@ -0,0 +1,66 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="fr">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<link rel="icon" href="//api.gzod01.fr/pictures/gzod01.ico">
|
||||
<link rel="stylesheet" href="//api.gzod01.fr/css/style.css">
|
||||
<script src="//api.gzod01.fr/scripts/main.js"></script>
|
||||
<title>Host Your Pages</title>
|
||||
</head>
|
||||
<body>
|
||||
<div id="header"></div>
|
||||
<div class=content>
|
||||
<div class=fullcentered>Page déplacée vers <a href="//host.gzod01.fr">host.gzod01.fr</a></div>
|
||||
<!--
|
||||
<script>
|
||||
function send(sendvalue){
|
||||
document.body.innerHTML = `
|
||||
<h1>You need to send this to mee: (copy and paste to mail or other)</h1>
|
||||
<code style="border: 2px dotted;">
|
||||
<p>Hello, my usrname is ${username.value}, i want to host html page, this is the code:</p>
|
||||
<p>${sendvalue}</p>
|
||||
</code>
|
||||
If you want to learn html you can see the w3schools course about html or i maybe will create a page with course to learn html
|
||||
`}
|
||||
function send_to_gzod01(){
|
||||
if(checkbegin.value){
|
||||
let htmltosend = `
|
||||
<head>
|
||||
<title>${title.value}</title>
|
||||
</head>
|
||||
<h1>${h1.value}</h1>
|
||||
<p>My name is ${user.value}</p>
|
||||
<p>${content.value}</p>
|
||||
`
|
||||
send(htmltosend)
|
||||
}
|
||||
else if(checkdev.value){
|
||||
send(JSON.stringify(html_content.innerHTML))
|
||||
}
|
||||
else{ indicator.innerHTML = 'SORRY, you don\'t have check any checkbox you need to check one checkbox'}
|
||||
}
|
||||
</script>
|
||||
<h1>Host page on my site</h1>
|
||||
<h1 id=indicator>INDICATOR</h1>
|
||||
<p>You want to learn html, js etc., perform your skill in html or share page with the world? so you need an host... this is your index page builder (and message builder to ask me for creating your page... (TODO: FTP for pages or create php code that create files....)</p>
|
||||
<label>SO if you are beginner in html you will need this form to create your page:</label>
|
||||
<div>
|
||||
<input type=checkbox id=checkbegin name=checkbegin><label for=checkbegin>I'm a beginner</label>
|
||||
<input type=text id=title placeholder=title>
|
||||
<input type=text id=user placeholder=user>
|
||||
<input type=text id=h1 placeholder="title to show on your page">
|
||||
<textarea id=content>Your text here...</textarea>
|
||||
</div>
|
||||
<label>Else if you have good skill in html you can create (or paste) your code in this textarea (this is no VSCODE or any other IDE so there is no color on keywords</label>
|
||||
<div>
|
||||
<input type=checkbox id=checkdev name=checkdev><label for=checkdev>I'm not a beginner</label>
|
||||
<textarea id=html_content>YOUR HTML CODE</textarea>
|
||||
</div>
|
||||
<input type=text id=username placeholder="your username here please...">
|
||||
<button onclick="send_to_gzod01()">Click here if you have finish</button>-->
|
||||
</div>
|
||||
<div id="footer"></div>
|
||||
</body>
|
||||
</html>
|
49
main-site/projects.html
Normal file
49
main-site/projects.html
Normal file
|
@ -0,0 +1,49 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="fr">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<link rel="icon" href="//api.gzod01.fr/pictures/gzod01.ico">
|
||||
<link rel="stylesheet" href="//api.gzod01.fr/css/style.css">
|
||||
<script src="//api.gzod01.fr/scripts/main.js"></script>
|
||||
<title>Projets</title>
|
||||
</head>
|
||||
<body>
|
||||
<div id="header"></div>
|
||||
<div class=content>
|
||||
<h1>Mes Projets</h1>
|
||||
<p>La plupart de mes projets sont disponibles sur <a href="//github.com/gzod01">mon gitub</a> en regardant la <a href="https://github.com/GZod01?tab=repositories">la liste de mes repositories</a></p>
|
||||
<p>Tous les jeux ci dessous sont accessibles ou téléchargeables depuis l'onglet jeux (sauf jeux "EN DEVELOPPEMENT...")</p>
|
||||
<h2>Vous avez un projet?</h2>
|
||||
Vous avez un projet? N'hésitez pas à me contacter: <a href="/contact">ICI</a>
|
||||
<h2>Mes Projets actuels</h2>
|
||||
<dl>
|
||||
<dt>Fractal:</dt><dd>Un jeu de stratégie économique en temps réel basé sur les joueurs.<b>EN DEVELOPPEMENT...</b></dd>
|
||||
<dt>Spaconium:</dt><dd>Un mod minecraft multifonction rajoutant des minerais, des biomes, des dimensions, un système de magie et bien plus encore...</dd>
|
||||
<dt>CyberTermHack:</dt><dd>Un jeu de "hacker"</dd>
|
||||
<dt>Ce site:</dt><dd>Ce site est toujours en développement meme si la plupart des pages accessibles sont déjà finies</dd>
|
||||
</dl>
|
||||
<h2>Liste de tous mes projets</h2>
|
||||
<dl>
|
||||
<dt>Spaconium:</dt><dd>Mod minecraft</dd>
|
||||
<dt>SubAquAlien Explorer:</dt><dd>Un jeu de type arcade</dd>
|
||||
<dt>CyberTermHack:</dt><dd>Un jeu de "hacker"</dd>
|
||||
</dl>
|
||||
<!--
|
||||
<br><br><br><br>
|
||||
Juste un truc pour éditer du code :
|
||||
<script>event.target.onjustchange = new Function(event.target.getAttribute('onjustchange'))
|
||||
event.target.onkeydown = event.target.onkeyup = event.target.onkeypress = document.documentElement.onjustchange
|
||||
function changetheframe(){
|
||||
let x= document.getElementById('htmleditor').innerText; console.log(x); document.getElementById('iframeeditable').contentWindow.document.body.innerHTML = x
|
||||
}</script>
|
||||
<div id=htmleditor contenteditable onjustchange="changetheframe()">TYPE YOUR CODE HERE</div>
|
||||
<iframe id=iframeeditable style='width:95%; height:50%'>
|
||||
THE RESULT OF YOUR PAGe
|
||||
</iframe>
|
||||
-->
|
||||
</div>
|
||||
<div id="footer"></div>
|
||||
</body>
|
||||
</html>
|
104
main-site/search.html
Normal file
104
main-site/search.html
Normal file
|
@ -0,0 +1,104 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="fr">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<link rel="icon" href="//api.gzod01.fr/pictures/gzod01.ico">
|
||||
<link rel="stylesheet" href="//api.gzod01.fr/css/style.css">
|
||||
<script src="//api.gzod01.fr/scripts/main.js"></script>
|
||||
<title>Page d'Accueil Navigateur</title>
|
||||
</head>
|
||||
<body>
|
||||
<div id="header"></div>
|
||||
<div class=content>
|
||||
<div style="position:absolute;right:0">
|
||||
<label for=searchmotorselect>Choisissez votre moteur de recherche</label>
|
||||
<select id=searchmotorselect name=searchmototselect>
|
||||
<option value=duckduckgo>DuckDuckGo</option>
|
||||
<option value=google>Google</option>
|
||||
<option value=bing>Bing</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class=fullcentered name=searchbar>
|
||||
<label for=q>Rechercher (Entrez un url ou un texte):</label><input type="text" id="q" name="q"><button id="search">GO</button>
|
||||
</div>
|
||||
<script>/*function isveryvalidurl(urlString){
|
||||
try {
|
||||
return Boolean(new URL(urlString));
|
||||
}
|
||||
catch(e){
|
||||
console.warn(e)
|
||||
return false;
|
||||
}
|
||||
}*/
|
||||
function isveryvalidurl(urlString){
|
||||
var urlPattern = new RegExp('^(https?:\\/\\/)?'+ // validate protocol
|
||||
'((([a-z\\d]([a-z\\d-]*[a-z\\d])*)\\.)+[a-z]{2,}|'+ // validate domain name
|
||||
'((\\d{1,3}\\.){3}\\d{1,3}))'+ // validate OR ip (v4) address
|
||||
'(\\:\\d+)?(\\/[-a-z\\d%_.~+]*)*'+ // validate port and path
|
||||
'(\\?[;&a-z\\d%_.~+=-]*)?'+ // validate query string
|
||||
'(\\#[-a-z\\d_]*)?$','i'); // validate fragment locator
|
||||
return !!urlPattern.test(urlString);
|
||||
}
|
||||
document.getElementById('q').onkeydown = function(e){if(e.keyCode==13){functiontosearch()}}
|
||||
function functiontosearch(){
|
||||
let queryvalue = document.getElementById('q').value;
|
||||
if(queryvalue.startsWith('http')){
|
||||
if(isveryvalidurl(queryvalue)){
|
||||
open(queryvalue)
|
||||
}
|
||||
else{
|
||||
open('//duckduckgo.com/?q='+encodeURIComponent(queryvalue))
|
||||
}
|
||||
}
|
||||
else if(queryvalue.startsWith('//')){
|
||||
if(isveryvalidurl('http:'+queryvalue)){
|
||||
open(queryvalue)
|
||||
}
|
||||
else{
|
||||
open('//duckduckgo.com/?q='+encodeURIComponent(queryvalue))
|
||||
}
|
||||
}
|
||||
else{
|
||||
if(isveryvalidurl('http://'+queryvalue)){
|
||||
open('//'+queryvalue)
|
||||
}
|
||||
else{
|
||||
open('//duckduckgo.com/?q='+encodeURIComponent(queryvalue))
|
||||
}
|
||||
}
|
||||
}
|
||||
document.getElementById('search').addEventListener('click', functiontosearch)</script>
|
||||
<!--<div id="f"></div>
|
||||
<button id="addf">Ajouter un lien aux favoris</button>
|
||||
<script>
|
||||
function deletefromarray(mat,p){
|
||||
let nmat = []
|
||||
for(let i; i<length(mat)+1;i++){
|
||||
if (i==p){}
|
||||
else{
|
||||
nmat.push(mat[i])
|
||||
}
|
||||
}
|
||||
return nmat
|
||||
}
|
||||
let fav = JSON.parse(localStorage.getItem('favoris'))
|
||||
for(let i; i<length(fav)+1; i++){
|
||||
let cf = fav[i]
|
||||
let fnode = document.createElement('div')
|
||||
let furl= document.createElement('a')
|
||||
furl.href=cf['url']
|
||||
furl.innerText=cf['name']
|
||||
fnode.appendChild('furl')
|
||||
let delbutton = document.createElement('button')
|
||||
delbutton.innerText= 'Supprimer'
|
||||
delbutton.setAttribute('onclick',`function(){localStorage.setItem('favoris',JSON.stringify(deletefromarray(JSON.parse(localStorage.getItem('favoris')),${i})))}`)
|
||||
document.getElementById('f').appendChild(fnode)
|
||||
}
|
||||
document.getElementById('')
|
||||
</script>-->
|
||||
</div>
|
||||
<div id="footer"></div>
|
||||
</body>
|
||||
</html>
|
19
main-site/services.html
Normal file
19
main-site/services.html
Normal file
|
@ -0,0 +1,19 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="fr">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<link rel="icon" href="//api.gzod01.fr/pictures/gzod01.ico">
|
||||
<link rel="stylesheet" href="//api.gzod01.fr/css/style.css">
|
||||
<script src="//api.gzod01.fr/scripts/main.js"></script>
|
||||
<title>Services</title>
|
||||
</head>
|
||||
<body>
|
||||
<div id="header"></div>
|
||||
<div class=content>
|
||||
<a href=//host.gzod01.fr>Host your pages</a>
|
||||
</div>
|
||||
<div id="footer"></div>
|
||||
</body>
|
||||
</html>
|
36
main-site/sitemap.html
Normal file
36
main-site/sitemap.html
Normal file
|
@ -0,0 +1,36 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="fr">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<link rel="icon" href="//api.gzod01.fr/pictures/gzod01.ico">
|
||||
<link rel="stylesheet" href="//api.gzod01.fr/css/style.css">
|
||||
<script src="//api.gzod01.fr/scripts/main.js"></script>
|
||||
<title>Plan Du Site</title>
|
||||
</head>
|
||||
<body>
|
||||
<div id="header"></div>
|
||||
<div class=content>
|
||||
<div>
|
||||
<ul>
|
||||
<li><a href="//gzod01.fr">GZod01.fr</a><ul id=sitemap></ul></li>
|
||||
<li><a href="//blog.gzod01.fr">Blog.gzod01.fr</a></li>
|
||||
<li><a href="//blog2.gzod01.fr">Blog2.gzod01.fr</a></li>
|
||||
<li><a href="//host.gzod01.fr">Host.gzod01.fr</a></li>
|
||||
<li><a href="//api.gzod01.fr">Api.gzod01.fr</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<script>
|
||||
var x= "about;chat;contact;CyberTermHack/;easy-contact;error404;games;index;legal;page-builder;services;search;uscpm/;time"
|
||||
var l = x.split(';')
|
||||
for(let i = 0; i<l.length; i++){
|
||||
let linode = document.createElement('li')
|
||||
linode.innerHTML= '<a href="//gzod01.fr/'+l[i]+'">'+l[i]+'</a>'
|
||||
document.getElementById('sitemap').appendChild(linode)
|
||||
}
|
||||
</script>
|
||||
</div>
|
||||
<div id="footer"></div>
|
||||
</body>
|
||||
</html>
|
40
main-site/sitemap.json
Normal file
40
main-site/sitemap.json
Normal file
|
@ -0,0 +1,40 @@
|
|||
{
|
||||
"site-gzod01.fr":{
|
||||
"-url-":"//gzod01.fr",
|
||||
"page-A Propos":"about",
|
||||
"page-Contact":"contact",
|
||||
"page-Jeux":"games",
|
||||
"page-Mentions Légales":"legal",
|
||||
"page-Créateur de Page":"page-builder",
|
||||
"page-Projets":"projects",
|
||||
"page-Accueil Navigateur": "search",
|
||||
"page-Services":"services",
|
||||
"page-Plan Du Site":"sitemap",
|
||||
"page-Horloge":"time",
|
||||
"dir-CyberTermHack":{
|
||||
"-url-":"CyberTermHack",
|
||||
"page-index":"index",
|
||||
"page-Version JS Web": "js-web-CyberTermHack",
|
||||
"file-Version Python Terminal": "py-term-CyberTermHack.py"
|
||||
},
|
||||
"dir-USCPM":{
|
||||
"-url-":"uscpm",
|
||||
"page-index":"index",
|
||||
"page-A Propos": "about",
|
||||
"page-Beta":"beta",
|
||||
"file-HashChars.json":"hashchars.json"
|
||||
}
|
||||
},
|
||||
"site-blog.gzod01.fr":{
|
||||
"-url-":"//blog.gzod01.fr"
|
||||
},
|
||||
"site-blog2.gzod01.fr":{
|
||||
"-url-":"//blog2.gzod01.fr"
|
||||
},
|
||||
"site-host.gzod01.fr":{
|
||||
"-url-":"//host.gzod01.fr"
|
||||
},
|
||||
"site-api.gzod01.fr":{
|
||||
"-url-":"//api.gzod01.fr"
|
||||
}
|
||||
}
|
253
main-site/sitemap.xml
Normal file
253
main-site/sitemap.xml
Normal file
|
@ -0,0 +1,253 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<urlset
|
||||
xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://www.sitemaps.org/schemas/sitemap/0.9
|
||||
http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd">
|
||||
|
||||
<url>
|
||||
<loc>http://gzod01.fr/</loc>
|
||||
<lastmod>2023-02-24T07:42:12+00:00</lastmod>
|
||||
<priority>1.00</priority>
|
||||
</url>
|
||||
<url>
|
||||
<loc>http://gzod01.fr/games</loc>
|
||||
<lastmod>2023-02-21T15:55:57+00:00</lastmod>
|
||||
<priority>0.80</priority>
|
||||
</url>
|
||||
<url>
|
||||
<loc>http://gzod01.fr/services</loc>
|
||||
<lastmod>2023-02-21T15:55:57+00:00</lastmod>
|
||||
<priority>0.80</priority>
|
||||
</url>
|
||||
<url>
|
||||
<loc>http://gzod01.fr/projects</loc>
|
||||
<lastmod>2023-02-21T15:55:57+00:00</lastmod>
|
||||
<priority>0.80</priority>
|
||||
</url>
|
||||
<url>
|
||||
<loc>http://gzod01.fr/contact</loc>
|
||||
<lastmod>2023-02-21T15:55:57+00:00</lastmod>
|
||||
<priority>0.80</priority>
|
||||
</url>
|
||||
<url>
|
||||
<loc>http://gzod01.fr/sitemap</loc>
|
||||
<lastmod>2023-02-21T15:55:57+00:00</lastmod>
|
||||
<priority>0.80</priority>
|
||||
</url>
|
||||
<url>
|
||||
<loc>http://gzod01.fr/about</loc>
|
||||
<lastmod>2023-02-21T15:55:57+00:00</lastmod>
|
||||
<priority>0.80</priority>
|
||||
</url>
|
||||
<url>
|
||||
<loc>http://gzod01.fr/legal</loc>
|
||||
<lastmod>2023-02-21T16:51:31+00:00</lastmod>
|
||||
<priority>0.80</priority>
|
||||
</url>
|
||||
<url>
|
||||
<loc>http://gzod01.fr/index-with-iframes</loc>
|
||||
<lastmod>2023-02-21T15:55:57+00:00</lastmod>
|
||||
<priority>0.80</priority>
|
||||
</url>
|
||||
<url>
|
||||
<loc>http://gzod01.fr/fullsitemaptree</loc>
|
||||
<lastmod>2023-02-24T07:41:28+00:00</lastmod>
|
||||
<priority>0.80</priority>
|
||||
</url>
|
||||
<url>
|
||||
<loc>http://gzod01.fr/uscpm</loc>
|
||||
<lastmod>2023-02-21T15:58:54+00:00</lastmod>
|
||||
<priority>0.64</priority>
|
||||
</url>
|
||||
<url>
|
||||
<loc>http://gzod01.fr/CyberTermHack/</loc>
|
||||
<lastmod>2023-02-21T15:57:07+00:00</lastmod>
|
||||
<priority>0.64</priority>
|
||||
</url>
|
||||
<url>
|
||||
<loc>http://gzod01.fr/about.html</loc>
|
||||
<lastmod>2023-02-21T15:55:57+00:00</lastmod>
|
||||
<priority>0.64</priority>
|
||||
</url>
|
||||
<url>
|
||||
<loc>http://gzod01.fr/bookmark.html</loc>
|
||||
<lastmod>2023-02-22T10:47:09+00:00</lastmod>
|
||||
<priority>0.64</priority>
|
||||
</url>
|
||||
<url>
|
||||
<loc>http://gzod01.fr/chat/client.html</loc>
|
||||
<lastmod>2023-02-21T15:56:56+00:00</lastmod>
|
||||
<priority>0.64</priority>
|
||||
</url>
|
||||
<url>
|
||||
<loc>http://gzod01.fr/chat/server.py</loc>
|
||||
<lastmod>2023-02-21T15:56:56+00:00</lastmod>
|
||||
<priority>0.64</priority>
|
||||
</url>
|
||||
<url>
|
||||
<loc>http://gzod01.fr/contact.html</loc>
|
||||
<lastmod>2023-02-21T15:55:57+00:00</lastmod>
|
||||
<priority>0.64</priority>
|
||||
</url>
|
||||
<url>
|
||||
<loc>http://gzod01.fr/CyberTermHack/api.html</loc>
|
||||
<lastmod>2023-02-21T15:57:14+00:00</lastmod>
|
||||
<priority>0.64</priority>
|
||||
</url>
|
||||
<url>
|
||||
<loc>http://gzod01.fr/CyberTermHack/CONSOLE/console.html</loc>
|
||||
<lastmod>2023-02-21T15:57:41+00:00</lastmod>
|
||||
<priority>0.64</priority>
|
||||
</url>
|
||||
<url>
|
||||
<loc>http://gzod01.fr/CyberTermHack/index.html</loc>
|
||||
<lastmod>2023-02-21T15:57:07+00:00</lastmod>
|
||||
<priority>0.64</priority>
|
||||
</url>
|
||||
<url>
|
||||
<loc>http://gzod01.fr/CyberTermHack/V0.1/</loc>
|
||||
<lastmod>2023-02-21T15:58:12+00:00</lastmod>
|
||||
<priority>0.64</priority>
|
||||
</url>
|
||||
<url>
|
||||
<loc>http://gzod01.fr/CyberTermHack/V0.1/index.html</loc>
|
||||
<lastmod>2023-02-21T15:58:12+00:00</lastmod>
|
||||
<priority>0.64</priority>
|
||||
</url>
|
||||
<url>
|
||||
<loc>http://gzod01.fr/CyberTermHack/V0.1/js-web-CyberTermHack.html</loc>
|
||||
<lastmod>2023-02-21T15:58:12+00:00</lastmod>
|
||||
<priority>0.64</priority>
|
||||
</url>
|
||||
<url>
|
||||
<loc>http://gzod01.fr/CyberTermHack/V0.1/py-curses-CyberTermHack.py</loc>
|
||||
<lastmod>2023-02-21T15:58:12+00:00</lastmod>
|
||||
<priority>0.64</priority>
|
||||
</url>
|
||||
<url>
|
||||
<loc>http://gzod01.fr/CyberTermHack/V0.1/py-term-CyberTermHack.py</loc>
|
||||
<lastmod>2023-02-21T15:58:12+00:00</lastmod>
|
||||
<priority>0.64</priority>
|
||||
</url>
|
||||
<url>
|
||||
<loc>http://gzod01.fr/CyberTermHack/V0.1.2:OPTIMIZED/</loc>
|
||||
<lastmod>2023-02-21T15:58:34+00:00</lastmod>
|
||||
<priority>0.64</priority>
|
||||
</url>
|
||||
<url>
|
||||
<loc>http://gzod01.fr/CyberTermHack/V0.1.2:OPTIMIZED/index.html</loc>
|
||||
<lastmod>2023-02-21T15:58:34+00:00</lastmod>
|
||||
<priority>0.64</priority>
|
||||
</url>
|
||||
<url>
|
||||
<loc>http://gzod01.fr/CyberTermHack/V0.2/</loc>
|
||||
<lastmod>2023-02-21T15:58:54+00:00</lastmod>
|
||||
<priority>0.64</priority>
|
||||
</url>
|
||||
<url>
|
||||
<loc>http://gzod01.fr/CyberTermHack/V0.2/devlog.txt</loc>
|
||||
<lastmod>2023-02-21T15:58:54+00:00</lastmod>
|
||||
<priority>0.64</priority>
|
||||
</url>
|
||||
<url>
|
||||
<loc>http://gzod01.fr/CyberTermHack/V0.2/index.html</loc>
|
||||
<lastmod>2023-02-21T15:58:54+00:00</lastmod>
|
||||
<priority>0.64</priority>
|
||||
</url>
|
||||
<url>
|
||||
<loc>http://gzod01.fr/easy-contact.html</loc>
|
||||
<lastmod>2023-02-21T15:55:57+00:00</lastmod>
|
||||
<priority>0.64</priority>
|
||||
</url>
|
||||
<url>
|
||||
<loc>http://gzod01.fr/games.html</loc>
|
||||
<lastmod>2023-02-21T15:55:57+00:00</lastmod>
|
||||
<priority>0.64</priority>
|
||||
</url>
|
||||
<url>
|
||||
<loc>http://gzod01.fr/index.html</loc>
|
||||
<lastmod>2023-02-24T07:42:12+00:00</lastmod>
|
||||
<priority>0.64</priority>
|
||||
</url>
|
||||
<url>
|
||||
<loc>http://gzod01.fr/index-with-iframes.html</loc>
|
||||
<lastmod>2023-02-21T15:55:57+00:00</lastmod>
|
||||
<priority>0.64</priority>
|
||||
</url>
|
||||
<url>
|
||||
<loc>http://gzod01.fr/legal.html</loc>
|
||||
<lastmod>2023-02-21T16:51:31+00:00</lastmod>
|
||||
<priority>0.64</priority>
|
||||
</url>
|
||||
<url>
|
||||
<loc>http://gzod01.fr/page-builder.html</loc>
|
||||
<lastmod>2023-02-21T15:55:57+00:00</lastmod>
|
||||
<priority>0.64</priority>
|
||||
</url>
|
||||
<url>
|
||||
<loc>http://gzod01.fr/projects.html</loc>
|
||||
<lastmod>2023-02-21T15:55:57+00:00</lastmod>
|
||||
<priority>0.64</priority>
|
||||
</url>
|
||||
<url>
|
||||
<loc>http://gzod01.fr/search.html</loc>
|
||||
<lastmod>2023-02-21T15:55:57+00:00</lastmod>
|
||||
<priority>0.64</priority>
|
||||
</url>
|
||||
<url>
|
||||
<loc>http://gzod01.fr/services.html</loc>
|
||||
<lastmod>2023-02-21T15:55:57+00:00</lastmod>
|
||||
<priority>0.64</priority>
|
||||
</url>
|
||||
<url>
|
||||
<loc>http://gzod01.fr/sitemap.html</loc>
|
||||
<lastmod>2023-02-21T15:55:57+00:00</lastmod>
|
||||
<priority>0.64</priority>
|
||||
</url>
|
||||
<url>
|
||||
<loc>http://gzod01.fr/testofsitemap.html</loc>
|
||||
<lastmod>2023-02-21T15:55:57+00:00</lastmod>
|
||||
<priority>0.64</priority>
|
||||
</url>
|
||||
<url>
|
||||
<loc>http://gzod01.fr/time.html</loc>
|
||||
<lastmod>2023-02-21T15:55:57+00:00</lastmod>
|
||||
<priority>0.64</priority>
|
||||
</url>
|
||||
<url>
|
||||
<loc>http://gzod01.fr/uscpm/</loc>
|
||||
<lastmod>2023-02-21T15:58:54+00:00</lastmod>
|
||||
<priority>0.64</priority>
|
||||
</url>
|
||||
<url>
|
||||
<loc>http://gzod01.fr/uscpm/about.html</loc>
|
||||
<lastmod>2023-02-21T15:58:54+00:00</lastmod>
|
||||
<priority>0.64</priority>
|
||||
</url>
|
||||
<url>
|
||||
<loc>http://gzod01.fr/uscpm/alpha-neostyle-uscpm.html</loc>
|
||||
<lastmod>2023-02-21T15:58:54+00:00</lastmod>
|
||||
<priority>0.64</priority>
|
||||
</url>
|
||||
<url>
|
||||
<loc>http://gzod01.fr/uscpm/beta.html</loc>
|
||||
<lastmod>2023-02-21T15:58:54+00:00</lastmod>
|
||||
<priority>0.64</priority>
|
||||
</url>
|
||||
<url>
|
||||
<loc>http://gzod01.fr/uscpm/index.html</loc>
|
||||
<lastmod>2023-02-21T15:58:54+00:00</lastmod>
|
||||
<priority>0.64</priority>
|
||||
</url>
|
||||
<url>
|
||||
<loc>http://gzod01.fr/uscpm/play.bat</loc>
|
||||
<lastmod>2023-02-21T15:58:54+00:00</lastmod>
|
||||
<priority>0.64</priority>
|
||||
</url>
|
||||
<url>
|
||||
<loc>http://gzod01.fr/uscpm/texttoshare.html</loc>
|
||||
<lastmod>2023-02-21T15:58:54+00:00</lastmod>
|
||||
<priority>0.64</priority>
|
||||
</url>
|
||||
</urlset>
|
81
main-site/testofsitemap.html
Normal file
81
main-site/testofsitemap.html
Normal file
|
@ -0,0 +1,81 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="fr">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<link rel="icon" href="//api.gzod01.fr/pictures/gzod01.ico">
|
||||
<link rel="stylesheet" href="//api.gzod01.fr/css/style.css">
|
||||
<script src="//api.gzod01.fr/scripts/main.js"></script>
|
||||
<title>sitemap.html</title>
|
||||
</head>
|
||||
<body>
|
||||
<div id="header"></div>
|
||||
<div class=content>
|
||||
<h1>Plan Des Sites: </h1>
|
||||
<ul id="sitemap"></ul>
|
||||
<script>
|
||||
|
||||
function sleep(s) {
|
||||
let ms = s*1000
|
||||
return new Promise(resolve => setTimeout(resolve, ms));
|
||||
}
|
||||
async function fetchsitemap(){
|
||||
const xhr = new XMLHttpRequest();
|
||||
xhr.onreadystatechange = () => {
|
||||
if (xhr.readyState === XMLHttpRequest.DONE) {
|
||||
console.log(typeof xhr.responseText);
|
||||
console.log(xhr.responseText);
|
||||
}
|
||||
};
|
||||
xhr.open('GET', 'http://gzod01.fr/sitemap.json', true);
|
||||
xhr.setRequestHeader('Accept', 'application/json');
|
||||
xhr.send(null);
|
||||
await sleep(2)
|
||||
const res = JSON.parse(xhr.responseText);
|
||||
return res
|
||||
}
|
||||
function createlinode(url, value, key, strtype, rootofnode){
|
||||
if(key.startswith(strtype)){
|
||||
let linknode = document.createelement('li')
|
||||
linknode.innerhtml='<a href="'+url+value+'">'+key.substring(strtype.length)+'</a>'
|
||||
rootofnode.appendchild(linknode)
|
||||
}
|
||||
}
|
||||
function preparesitemap(data,rootnode,callurl="",name){
|
||||
console.log(data, rootnode, callurl, name)
|
||||
let url = callurl+data['-url-']
|
||||
rootnode.innerHTML='<a href="'+url+'">'+name+'</a>'
|
||||
let ulement = document.createElement('ul')
|
||||
rootnode.appendChild('ul')
|
||||
Object.entries(data).forEach((quer)=>{
|
||||
let [rkey, rvalue] = quer
|
||||
if(rkey.startsWith('dir-')){
|
||||
let jsonv = JSON.parse(rvalue)
|
||||
let newrootnode = document.createElement('li')
|
||||
rootnode.appendChild(newrootnode)
|
||||
preparesitemap(jsonv,newrootnode, url, rkey.substring('dir-'.length))
|
||||
}
|
||||
createlinode(url,rvalue,rkey,"page-",ulement)
|
||||
createlinode(url,rvalue,rkey,"file-",ulement)
|
||||
})
|
||||
}
|
||||
async function mainsitemap(){
|
||||
let res = fetchsitemap()
|
||||
await Object.entries(res).forEach((entry)=>{
|
||||
console.log('helloworld')
|
||||
let [rootkey, rootvalue] = entry
|
||||
if(rootkey.startsWith('site-')){
|
||||
let valuejsoned = JSON.parse(rootvalue)
|
||||
let rootofallnode = document.getElementById('sitemap')
|
||||
let rootofthenode = document.createElement('li')
|
||||
rootofallnode.appendChild(rootofthenode)
|
||||
preparesitemap(valuejsoned, rootofthenode, "", rootkey.substring('site-'.length))
|
||||
}
|
||||
})}
|
||||
mainsitemap()
|
||||
</script>
|
||||
</div>
|
||||
<div id="footer"></div>
|
||||
</body>
|
||||
</html>
|
97
main-site/time.html
Normal file
97
main-site/time.html
Normal file
|
@ -0,0 +1,97 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
|
||||
<link rel="preconnect" href="https://fonts.googleapis.com">
|
||||
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
||||
<link href="https://fonts.googleapis.com/css2?family=Fira+Code:wght@300;400;500&display=swap" rel="stylesheet">
|
||||
|
||||
<title>Clock</title>
|
||||
|
||||
<style>
|
||||
body, html {
|
||||
font-family: 'Fira Code', monospace;
|
||||
}
|
||||
body {
|
||||
margin: 0;
|
||||
background-color: #121869;
|
||||
color: white;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
height: 100vh;
|
||||
}
|
||||
.clock {
|
||||
display: none;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
height: 100%;
|
||||
position: relative;
|
||||
top: -4em;
|
||||
}
|
||||
.time {
|
||||
display: flex;
|
||||
font-size: 500%;
|
||||
}
|
||||
.date {
|
||||
font-size: 200%;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
margin-top: 1em;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div id="clock" class="clock">
|
||||
<div class="time">
|
||||
<div id="hours"></div>
|
||||
<div class="sep">:</div>
|
||||
<div id="minutes"></div>
|
||||
<div class="sep">:</div>
|
||||
<div id="seconds"></div>
|
||||
</div>
|
||||
<div class="date">
|
||||
<div id="date-formated"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="actions">
|
||||
</div>
|
||||
|
||||
<script>
|
||||
const hours = document.getElementById('hours')
|
||||
const minutes = document.getElementById('minutes')
|
||||
const seconds = document.getElementById('seconds')
|
||||
const dateFormated = document.getElementById('date-formated')
|
||||
const clock = document.getElementById('clock')
|
||||
|
||||
let addPaddings = val => {
|
||||
let str = val.toString()
|
||||
if (str.length === 1) {
|
||||
return '0' + str
|
||||
}
|
||||
return str
|
||||
}
|
||||
|
||||
let tick = () => {
|
||||
clock.style.display = 'flex'
|
||||
|
||||
let date = new Date()
|
||||
hours.innerHTML = addPaddings(date.getHours())
|
||||
minutes.innerHTML = addPaddings(date.getMinutes())
|
||||
seconds.innerHTML = addPaddings(date.getSeconds())
|
||||
|
||||
dateFormated.innerHTML = (new Date()).toLocaleString('en', {year: 'numeric', month: 'long', day: 'numeric', weekday: 'long'})
|
||||
}
|
||||
tick()
|
||||
|
||||
setInterval(() => {
|
||||
tick()
|
||||
}, 1000)
|
||||
</script>
|
||||
|
||||
</body>
|
||||
</html>
|
24
main-site/uscpm/about.html
Normal file
24
main-site/uscpm/about.html
Normal file
|
@ -0,0 +1,24 @@
|
|||
|
||||
<h1>USCPM</h1>
|
||||
An updated version of Super Chrono Portal Maker Original game by Maxime Euzière & Anders Kaare (see xem.github.io), Remake by GZod01 <br>
|
||||
<a href="/uscpm/beta">VERSION BETA</a><br><a href="/uscpm">VERSION STABLE</a><br>
|
||||
If you can't finish the level, press the WIN! button For saving maked levels in the "play" menu levels click the save button For sharing levels or importing click the corresponding buttons <br>
|
||||
|
||||
The hash characters: <br>
|
||||
{<br>
|
||||
"enable-yellow": "9",<br>
|
||||
"disable-yellow": ":", <br>
|
||||
"time-machhine-top": "F", <br>
|
||||
"time-machine-bottom": "G", <br>
|
||||
"brick": "3", <br>
|
||||
"breakable-brick": "5", <br>
|
||||
"cloud": "=", <br>
|
||||
"yellow-button": ";", <br>
|
||||
"box": "<", <br>
|
||||
"steel-brick-for-portals": "4", <br>
|
||||
"flag": "2", <br>
|
||||
"coins": "6", <br>
|
||||
"pics": "7", <br>
|
||||
"moving-platform": "?", <br>
|
||||
"ice": "8"<br>
|
||||
} <br>
|
2049
main-site/uscpm/alpha-neostyle-uscpm.html
Normal file
2049
main-site/uscpm/alpha-neostyle-uscpm.html
Normal file
File diff suppressed because one or more lines are too long
2034
main-site/uscpm/beta.html
Normal file
2034
main-site/uscpm/beta.html
Normal file
File diff suppressed because one or more lines are too long
17
main-site/uscpm/hashchars.json
Normal file
17
main-site/uscpm/hashchars.json
Normal file
|
@ -0,0 +1,17 @@
|
|||
{
|
||||
"enable-yellow": "9",
|
||||
"disable-yellow": ":",
|
||||
"time-machhine-top": "F",
|
||||
"time-machine-bottom": "G",
|
||||
"brick": "3",
|
||||
"breakable-brick": "5",
|
||||
"cloud": "=",
|
||||
"yellow-button": ";",
|
||||
"box": "<",
|
||||
"steel-brick-for-portals": "4",
|
||||
"flag": "2",
|
||||
"coins": "6",
|
||||
"pics": "7",
|
||||
"moving-platform": "?",
|
||||
"ice": "8"
|
||||
}
|
2030
main-site/uscpm/index.html
Normal file
2030
main-site/uscpm/index.html
Normal file
File diff suppressed because one or more lines are too long
21
main-site/uscpm/play.bat
Normal file
21
main-site/uscpm/play.bat
Normal file
|
@ -0,0 +1,21 @@
|
|||
echo checking internet connection
|
||||
Ping www.google.fr -n 1 -w 1000
|
||||
cls
|
||||
if errorlevel 1 (set internet="Not connected to internet") else (set internet="Connected to internet")
|
||||
|
||||
echo %internet%
|
||||
if %internet% == "Connected to internet" (
|
||||
echo "<script>let url = 'http://gzod01.fr/uscpm/index.html'; fetch(url).then((response) => {if (!response.ok) {throw new Error(`HTTP error: ${response.status}`);};return response.text();}).then((text) => poemDisplay.textContent = text).catch((error) => poemDisplay.textContent = `Could not fetch verse: ${error}`);</script>" > ".\uscpm.html"
|
||||
echo "do"
|
||||
start "" ".\uscpm.html"
|
||||
)
|
||||
else (
|
||||
if exist ".\uscpm.html" (
|
||||
start "" ".\uscpm.html"
|
||||
) else (
|
||||
msg "%USERNAME%" "Sorry, your computer can't access to internet and the USCPM file doesn't exist, if the error persist create an issue in the github: https://github.com/gzod01/uscpm"
|
||||
rem echo "x=msgbox("Sorry, your computer can't access to internet and the USCPM file doesn't exist, if the error persist create an issue in the github: https://github.com/gzod01/uscpm", Button+Icon, "ERROR USCPM")" > .\message.vbs
|
||||
rem .\message.vbs
|
||||
rem del .\message.vbs
|
||||
)
|
||||
)
|
19
main-site/uscpm/texttoshare.html
Normal file
19
main-site/uscpm/texttoshare.html
Normal file
|
@ -0,0 +1,19 @@
|
|||
<form>
|
||||
<input type="text" name="text" id="text" onkeyup="showindiv()">
|
||||
</form>
|
||||
<div id="content"></div>
|
||||
<script>
|
||||
window.onload= function(){
|
||||
if(document.getElementById('text').value ===''){}
|
||||
else{
|
||||
let text = document.getElementById('text').value
|
||||
let ntext = text.replace('\n','<br>')
|
||||
document.getElementById('content').innerHTML = ntext
|
||||
}
|
||||
}
|
||||
function showindiv(){
|
||||
let text = document.getElementById('text').value
|
||||
let ntext = text.replace('\n','<br>')
|
||||
document.getElementById('content').innerHTML = ntext
|
||||
}
|
||||
</script>
|
Reference in a new issue