diff --git a/apps b/apps new file mode 120000 index 0000000..b27e784 --- /dev/null +++ b/apps @@ -0,0 +1 @@ +/home/surillya/.apps/ \ No newline at end of file diff --git a/apps.php b/apps.php new file mode 100644 index 0000000..52cb6fe --- /dev/null +++ b/apps.php @@ -0,0 +1,33 @@ + $id, + 'name' => $data['name'], + 'icon' => 'apps/' . $id . '/' . $data['icon'], + 'path' => 'apps/' . $id . '/app/' . $data['entry'] + ]; + } + } +} + +header('Content-Type: application/json'); +echo json_encode($apps); diff --git a/config.php b/config.php new file mode 100644 index 0000000..77b9971 --- /dev/null +++ b/config.php @@ -0,0 +1,7 @@ + diff --git a/connect_wifi.php b/connect_wifi.php new file mode 100644 index 0000000..b7d2a4a --- /dev/null +++ b/connect_wifi.php @@ -0,0 +1,27 @@ + false, 'error' => 'Missing SSID or password']); + exit; +} + +// Sanitize inputs (very basic — assume safe env or sandbox it!) +$ssidSafe = escapeshellarg($ssid); +$passwordSafe = escapeshellarg($password); + +// Attempt to connect using nmcli +$command = "nmcli dev wifi connect $ssidSafe password $passwordSafe"; +$output = shell_exec($command); + +// Check result +if (strpos($output, 'successfully activated') !== false) { + echo json_encode(['success' => true]); +} else { + echo json_encode(['success' => false, 'error' => trim($output)]); +} +?> diff --git a/delete.php b/delete.php new file mode 100644 index 0000000..acda6f6 --- /dev/null +++ b/delete.php @@ -0,0 +1,38 @@ + false, 'error' => 'Missing path']); + exit; +} + +// Resolve path properly +$delFullPath = realpath($rootDir . '/' . ltrim($data['path'], '/')); + +// Validate path +if (!$delFullPath || strpos($delFullPath, $rootDir) !== 0) { + echo json_encode(['success' => false, 'error' => 'Invalid path']); + exit; +} + +// Recursive deletion +function deleteRecursively($path) { + if (is_dir($path)) { + $items = scandir($path); + foreach ($items as $item) { + if ($item === '.' || $item === '..') continue; + deleteRecursively($path . DIRECTORY_SEPARATOR . $item); + } + return rmdir($path); + } elseif (is_file($path)) { + return unlink($path); + } + return false; +} + +if (deleteRecursively($delFullPath)) { + echo json_encode(['success' => true]); +} else { + echo json_encode(['success' => false, 'error' => 'Delete failed']); +} diff --git a/explorer.php b/explorer.php new file mode 100644 index 0000000..479cbe2 --- /dev/null +++ b/explorer.php @@ -0,0 +1,298 @@ + + + + +
+ +Current directory:
Let's get things set up for the best experience.
+ +Select a network to continue setup
+Welcome to THOS, !
+h?l[c][f]=s+1:n.charAt(c-1)===i.charAt(f-1)?l[c][f]=l[c-1][f-1]:l[c][f]=Math.min(l[c-1][f-1]+1,Math.min(l[c][f-1]+1,l[c-1][f]+1)),l[c][f]
+ This app hasn’t been verified by THOS. Installing untrusted packages may put your system at risk.
+ Only continue if you trust this app and its source. The app has been installed successfully. Something went wrong. Check your server logs for more details. This app is ready to be installed into your system. Continue?{u();function Xg(r,e){var t=r.type,i=r.value,n,s;return e&&(s=e(r))!==void 0?s:t==="word"||t==="space"?i:t==="string"?(n=r.quote||"",n+i+(r.unclosed?"":n)):t==="comment"?"/*"+i+(r.unclosed?"":"*/"):t==="div"?(r.before||"")+i+(r.after||""):Array.isArray(r.nodes)?(n=Zg(r.nodes,e),t!=="function"?n:i+"("+(r.before||"")+n+(r.after||"")+(r.unclosed?"":")")):i}function Zg(r,e){var t,i;if(Array.isArray(r)){for(t="",i=r.length-1;~i;i-=1)t=Xg(r[i],e)+t;return t}return Xg(r,e)}Jg.exports=Zg});var ry=x((lq,ty)=>{u();var Cs="-".charCodeAt(0),_s="+".charCodeAt(0),Fl=".".charCodeAt(0),j2="e".charCodeAt(0),z2="E".charCodeAt(0);function U2(r){var e=r.charCodeAt(0),t;if(e===_s||e===Cs){if(t=r.charCodeAt(1),t>=48&&t<=57)return!0;var i=r.charCodeAt(2);return t===Fl&&i>=48&&i<=57}return e===Fl?(t=r.charCodeAt(1),t>=48&&t<=57):e>=48&&e<=57}ty.exports=function(r){var e=0,t=r.length,i,n,s;if(t===0||!U2(r))return!1;for(i=r.charCodeAt(e),(i===_s||i===Cs)&&e++;e{u();function Gy(r,e){var t=r.type,i=r.value,n,s;return e&&(s=e(r))!==void 0?s:t==="word"||t==="space"?i:t==="string"?(n=r.quote||"",n+i+(r.unclosed?"":n)):t==="comment"?"/*"+i+(r.unclosed?"":"*/"):t==="div"?(r.before||"")+i+(r.after||""):Array.isArray(r.nodes)?(n=Qy(r.nodes,e),t!=="function"?n:i+"("+(r.before||"")+n+(r.after||"")+(r.unclosed?"":")")):i}function Qy(r,e){var t,i;if(Array.isArray(r)){for(t="",i=r.length-1;~i;i-=1)t=Gy(r[i],e)+t;return t}return Gy(r,e)}Yy.exports=Qy});var Zy=x((o$,Xy)=>{u();var $s="-".charCodeAt(0),Ls="+".charCodeAt(0),su=".".charCodeAt(0),vO="e".charCodeAt(0),xO="E".charCodeAt(0);function kO(r){var e=r.charCodeAt(0),t;if(e===Ls||e===$s){if(t=r.charCodeAt(1),t>=48&&t<=57)return!0;var i=r.charCodeAt(2);return t===su&&i>=48&&i<=57}return e===su?(t=r.charCodeAt(1),t>=48&&t<=57):e>=48&&e<=57}Xy.exports=function(r){var e=0,t=r.length,i,n,s;if(t===0||!kO(r))return!1;for(i=r.charCodeAt(e),(i===Ls||i===$s)&&e++;eTHOS Tasks
+
+
+
+
+
+
+
+
+ CPU 1m
+ CPU 5m
+ CPU 15m
+ RAM Usage
+ Disk Usage
+
+
+
+ Loading...
+ Loading...
+ Loading...
+ Loading...
+ Loading...
+
+
+
+
+
+
+
+
diff --git a/thp.php b/thp.php
new file mode 100644
index 0000000..d4b4c41
--- /dev/null
+++ b/thp.php
@@ -0,0 +1,114 @@
+
+
+
+
+
+
+
+
+ Title
+ URL
+ Actions
+
+
+ Loading tasks... Unverified App Installation
+
+ Success!
+
+ Installation Failed
+
+ Install {$appName}?
+
+🎵 = $filename ?>
+
+
+
+
\ No newline at end of file
diff --git a/wallpapers.php b/wallpapers.php
new file mode 100644
index 0000000..ce69a5a
--- /dev/null
+++ b/wallpapers.php
@@ -0,0 +1,49 @@
+
+
+
+
+
+ Wallpaper Picker
+
+