Help
RSS
API
Feed
Maltego
Contact
Domain > blackhao.com
×
More information on this domain is in
AlienVault OTX
Is this malicious?
Yes
No
DNS Resolutions
Date
IP Address
2024-12-25
104.21.6.5
(
ClassC
)
2024-12-25
172.67.134.30
(
ClassC
)
2026-01-28
131.153.232.145
(
ClassC
)
Port 80
HTTP/1.1 301 Moved PermanentlyServer: nginx/1.18.0 (Ubuntu)Date: Wed, 28 Jan 2026 21:09:41 GMTContent-Type: text/htmlContent-Length: 178Connection: keep-aliveLocation: https://blackhao.com/ html>head>title>301 Moved Permanently/title>/head>body>center>h1>301 Moved Permanently/h1>/center>hr>center>nginx/1.18.0 (Ubuntu)/center>/body>/html>
Port 443
HTTP/1.1 200 OKServer: nginx/1.18.0 (Ubuntu)Date: Wed, 28 Jan 2026 21:09:41 GMTContent-Type: text/htmlContent-Length: 52684Last-Modified: Thu, 04 Dec 2025 04:18:40 GMTConnection: keep-aliveETag: 69310ba0-cdccAccept-Ranges: bytes !DOCTYPE html>html langen>head> meta charsetUTF-8> meta nameviewport contentwidthdevice-width, initial-scale1.0> title>Yurens OS/title> link relicon hreficon.png typeimage/png> link relstylesheet hrefhttps://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css> script srchttps://cdn.jsdelivr.net/npm/marked/marked.min.js>/script> style> :root { --bg-color: #f3f3f3; --taskbar-color: rgba(243, 243, 243, 0.85); --window-bg: #ffffff; --accent-color: #0078d4; --text-color: #202020; --glass-border: 1px solid rgba(255, 255, 255, 0.3); --shadow: 0 10px 20px rgba(0,0,0,0.15); } * { box-sizing: border-box; user-select: none; } body { margin: 0; overflow: hidden; font-family: Segoe UI, Tahoma, Geneva, Verdana, sans-serif; background: url(background.png) no-repeat center center fixed; background-size: cover; height: 100vh; width: 100vw; } /* Desktop Icons */ #desktop { padding: 10px; display: flex; flex-direction: column; flex-wrap: wrap; height: calc(100vh - 48px); align-content: flex-start; } .desktop-icon { width: 80px; height: 90px; display: flex; flex-direction: column; align-items: center; justify-content: center; margin: 5px; border-radius: 4px; color: white; text-shadow: 0 1px 3px rgba(0,0,0,0.8); cursor: pointer; transition: background 0.2s; } .desktop-icon:hover { background: rgba(255,255,255,0.1); } .desktop-icon i { font-size: 32px; margin-bottom: 8px; } .desktop-icon span { font-size: 12px; text-align: center; word-break: break-word; } /* Windows */ .window { position: absolute; background: var(--window-bg); border-radius: 8px; box-shadow: var(--shadow); display: flex; flex-direction: column; overflow: hidden; min-width: 300px; min-height: 200px; resize: both; border: 1px solid rgba(0,0,0,0.1); animation: popIn 0.2s ease-out; } @keyframes popIn { from { transform: scale(0.95); opacity: 0; } to { transform: scale(1); opacity: 1; } } .title-bar { height: 32px; background: #f0f0f0; display: flex; align-items: center; justify-content: space-between; padding: 0 10px; cursor: default; } .title-bar:active { cursor: grabbing; } .window-title { font-size: 12px; font-weight: bold; display: flex; align-items: center; gap: 8px; } .window-controls { display: flex; gap: 8px; } .control-btn { width: 12px; height: 12px; border-radius: 50%; border: none; cursor: pointer; } .close-btn { background: #ff5f57; } .min-btn { background: #ffbd2e; } .max-btn { background: #28c940; } .window-content { flex: 1; overflow: auto; position: relative; background: #fff; user-select: text; } /* Taskbar */ #taskbar { position: absolute; bottom: 0; left: 0; width: 100%; height: 48px; background: var(--taskbar-color); backdrop-filter: blur(15px); display: flex; align-items: center; justify-content: space-between; /* Start, Apps, Clock */ padding: 0 15px; z-index: 10000; border-top: 1px solid rgba(255,255,255,0.4); } .start-btn { width: 36px; height: 36px; display: flex; align-items: center; justify-content: center; border-radius: 4px; cursor: pointer; transition: background 0.2s; font-size: 20px; color: #0078d4; } .start-btn:hover { background: rgba(0,0,0,0.05); } .taskbar-apps { display: flex; gap: 4px; flex: 1; justify-content: center; } .taskbar-icon { width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; border-radius: 4px; cursor: pointer; font-size: 20px; color: #444; position: relative; } .taskbar-icon:hover { background: rgba(255,255,255,0.5); } .taskbar-icon.active { background: rgba(255,255,255,0.4); box-shadow: inset 0 -2px 0 var(--accent-color); } .tray { display: flex; align-items: center; gap: 15px; font-size: 12px; color: #333; } /* Start Menu */ #start-menu { position: absolute; bottom: 55px; left: 50%; transform: translateX(-50%); width: 600px; height: 600px; background: rgba(245, 245, 245, 0.95); backdrop-filter: blur(20px); border-radius: 8px; box-shadow: var(--shadow); display: none; flex-direction: column; padding: 20px; z-index: 9999; border: 1px solid rgba(255,255,255,0.5); } #start-menu.open { display: flex; animation: slideUp 0.2s ease-out; } @keyframes slideUp { from { transform: translate(-50%, 20px); opacity: 0; } to { transform: translate(-50%, 0); opacity: 1; } } .start-search { background: #fff; border: 1px solid #ccc; border-radius: 4px; padding: 8px 12px; width: 100%; margin-bottom: 20px; outline: none; } .pinned-apps { display: grid; grid-template-columns: repeat(6, 1fr); gap: 20px; } .pinned-app { display: flex; flex-direction: column; align-items: center; gap: 8px; cursor: pointer; } .pinned-app:hover { background: rgba(0,0,0,0.05); border-radius: 4px; } .pinned-app i { font-size: 24px; } .pinned-app span { font-size: 11px; } /* Specific App Styles */ /* Terminal */ .terminal { background: #0c0c0c; color: #cccccc; font-family: Consolas, monospace; padding: 10px; height: 100%; overflow-y: auto; } .prompt { color: #28c940; } .cmd-input { background: transparent; border: none; color: #fff; outline: none; width: 80%; font-family: inherit; } /* Notepad */ .notepad { width: 100%; height: 100%; border: none; resize: none; padding: 10px; font-family: Consolas, monospace; outline: none; } /* Calculator */ .calc-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 5px; padding: 10px; height: 100%; } .calc-display { grid-column: 1 / -1; background: #333; color: white; font-size: 2em; text-align: right; padding: 10px; border-radius: 4px; display: flex; align-items: center; justify-content: flex-end; overflow: hidden;} .calc-btn { border: none; border-radius: 4px; font-size: 1.2em; cursor: pointer; background: #f9f9f9; transition: background 0.1s; } .calc-btn:hover { background: #e0e0e0; } .calc-btn.op { background: #f0f0f0; color: var(--accent-color); } .calc-btn.eq { background: var(--accent-color); color: white; } /* File Explorer */ .explorer { display: flex; height: 100%; } .sidebar { width: 150px; background: #f5f5f5; border-right: 1px solid #ddd; padding: 10px; } .main-view { flex: 1; padding: 10px; overflow-y: auto; display: flex; flex-wrap: wrap; align-content: flex-start; gap: 10px; } .file-item { width: 80px; text-align: center; cursor: pointer; padding: 5px; } .file-item:hover { background: #e5f3ff; border-radius: 4px; } .file-item i { font-size: 32px; display: block; margin-bottom: 5px; color: #f8d775; } /* Folder color */ .file-item.file i { color: #aaa; } /* Code Editor */ .code-editor { display: flex; height: 100%; font-family: Fira Code, monospace; } .line-numbers { width: 40px; background: #eee; color: #999; text-align: right; padding: 10px 5px; user-select: none; border-right: 1px solid #ddd; } .code-area { flex: 1; padding: 10px; outline: none; white-space: pre; overflow: auto; color: #333; } /* Paint */ .paint-toolbar { padding: 5px; background: #f0f0f0; border-bottom: 1px solid #ccc; display: flex; gap: 10px; } canvas { background: white; cursor: crosshair; display: block; } /* Minesweeper */ .minesweeper { background: #c0c0c0; padding: 10px; display: flex; justify-content: center; align-items: center; height: 100%; } .mine-grid { border: 2px solid #808080; display: grid; gap: 1px; background: #808080; } .mine-cell { width: 25px; height: 25px; background: #c0c0c0; display: flex; align-items: center; justify-content: center; font-weight: bold; cursor: pointer; font-family: sans-serif; font-size: 14px;} .mine-cell.revealed { background: #e0e0e0; border: 1px solid #999; } .mine-cell.bomb { background: red; } /* Markdown Viewer */ .markdown-content { padding: 20px; height: 100%; overflow-y: auto; font-family: Segoe UI, sans-serif; line-height: 1.6; } .markdown-content h1, .markdown-content h2, .markdown-content h3 { margin-top: 0; } .markdown-content code { background: #f0f0f0; padding: 2px 5px; border-radius: 4px; font-family: Consolas, monospace; } .markdown-content pre { background: #f0f0f0; padding: 10px; border-radius: 4px; overflow-x: auto; } .markdown-content a { color: #0078d4; text-decoration: none; } .markdown-content a:hover { text-decoration: underline; } /* Context Menu */ #context-menu { position: absolute; background: white; border: 1px solid #ccc; box-shadow: 2px 2px 5px rgba(0,0,0,0.2); display: none; flex-direction: column; z-index: 20000; width: 180px; } .ctx-item { padding: 8px 15px; cursor: pointer; font-size: 13px; display: flex; align-items: center; gap: 10px; } .ctx-item:hover { background: #f0f0f0; } .ctx-item.disabled { color: #aaa; pointer-events: none; } /style>/head>body> div iddesktop>/div> !-- Taskbar --> div idtaskbar> div classstart-btn onclicktoggleStartMenu() stylefont-size: 28px;>♿/div> div classtaskbar-apps idtaskbar-apps>/div> div classtray> div idclock>12:00 PM/div> i classfas fa-comment-alt>/i> /div> /div> !-- Start Menu --> div idstart-menu> input typetext classstart-search placeholderType here to search> h3>Pinned/h3> div classpinned-apps idpinned-apps>/div> /div> !-- Context Menu --> div idcontext-menu> div idctx-refresh classctx-item onclickrefreshDesktop()>i classfas fa-sync-alt>/i> Refresh/div> div idctx-new-txt classctx-item onclickcreateFile(New Text.txt, )>i classfas fa-file-alt>/i> New Text File/div> div idctx-new-md classctx-item onclickcreateFile(New Markdown.md, # New File)>i classfas fa-file-code>/i> New Markdown File/div> div idctx-rename classctx-item styledisplay:none onclickrenameFile()>i classfas fa-edit>/i> Rename/div> /div> script srcfs_content.js>/script> script> // --- OS STATE & CONFIG --- // Ensure fs exists if fs_content.js fails to load or is missing if (typeof fs undefined) { // Use window.fs to avoid redeclaration issues if var fs was hoisted but undefined window.fs { C:: {}, Desktop: {} }; } // Configure Marked to open links in new tab const renderer new marked.Renderer(); renderer.link function(href, title, text) { // Handling older marked versions where args are passed individually if (typeof href object) { // If marked v5+ passes an object token text href.text; title href.title; href href.href; } return `a target_blank href${href} title${title || }>${text}/a>`; }; marked.use({ renderer }); // fs is now expected to be loaded from external file. // The hardcoded fs block has been removed. let windows ; let zIndexCounter 100; let clipboard null; let contextTarget null; // To track what was right-clicked const apps { Notepad: { icon: fa-file-alt, run: openNotepad }, Markdown: { icon: fa-file-code, run: () > openNotepad(Untitled.md, # New Markdown File) }, Terminal: { icon: fa-terminal, run: openTerminal }, File Explorer: { icon: fa-folder-open, run: openExplorer }, Calculator: { icon: fa-calculator, run: openCalculator }, VS Code: { icon: fa-code, run: openVSCode }, Paint: { icon: fa-paint-brush, run: openPaint }, Minesweeper: { icon: fa-bomb, run: openMinesweeper }, Calendar: { icon: fa-calendar-alt, run: openCalendar }, Photos: { icon: fa-images, run: () > alert(Please open an image file to view.) }, Visitor Stat: { icon: fa-chart-bar, run: openVisitorStat }, Settings: { icon: fa-cog, run: () > alert(Settings not implemented yet!) } }; // --- CORE FUNCTIONS --- function openFile(fileName, content, fullPath) { const lowerName fileName.toLowerCase(); if (lowerName.endsWith(.md)) { openMarkdownViewer(fileName, content); } else if (lowerName.endsWith(.txt)) { openNotepad(fileName, content, fullPath); } else if (.jpg, .jpeg, .png, .gif, .webp, .svg.some(ext > lowerName.endsWith(ext))) { openImageViewer(fileName, content); // content here is the path/url or base64 } else { alert(`Unknown file format: ${fileName.split(.).pop()}\nUnable to open this file type.`); } } function init() { updateClock(); setInterval(updateClock, 1000); renderDesktop(); renderTaskbar(); renderStartMenu(); if(trackingFrame) { const doc trackingFrame.contentWindow.document; doc.open(); doc.write(`html>body>script typetext/javascript idclustrmaps srchttps://clustrmaps.com/map_v2.js?dxu5mIZCE21Z2ESb6t0JyZh9smA0g8g_qGFaR-fCUIZ0&clffffff&wa>\/script>/body>/html>`); doc.close(); } document.addEventListener(contextmenu, e > { e.preventDefault(); // If inside Minesweeper, do nothing (handled by oncontextmenu inline) if (e.target.closest(.minesweeper)) return; const menu document.getElementById(context-menu); // Check if clicked on a desktop icon const icon e.target.closest(.desktop-icon); const isDesktop e.target.id desktop || e.target document.body || e.target.closest(#desktop); if (icon && icon.dataset.filename) { contextTarget icon.dataset.filename; document.getElementById(ctx-rename).style.display flex; document.getElementById(ctx-new-txt).style.display none; document.getElementById(ctx-new-md).style.display none; document.getElementById(ctx-refresh).style.display none; } else if (isDesktop) { contextTarget null; document.getElementById(ctx-rename).style.display none; document.getElementById(ctx-new-txt).style.display flex; document.getElementById(ctx-new-md).style.display flex; document.getElementById(ctx-refresh).style.display flex; } else { return; // Dont show menu elsewhere } menu.style.display flex; menu.style.left e.pageX + px; menu.style.top e.pageY + px; }); document.addEventListener(click, e > { document.getElementById(context-menu).style.display none; if (!e.target.closest(#start-menu) && !e.target.closest(.start-btn)) { document.getElementById(start-menu).classList.remove(open); } }); } function updateClock() { const now new Date(); document.getElementById(clock).innerText now.toLocaleTimeString(, { hour: 2-digit, minute: 2-digit }); } function toggleStartMenu() { document.getElementById(start-menu).classList.toggle(open); } function renderDesktop() { const desktop document.getElementById(desktop); desktop.innerHTML ; // Add App Shortcuts Object.keys(apps).forEach(appName > { const div document.createElement(div); div.className desktop-icon; div.innerHTML `i classfas ${appsappName.icon} stylecolor: ${getRandomColor()}>/i>span>${appName}/span>`; div.onclick () > appsappName.run(); desktop.appendChild(div); }); // Add Files on Desktop Object.keys(fs.Desktop).forEach(fileName > { const div document.createElement(div); div.className desktop-icon; div.dataset.filename fileName; const lower fileName.toLowerCase(); if(.jpg, .jpeg, .png, .gif, .webp.some(ext > lower.endsWith(ext))) { // Preview for images const content fs.DesktopfileName; // Only preview if it looks like a URL/DataURI (simple check) if(content.length 200 || content.startsWith(http) || content.startsWith(data:)) { div.innerHTML `div stylewidth:60px; height:60px; background:url(${content}) center/cover no-repeat; border-radius:4px; margin-bottom:8px;>/div>span>${fileName}/span>`; } else { div.innerHTML `i classfas fa-file-image>/i>span>${fileName}/span>`; } } else { div.innerHTML `i classfas fa-file-alt>/i>span>${fileName}/span>`; } div.onclick () > openFile(fileName, fs.DesktopfileName, Desktop/ + fileName); desktop.appendChild(div); }); } function renderTaskbar() { const container document.getElementById(taskbar-apps); container.innerHTML ; windows.forEach(win > { const div document.createElement(div); div.className `taskbar-icon ${win.minimized ? : active}`; div.innerHTML `i classfas ${appswin.app?.icon || fa-window-maximize}>/i>`; div.onclick () > toggleWindow(win.id); container.appendChild(div); }); } function renderStartMenu() { const container document.getElementById(pinned-apps); container.innerHTML ; Object.keys(apps).forEach(appName > { const div document.createElement(div); div.className pinned-app; div.innerHTML `i classfas ${appsappName.icon} stylecolor: #333>/i>span>${appName}/span>`; div.onclick () > { appsappName.run(); toggleStartMenu(); }; container.appendChild(div); }); } function createWindow(title, app, width 600, height 400) { const id Date.now(); const win document.createElement(div); win.className window; win.id `win-${id}`; win.style.width width + px; win.style.height height + px; win.style.left (100 + windows.length * 30) + px; win.style.top (50 + windows.length * 30) + px; win.style.zIndex ++zIndexCounter; win.innerHTML ` div classtitle-bar onmousedownstartDrag(event, ${id})> div classwindow-title>i classfas ${appsapp?.icon || fa-window-maximize}>/i> ${title}/div> div classwindow-controls> button classcontrol-btn min-btn onclickminimizeWindow(${id})>/button> button classcontrol-btn max-btn onclickmaximizeWindow(${id})>/button> button classcontrol-btn close-btn onclickcloseWindow(${id})>/button> /div> /div> div classwindow-content idcontent-${id}>/div> `; win.onmousedown () > focusWindow(id); document.body.appendChild(win); const winObj { id, title, app, element: win, content: win.querySelector(`#content-${id}`), minimized: false }; windows.push(winObj); renderTaskbar(); return winObj; } function closeWindow(id) { const win document.getElementById(`win-${id}`); if (win) win.remove(); windows windows.filter(w > w.id ! id); renderTaskbar(); } function minimizeWindow(id) { const win document.getElementById(`win-${id}`); win.style.display none; const winObj windows.find(w > w.id id); if (winObj) winObj.minimized true; renderTaskbar(); } function toggleWindow(id) { const winObj windows.find(w > w.id id); if (winObj.minimized) { winObj.element.style.display flex; winObj.minimized false; focusWindow(id); } else { minimizeWindow(id); } renderTaskbar(); } function maximizeWindow(id) { const win document.getElementById(`win-${id}`); if (win.style.width 100%) { win.style.width 600px; win.style.height 400px; win.style.top 50px; win.style.left 50px; } else { win.style.width 100%; win.style.height calc(100% - 48px); // Taskbar height win.style.top 0; win.style.left 0; } } function focusWindow(id) { const win document.getElementById(`win-${id}`); win.style.zIndex ++zIndexCounter; } // Dragging Logic let isDragging false; let dragOffset { x: 0, y: 0 }; let dragWindowId null; function startDrag(e, id) { if (e.target.classList.contains(control-btn)) return; isDragging true; dragWindowId id; const win document.getElementById(`win-${id}`); const rect win.getBoundingClientRect(); dragOffset.x e.clientX - rect.left; dragOffset.y e.clientY - rect.top; focusWindow(id); } window.addEventListener(mousemove, e > { if (isDragging && dragWindowId) { const win document.getElementById(`win-${dragWindowId}`); win.style.left (e.clientX - dragOffset.x) + px; win.style.top (e.clientY - dragOffset.y) + px; } }); window.addEventListener(mouseup, () > { isDragging false; dragWindowId null; }); // --- APPS IMPLEMENTATION --- // 1. Notepad function openNotepad(fileName Untitled.txt, content , fullPath null) { const win createWindow(fileName + - Notepad, Notepad); win.content.innerHTML `textarea classnotepad spellcheckfalse>${content}/textarea>`; win.content.querySelector(textarea).addEventListener(input, (e) > { const val e.target.value; if (fullPath) { // Update file in FS const dirPath getParentPath(fullPath); const name fullPath.split(/).pop(); let dirObj resolvePath(dirPath); // Special case for root files like Desktop/file.txt where parent is Desktop (which is a root key) if (!dirObj && fsdirPath) dirObj fsdirPath; // Special case for files at root C:/file.txt -> parent C: if (!dirObj && dirPath && dirPath.endsWith(:)) dirObj fsdirPath; if (dirObj) { dirObjname val; } } else { // Fallback to Desktop if new file if(fileName ! Untitled.txt && fs.DesktopfileName ! undefined) { fs.DesktopfileName val; } } }); } function openMarkdownViewer(fileName, content) { const win createWindow(fileName + - Viewer, Markdown, 600, 500); win.content.innerHTML `div classmarkdown-content>${marked.parse(content)}/div>`; } // 2. Terminal (Simulated) const terminalStates {}; function openTerminal() { const win createWindow(Terminal, Terminal); terminalStateswin.id { cwd: C:, mode: shell, // shell or python history: , historyIndex: -1 }; win.content.innerHTML ` div classterminal onclickdocument.getElementById(cmd-${win.id}).focus()> div idoutput-${win.id}>Welcome to WebOS Terminal v1.0br>Type help for commands.br>/div> div styledisplay:flex> span classprompt idprompt-${win.id}>C:> /span> input typetext idcmd-${win.id} classcmd-input autocompleteoff> /div> /div> `; const input win.content.querySelector(`#cmd-${win.id}`); input.addEventListener(keydown, (e) > handleTerminalInput(e, win.id, input)); setTimeout(() > input.focus(), 100); } async function handleTerminalInput(e, winId, input) { const state terminalStateswinId; const output document.getElementById(`output-${winId}`); const promptLabel document.getElementById(`prompt-${winId}`); if (e.key Enter) { const cmd input.value.trim(); input.value ; const promptText state.mode python ? >>> : `${state.cwd}> `; output.innerHTML + `div>span classprompt>${promptText}/span> ${cmd}/div>`; if (state.mode python) { processPythonCommand(cmd, winId, output, promptLabel); } else { processShellCommand(cmd, winId, output, promptLabel); } output.scrollTop output.scrollHeight; } } function processShellCommand(cmd, winId, output, promptLabel) { const state terminalStateswinId; const args cmd.split( ); const command args0; if (command help) output.innerHTML + div>Available: help, clear, ls, cd, cat, echo, python, date, whoami/div>; else if (command clear) output.innerHTML ; else if (command ls) { const dir resolvePath(state.cwd); if (dir && typeof dir object) { const items Object.keys(dir).map(k > typeof dirk object ? k + / : k).join( ); output.innerHTML + `div>${items}/div>`; } else { output.innerHTML + `div>Error reading directory/div>`; } } else if (command cd) { const target args1; if (target) { if (target ..) { if(state.cwd.includes(/)) state.cwd state.cwd.substring(0, state.cwd.lastIndexOf(/)); } else { let newPath target; if (!fstarget && !target.includes(:)) { newPath state.cwd + / + target; } newPath newPath.replace(//, /); const dest resolvePath(newPath); if (dest && typeof dest object) { state.cwd newPath; } else { output.innerHTML + `div>Directory not found: ${target}/div>`; } } promptLabel.innerText `${state.cwd}> `; } } else if (command cat) { const file args1; if(file) { let targetPath file; if(!fsfile && !file.includes(:)) targetPath state.cwd + / + file; const parentP getParentPath(targetPath); const fileName targetPath.split(/).pop(); const dirObj resolvePath(parentP || state.cwd); const cwdObj resolvePath(state.cwd); if (cwdObj && cwdObjfile && typeof cwdObjfile string) { output.innerHTML + `div>${cwdObjfile.replace(/\n/g, br>)}/div>`; } else if (dirObj && dirObjfileName && typeof dirObjfileName string) { output.innerHTML + `div>${dirObjfileName.replace(/\n/g, br>)}/div>`; } else { output.innerHTML + `div>File not found/div>`; } } } else if (command date) output.innerHTML + `div>${new Date().toString()}/div>`; else if (command whoami) output.innerHTML + `div>root/div>`; else if (cmd.startsWith(echo )) output.innerHTML + `div>${cmd.substring(5)}/div>`; else if (command python) { state.mode python; promptLabel.innerText >>> ; output.innerHTML + `div>Python 3.9.5 (Yurens Sim)br>Type exit() to return./div>`; } else if (cmd ! ) output.innerHTML + `div>Command not found: ${command}/div>`; } function processPythonCommand(code, winId, output, promptLabel) { const state terminalStateswinId; if (code exit()) { state.mode shell; promptLabel.innerText `${state.cwd}> `; output.innerHTML + `div>Exited Python./div>`; return; } try { let jsCode code .replace(/print\((.*)\)/g, console.log($1); $1) .replace(/def /g, function ); const log console.log; let capturedOutput ; console.log (...args) > capturedOutput.push(args.join( )); let result eval(jsCode); console.log log; if (capturedOutput.length > 0) output.innerHTML + `div>${capturedOutput.join(br>)}/div>`; else if (result ! undefined) output.innerHTML + `div>${result}/div>`; } catch (err) { output.innerHTML + `div stylecolor:red>Traceback: ${err}/div>`; } } // 3. Calculator function openCalculator() { const win createWindow(Calculator, Calculator, 300, 400); win.content.innerHTML ` div classcalc-grid> div classcalc-display idcalc-disp-${win.id}>0/div> button classcalc-btn onclickcalcInput(${win.id}, C)>C/button> button classcalc-btn onclickcalcInput(${win.id}, ()>(/button> button classcalc-btn onclickcalcInput(${win.id}, ))>)/button> button classcalc-btn op onclickcalcInput(${win.id}, /)>//button> button classcalc-btn onclickcalcInput(${win.id}, 7)>7/button> button classcalc-btn onclickcalcInput(${win.id}, 8)>8/button> button classcalc-btn onclickcalcInput(${win.id}, 9)>9/button> button classcalc-btn op onclickcalcInput(${win.id}, *)>*/button> button classcalc-btn onclickcalcInput(${win.id}, 4)>4/button> button classcalc-btn onclickcalcInput(${win.id}, 5)>5/button> button classcalc-btn onclickcalcInput(${win.id}, 6)>6/button> button classcalc-btn op onclickcalcInput(${win.id}, -)>-/button> button classcalc-btn onclickcalcInput(${win.id}, 1)>1/button> button classcalc-btn onclickcalcInput(${win.id}, 2)>2/button> button classcalc-btn onclickcalcInput(${win.id}, 3)>3/button> button classcalc-btn op onclickcalcInput(${win.id}, +)>+/button> button classcalc-btn onclickcalcInput(${win.id}, 0)>0/button> button classcalc-btn onclickcalcInput(${win.id}, .)>./button> button classcalc-btn eq stylegrid-column: span 2 onclickcalcSolve(${win.id})>/button> /div> `; } window.calcInput (id, val) > { const disp document.getElementById(`calc-disp-${id}`); if (disp.innerText 0 && val ! .) disp.innerText val; else if (val C) disp.innerText 0; else disp.innerText + val; }; window.calcSolve (id) > { const disp document.getElementById(`calc-disp-${id}`); try { disp.innerText eval(disp.innerText); } catch { disp.innerText Error; } }; // 4. File Explorer function openExplorer() { const win createWindow(File Explorer, File Explorer, 600, 400); renderExplorer(win.content, C:); } function renderExplorer(container, path) { let currentDir resolvePath(path); if (!currentDir) { // Fallback to C: if path not found path C:; currentDir fsC:; } const parent getParentPath(path); container.innerHTML ` div classexplorer> div classsidebar> div classfile-item onclickrenderExplorer(this.closest(.window-content), C:)>i classfas fa-hdd>/i> C: Drive/div> div classfile-item onclickrenderExplorer(this.closest(.window-content), Desktop)>i classfas fa-desktop>/i> Desktop/div> /div> div classmain-view> div stylewidth: 100%; margin-bottom: 10px; border-bottom: 1px solid #eee; padding-bottom: 5px;> Current: b>${path}/b> ${parent ? `button onclickrenderExplorer(this.closest(.window-content), ${parent}) stylefloat:right>Up/button>` : } /div> ${Object.keys(currentDir).map(item > { const lower item.toLowerCase(); let iconClass fa-file-alt; if (typeof currentDiritem ! string) iconClass fa-folder; else if (lower.endsWith(.md)) iconClass fa-file-code; else if (.jpg,.png,.gif,.webp.some(ext>lower.endsWith(ext))) iconClass fa-file-image; return ` div classfile-item ${typeof currentDiritem string ? file : folder}> i classfas ${iconClass}>/i> span>${item}/span> /div> `}).join()} /div> /div> `; // Add click handlers for navigation const items container.querySelectorAll(.main-view .file-item); items.forEach(item > { if (!item.querySelector(span)) return; // Skip non-file items item.onclick () > { const name item.querySelector(span).innerText; const isFile item.classList.contains(file); if (isFile) openFile(name, currentDirname, path + / + name); else renderExplorer(container, path C: ? path + / + name : path + / + name); // Avoid double slashes if implemented poorly, but split handles it }; }); } // 5. Paint function openPaint() { const win createWindow(Paint, Paint, 600, 500); win.content.innerHTML ` div styledisplay:flex; flex-direction:column; height:100%> div classpaint-toolbar> button onclickchangeColor(${win.id}, black)>Black/button> button onclickchangeColor(${win.id}, red) stylecolor:red>Red/button> button onclickchangeColor(${win.id}, blue) stylecolor:blue>Blue/button> button onclickchangeColor(${win.id}, green) stylecolor:green>Green/button> input typerange min1 max50 value5 onchangechangeSize(${win.id}, this.value)> button onclickclearCanvas(${win.id})>Clear/button> /div> div styleflex:1; overflow:hidden; background:#ccc; display:flex; justify-content:center; align-items:center;> canvas idcanvas-${win.id} width500 height400>/canvas> /div> /div> `; const canvas win.content.querySelector(canvas); const ctx canvas.getContext(2d); ctx.lineCap round; ctx.lineWidth 5; let painting false; canvas.addEventListener(mousedown, (e) > { painting true; draw(e); }); canvas.addEventListener(mouseup, () > painting false); canvas.addEventListener(mousemove, draw); function draw(e) { if (!painting) return; const rect canvas.getBoundingClientRect(); const x e.clientX - rect.left; const y e.clientY - rect.top; ctx.lineTo(x, y); ctx.stroke(); ctx.beginPath(); ctx.moveTo(x, y); } // Store context settings in element for easy access canvas.ctx ctx; } window.changeColor (id, color) > { const c document.getElementById(`canvas-${id}`); c.ctx.strokeStyle color; c.ctx.beginPath(); // Reset path }; window.changeSize (id, size) > { const c document.getElementById(`canvas-${id}`); c.ctx.lineWidth size; }; window.clearCanvas (id) > { const c document.getElementById(`canvas-${id}`); c.ctx.clearRect(0, 0, c.width, c.height); }; // 6. Minesweeper function openMinesweeper() { const win createWindow(Minesweeper, Minesweeper, 400, 400); const size 10; const bombs 15; let grid Array(size * size).fill(0); // Plant bombs for(let i0; ibombs; i++) { let idx; do { idx Math.floor(Math.random() * grid.length); } while(grididx B); grididx B; } // Calculate numbers for(let i0; igrid.length; i++) { if(gridi B) continue; let count 0; const x i % size; const y Math.floor(i / size); for(let dx-1; dx1; dx++) { for(let dy-1; dy1; dy++) { const nx x + dx; const ny y + dy; if(nx > 0 && nx size && ny > 0 && ny size) { if(gridny * size + nx B) count++; } } } gridi count || ; } win.content.innerHTML ` div classminesweeper> div classmine-grid stylegrid-template-columns: repeat(${size}, 1fr);> ${grid.map((val, idx) > ` div classmine-cell idcell-${win.id}-${idx} onclickrevealMine(${win.id}, ${idx}, ${val}) oncontextmenuflagMine(event, ${win.id}, ${idx})>/div> `).join()} /div> /div> `; } window.revealMine (winId, idx, val) > { const cell document.getElementById(`cell-${winId}-${idx}`); if(cell.classList.contains(revealed) || cell.innerHTML.includes(fa-flag)) return; cell.classList.add(revealed); if(val B) { cell.classList.add(bomb); cell.innerHTML i classfas fa-bomb>/i>; setTimeout(() > alert(Game Over!), 100); } else { cell.innerText val; cell.style.color blue, green, red, darkblueval-1 || black; } }; window.flagMine (e, winId, idx) > { e.preventDefault(); const cell document.getElementById(`cell-${winId}-${idx}`); if(cell.classList.contains(revealed)) return; if(cell.innerHTML.includes(fa-flag)) { cell.innerHTML ; cell.style.color ; } else { cell.innerHTML i classfas fa-flag stylecolor:red>/i>; } }; // 7. VS Code (Simulated) function openVSCode() { const win createWindow(VS Code - Project, VS Code, 800, 600); win.content.innerHTML ` div classcode-editor> div stylewidth: 200px; background: #252526; color: #ccc; padding: 10px; font-size: 13px;> div stylepadding: 5px; background: #37373d;>EXPLORER/div> div stylepadding: 5px; padding-left: 15px;>i classfab fa-js>/i> index.js/div> div stylepadding: 5px; padding-left: 15px;>i classfab fa-html5>/i> index.html/div> div stylepadding: 5px; padding-left: 15px;>i classfab fa-css3>/i> styles.css/div> /div> div styleflex: 1; display: flex; flex-direction: column;> div stylebackground: #1e1e1e; color: #fff; padding: 8px; border-bottom: 1px solid #333;> index.js /div> div styleflex: 1; display: flex; background: #1e1e1e;> div classline-numbers stylebackground: #1e1e1e; border:none;>1br>2br>3br>4br>5/div> textarea classcode-area stylebackground: #1e1e1e; color: #d4d4d4; border: none; resize: none; width: 100%; font-family: Consolas, monospace; font-size: 14px; padding: 10px; outline: none;>function init() { console.log(Hello World); const x 100; return x * 2;}/textarea> /div> div styleheight: 20px; background: #007acc; color: white; font-size: 12px; display: flex; align-items: center; padding: 0 10px;> Ready /div> /div> /div> `; } function createFile(name, content) { // Simple create on desktop let finalName name; let counter 1; while(fs.DesktopfinalName ! undefined) { const parts name.split(.); const ext parts.pop(); finalName parts.join(.) + ` (${counter++}).` + ext; } fs.DesktopfinalName content; refreshDesktop(); } function renameFile() { if (!contextTarget) return; const newName prompt(Enter new name:, contextTarget); if (newName && newName ! contextTarget) { if (fs.DesktopnewName ! undefined) { alert(File with that name already exists!); return; } // Preserve content const content fs.DesktopcontextTarget; delete fs.DesktopcontextTarget; fs.DesktopnewName content; refreshDesktop(); } contextTarget null; } function openImageViewer(fileName, content) { const win createWindow(fileName, Photos, 600, 500); win.content.style.background #000; win.content.style.display flex; win.content.style.alignItems center; win.content.style.justifyContent center; // In a real app wed handle Base64 or Blob URLs. // For this demo file system, we assume content is a relative URL if it doesnt start with data: // However, our sync script reads text. For binary images, we might have issues. // If content is Binary Content, we cant show it. // But if we put actual images in the folder, we need sync.sh to handle them. // Assuming for now content is a valid URL or Base64 string. win.content.innerHTML `img src${content} stylemax-width:100%; max-height:100%; object-fit:contain;>`; } // 8. Calendar function openCalendar() { const win createWindow(Calendar, Calendar, 820, 650); win.content.style.overflow hidden; // Prevent double scrollbars win.content.innerHTML ` div stylewidth:100%; height:100%; display:flex; align-items:center; justify-content:center; background:#fff;> iframe styleborder-width: 0; display: block; margin: 0 auto; width:100%; height:100%; srchttps://calendar.google.com/calendar/embed?height600&wkst1&ctzAmerica%2FChicago&showPrint0&showTitle0&showTabs0&modeWEEK&showCalendars0&title&srcYmxhY2toYW8wNDI2QGdtYWlsLmNvbQ&color%23039BE5 frameborder0 scrollingno> /iframe> /div> `; } // 9. Visitor Stat function openVisitorStat() { const win createWindow(Visitor Stat, Visitor Stat, 500, 400); win.content.style.overflow hidden; // Use iframe to isolate and ensure script execution const iframe document.createElement(iframe); iframe.style.width 100%; iframe.style.height 100%; iframe.style.border none; iframe.style.backgroundColor #ffffff; win.content.appendChild(iframe); const doc iframe.contentWindow.document; doc.open(); doc.write(` html> head>style>body { margin: 0; display: flex; justify-content: center; align-items: center; height: 100vh; }/style>/head> body> script typetext/javascript idclustrmaps srchttps://clustrmaps.com/map_v2.js?dxu5mIZCE21Z2ESb6t0JyZh9smA0g8g_qGFaR-fCUIZ0&clffffff&wa>\/script> /body> /html> `); doc.close(); } // --- HELPER FUNCTIONS --- function resolvePath(pathStr) { // Handle Root Paths if (fspathStr) return fspathStr; const parts pathStr.split(/).filter(p > p); let current fs; for (let part of parts) { if (currentpart) { current currentpart; } else if (currentpart + /) { // Handle trailing slash convention if any current currentpart + /; } else { return null; } } return current; } function getParentPath(path) { if(!path.includes(/)) return null; // Root return path.substring(0, path.lastIndexOf(/)); } function getRandomColor() { // Lower saturation colors const colors #CD5C5C, #3CB371, #4682B4, #DA70D6, #D87093, #20B2AA, #778899; return colorsMath.floor(Math.random() * colors.length); } function refreshDesktop() { renderDesktop(); renderStartMenu(); // Also updates start menu in case of changes } // --- INIT --- init(); /script>/body>/html>
View on OTX
|
View on ThreatMiner
Please enable JavaScript to view the
comments powered by Disqus.
Data with thanks to
AlienVault OTX
,
VirusTotal
,
Malwr
and
others
. [
Sitemap
]