diff --git a/android-chrome-144x144.png b/android-chrome-144x144.png
new file mode 100644
index 0000000..827d27b
Binary files /dev/null and b/android-chrome-144x144.png differ
diff --git a/android-chrome-192x192.png b/android-chrome-192x192.png
new file mode 100644
index 0000000..f6035d3
Binary files /dev/null and b/android-chrome-192x192.png differ
diff --git a/android-chrome-256x256.png b/android-chrome-256x256.png
new file mode 100644
index 0000000..e523abb
Binary files /dev/null and b/android-chrome-256x256.png differ
diff --git a/android-chrome-36x36.png b/android-chrome-36x36.png
new file mode 100644
index 0000000..e5ccb0b
Binary files /dev/null and b/android-chrome-36x36.png differ
diff --git a/android-chrome-384x384.png b/android-chrome-384x384.png
new file mode 100644
index 0000000..5648b26
Binary files /dev/null and b/android-chrome-384x384.png differ
diff --git a/android-chrome-48x48.png b/android-chrome-48x48.png
new file mode 100644
index 0000000..cec0b94
Binary files /dev/null and b/android-chrome-48x48.png differ
diff --git a/android-chrome-512x512.png b/android-chrome-512x512.png
new file mode 100644
index 0000000..a0a5c94
Binary files /dev/null and b/android-chrome-512x512.png differ
diff --git a/android-chrome-72x72.png b/android-chrome-72x72.png
new file mode 100644
index 0000000..5532f6e
Binary files /dev/null and b/android-chrome-72x72.png differ
diff --git a/android-chrome-96x96.png b/android-chrome-96x96.png
new file mode 100644
index 0000000..5b05ac3
Binary files /dev/null and b/android-chrome-96x96.png differ
diff --git a/apple-touch-icon-114x114-precomposed.png b/apple-touch-icon-114x114-precomposed.png
new file mode 100644
index 0000000..223055f
Binary files /dev/null and b/apple-touch-icon-114x114-precomposed.png differ
diff --git a/apple-touch-icon-114x114.png b/apple-touch-icon-114x114.png
new file mode 100644
index 0000000..478a440
Binary files /dev/null and b/apple-touch-icon-114x114.png differ
diff --git a/apple-touch-icon-120x120-precomposed.png b/apple-touch-icon-120x120-precomposed.png
new file mode 100644
index 0000000..4095e6d
Binary files /dev/null and b/apple-touch-icon-120x120-precomposed.png differ
diff --git a/apple-touch-icon-120x120.png b/apple-touch-icon-120x120.png
new file mode 100644
index 0000000..4095e6d
Binary files /dev/null and b/apple-touch-icon-120x120.png differ
diff --git a/apple-touch-icon-144x144-precomposed.png b/apple-touch-icon-144x144-precomposed.png
new file mode 100644
index 0000000..bceaef2
Binary files /dev/null and b/apple-touch-icon-144x144-precomposed.png differ
diff --git a/apple-touch-icon-144x144.png b/apple-touch-icon-144x144.png
new file mode 100644
index 0000000..bceaef2
Binary files /dev/null and b/apple-touch-icon-144x144.png differ
diff --git a/apple-touch-icon-152x152-precomposed.png b/apple-touch-icon-152x152-precomposed.png
new file mode 100644
index 0000000..b1004ce
Binary files /dev/null and b/apple-touch-icon-152x152-precomposed.png differ
diff --git a/apple-touch-icon-152x152.png b/apple-touch-icon-152x152.png
new file mode 100644
index 0000000..b1004ce
Binary files /dev/null and b/apple-touch-icon-152x152.png differ
diff --git a/apple-touch-icon-180x180-precomposed.png b/apple-touch-icon-180x180-precomposed.png
new file mode 100644
index 0000000..c64ec9b
Binary files /dev/null and b/apple-touch-icon-180x180-precomposed.png differ
diff --git a/apple-touch-icon-180x180.png b/apple-touch-icon-180x180.png
new file mode 100644
index 0000000..c64ec9b
Binary files /dev/null and b/apple-touch-icon-180x180.png differ
diff --git a/apple-touch-icon-57x57-precomposed.png b/apple-touch-icon-57x57-precomposed.png
new file mode 100644
index 0000000..20cc44c
Binary files /dev/null and b/apple-touch-icon-57x57-precomposed.png differ
diff --git a/apple-touch-icon-57x57.png b/apple-touch-icon-57x57.png
new file mode 100644
index 0000000..abde634
Binary files /dev/null and b/apple-touch-icon-57x57.png differ
diff --git a/apple-touch-icon-60x60-precomposed.png b/apple-touch-icon-60x60-precomposed.png
new file mode 100644
index 0000000..58d2895
Binary files /dev/null and b/apple-touch-icon-60x60-precomposed.png differ
diff --git a/apple-touch-icon-60x60.png b/apple-touch-icon-60x60.png
new file mode 100644
index 0000000..58d2895
Binary files /dev/null and b/apple-touch-icon-60x60.png differ
diff --git a/apple-touch-icon-72x72-precomposed.png b/apple-touch-icon-72x72-precomposed.png
new file mode 100644
index 0000000..f3eb48f
Binary files /dev/null and b/apple-touch-icon-72x72-precomposed.png differ
diff --git a/apple-touch-icon-72x72.png b/apple-touch-icon-72x72.png
new file mode 100644
index 0000000..f3eb48f
Binary files /dev/null and b/apple-touch-icon-72x72.png differ
diff --git a/apple-touch-icon-76x76-precomposed.png b/apple-touch-icon-76x76-precomposed.png
new file mode 100644
index 0000000..6564b79
Binary files /dev/null and b/apple-touch-icon-76x76-precomposed.png differ
diff --git a/apple-touch-icon-76x76.png b/apple-touch-icon-76x76.png
new file mode 100644
index 0000000..6564b79
Binary files /dev/null and b/apple-touch-icon-76x76.png differ
diff --git a/apple-touch-icon-precomposed.png b/apple-touch-icon-precomposed.png
new file mode 100644
index 0000000..c64ec9b
Binary files /dev/null and b/apple-touch-icon-precomposed.png differ
diff --git a/apple-touch-icon.png b/apple-touch-icon.png
new file mode 100644
index 0000000..c64ec9b
Binary files /dev/null and b/apple-touch-icon.png differ
diff --git a/browserconfig.xml b/browserconfig.xml
new file mode 100644
index 0000000..5cd27e3
--- /dev/null
+++ b/browserconfig.xml
@@ -0,0 +1,9 @@
+
+
";
+ };
+ }
+ function getLastInsertID(){
+ if($this->isConnected){
+ return $this->DBLink->lastInsertRowID();
+ };
+ return -1;
+ }
+ function getDebugLog(){
+ return $this->DebugLog;
+ }
+ function __destruct(){
+ if( $this->isConnected ){
+ $this->DBLink->close();
+ unset( $this->DBLink );
+ };
+ }
+}
+
+
+
+
+?>
\ No newline at end of file
diff --git a/lib/scripts/distro_web_utils.php b/lib/scripts/distro_web_utils.php
index 70c8c97..357d6bc 100644
--- a/lib/scripts/distro_web_utils.php
+++ b/lib/scripts/distro_web_utils.php
@@ -3,6 +3,15 @@ function print_PAGE_HEADER( $JavaMode = 0 ){
?>
| Application Info | |||||
| Enable Web Application | |||||
| Disable Web Application | |||||
| Setup Now! | |||||
| Argus Application Panel | |||||
| Stop Backend Engine | + +Start Backend Engine | + + +Stop Web User Interface | + +Stop Web User Interface | + +Wipe History Data | +Reset to Factory Defaults | +
| Disable WANEnable WAN WAN | Package Installer | diff --git a/lib/scripts/sys_utils.php b/lib/scripts/sys_utils.php index 163321e..48f7fe1 100644 --- a/lib/scripts/sys_utils.php +++ b/lib/scripts/sys_utils.php @@ -1,6 +1,13 @@ &1 `; + if( $JOJO == '' ) return false; + $TArr = explode( "\n", $JOJO ); + foreach( $TArr as $T ){ + $CC = trim( $T ); + if( $CC == '' ) continue; + if( ( stripos( $T, 'ps' ) === false ) && ( stripos( $T, 'grep' ) === false ) && ( stripos( $T, 'sshd' ) === false ) ) return true; + }; + return false; +}; + function stop_BACKEND_APPLICATION(){ - $L = `killall starProcDaemon`; + if( process_is_running('starProcDaemon') ){ + $L = `killall starProcDaemon`; + sleep( 1 ); + }; + if( process_is_running('mojo_d') ){ + $L = `killall mojo_d`; + sleep( 4 ); + }; + if( process_is_running('mojo') ){ + $L = `killall mojo`; + sleep( 4 ); + }; + /// Shutdown Argus Web UI + if( process_is_running( array( 'nginx', 'master process' ), 'ag_nginx' ) ){ + $L = `systemctl stop nginx.service`; + sleep( 1 ); + }; + // Fix unclosed Databases + if( file_exists( '/srv/www/web/lib/controller/data/mysqlitedb.db' ) ){ + $DATABASE = new SQLite_DB( '/srv/www/web/lib/controller/data/mysqlitedb.db'); + unset( $DATABASE ); + }; + + if( file_exists( '/srv/www/web/lib/controller/data/reports.db' ) ){ + $DATABASE = new SQLite_DB( '/srv/www/web/lib/controller/data/reports.db'); + unset( $DATABASE ); + }; +}; + +function start_BACKEND_APPLICATION(){ + $CWD = getcwd(); + chdir( '/srv/start' ); + $L = `./starProcDaemon`; sleep( 1 ); - $L = `killall mojo_d`; - sleep(4); - $L = `killall mojo`; - sleep(4); + chdir( $CWD ); + if( !process_is_running( array( 'nginx', 'master process' ), 'ag_nginx' ) ){ + $L = `systemctl start nginx.service`; + sleep( 1 ); + }; }; function verify_CERT( $ROOT, $CHEK ){ @@ -676,4 +753,38 @@ function list_AP_NEARBY( $DEV ){ return $RV; }; +function get_argus_config(){ + $RV = array(); + $RV['app_is_running'] = process_is_running( '/srv/mojo/mojo' ); + if( !$RV['app_is_running'] ) $RV['app_is_running'] = process_is_running( '/srv/mojo/mojo_d' ); + $RV['webui_is_running'] = process_is_running( array ( 'nginx', 'master' ), 'ag_nginx' ); + return $RV; +}; + +function set_factory_settings(){ + stop_BACKEND_APPLICATION(); + $R = `rm -f -R /srv/www/web/lib/controller/data/uploads/*`; + $R = `rm -f -R /srv/www/web/lib/controller/data/device_draws/*`; + $R = `rm -f -R /srv/www/web/lib/controller/data/videos/*`; + $SRC = '/srv/www/distro/lib/data/mysqlitedb.db'; + $DST = '/srv/www/web/lib/controller/data/mysqlitedb.db'; + $R = `rm -f $DST`; + $C = `cp $SRC $DST`; + $SRC = '/srv/www/distro/lib/data/reports.db'; + $DST = '/srv/www/web/lib/controller/data/reports.db'; + $R = `rm -f $DST`; + $C = `cp $SRC $DST`; + start_BACKEND_APPLICATION(); +}; + +function clear_history(){ + stop_BACKEND_APPLICATION(); + $R = `rm -f -R /srv/www/web/lib/controller/data/videos/*`; + $SRC = '/srv/www/distro/lib/data/reports.db'; + $DST = '/srv/www/web/lib/controller/data/reports.db'; + $R = `rm -f $DST`; + $C = `cp $SRC $DST`; + start_BACKEND_APPLICATION(); +}; + ?> \ No newline at end of file diff --git a/lib/scripts/test.php b/lib/scripts/test.php new file mode 100644 index 0000000..5972875 --- /dev/null +++ b/lib/scripts/test.php @@ -0,0 +1,15 @@ + \ No newline at end of file diff --git a/lib/sysroot/srv/etc/after_boot.sh b/lib/sysroot/srv/etc/after_boot.sh new file mode 100755 index 0000000..f2bca6e --- /dev/null +++ b/lib/sysroot/srv/etc/after_boot.sh @@ -0,0 +1,10 @@ +#!/bin/sh + + + +#remove old task + +rm -f /srv/etc/cron.json +rm -f /srv/etc/cron.lock + +/usr/bin/php /srv/etc/boot.php diff --git a/lib/sysroot/srv/etc/boot.php b/lib/sysroot/srv/etc/boot.php new file mode 100644 index 0000000..3cd5474 --- /dev/null +++ b/lib/sysroot/srv/etc/boot.php @@ -0,0 +1,13 @@ + + diff --git a/lib/sysroot/srv/etc/check_wifi.sh b/lib/sysroot/srv/etc/check_wifi.sh new file mode 100755 index 0000000..05a7907 --- /dev/null +++ b/lib/sysroot/srv/etc/check_wifi.sh @@ -0,0 +1,2 @@ +#!/bin/bash + diff --git a/lib/sysroot/srv/etc/cron.php b/lib/sysroot/srv/etc/cron.php new file mode 100644 index 0000000..bc2d010 --- /dev/null +++ b/lib/sysroot/srv/etc/cron.php @@ -0,0 +1,206 @@ + \ No newline at end of file diff --git a/lib/sysroot/srv/etc/cron_job.sh b/lib/sysroot/srv/etc/cron_job.sh new file mode 100755 index 0000000..5f66633 --- /dev/null +++ b/lib/sysroot/srv/etc/cron_job.sh @@ -0,0 +1,12 @@ +#!/bin/bash + +if [ ! -f "/srv/etc/cron.lock" ]; then + if [ -f "/srv/etc/cron.json" ]; then + touch /srv/etc/cron.lock + /usr/bin/php /srv/etc/cron.php + rm /srv/etc/cron.json + rm /srv/etc/cron.lock + else + /usr/bin/php /srv/etc/pereodical.php + fi +fi diff --git a/lib/sysroot/srv/etc/enable_wifi.php b/lib/sysroot/srv/etc/enable_wifi.php deleted file mode 100644 index dc10d56..0000000 --- a/lib/sysroot/srv/etc/enable_wifi.php +++ /dev/null @@ -1,4 +0,0 @@ - \ No newline at end of file diff --git a/lib/sysroot/srv/etc/pereodical.php b/lib/sysroot/srv/etc/pereodical.php new file mode 100644 index 0000000..3be240d --- /dev/null +++ b/lib/sysroot/srv/etc/pereodical.php @@ -0,0 +1,4 @@ + \ No newline at end of file diff --git a/lib/sysroot/srv/etc/repair_database.sh b/lib/sysroot/srv/etc/repair_database.sh deleted file mode 100644 index affb7a6..0000000 --- a/lib/sysroot/srv/etc/repair_database.sh +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/bash - -/usr/bin/php /srv/vault/lib/repair_database.php - diff --git a/lib/sysroot/srv/etc/ssl/tmp/rootCA.crt b/lib/sysroot/srv/etc/rootCA.crt similarity index 100% rename from lib/sysroot/srv/etc/ssl/tmp/rootCA.crt rename to lib/sysroot/srv/etc/rootCA.crt diff --git a/lib/sysroot/srv/etc/system.json b/lib/sysroot/srv/etc/system.json new file mode 100644 index 0000000..00db451 --- /dev/null +++ b/lib/sysroot/srv/etc/system.json @@ -0,0 +1 @@ +{"NET_CONFIG":{"lo":{"flags":{"hotplug":0,"auto":0},"net":[],"fam":"inet","mode":"loopback"},"eth0":{"flags":{"hotplug":1,"auto":1},"net":[],"fam":"inet","mode":"dhcp"}},"SAMBA_IS_ON":true,"ARGUS_CONFIG":{"app_is_running":false,"webui_is_running":true}} \ No newline at end of file diff --git a/mstile-144x144.png b/mstile-144x144.png new file mode 100644 index 0000000..bba9b75 Binary files /dev/null and b/mstile-144x144.png differ diff --git a/mstile-150x150.png b/mstile-150x150.png new file mode 100644 index 0000000..5d2b3f2 Binary files /dev/null and b/mstile-150x150.png differ diff --git a/safari-pinned-tab.svg b/safari-pinned-tab.svg new file mode 100644 index 0000000..d7da1e2 --- /dev/null +++ b/safari-pinned-tab.svg @@ -0,0 +1,59 @@ + + + diff --git a/site.webmanifest b/site.webmanifest new file mode 100644 index 0000000..b5c746b --- /dev/null +++ b/site.webmanifest @@ -0,0 +1,54 @@ +{ + "name": "Argus Platform", + "short_name": "Argus Platform", + "icons": [ + { + "src": "/android-chrome-36x36.png", + "sizes": "36x36", + "type": "image/png" + }, + { + "src": "/android-chrome-48x48.png", + "sizes": "48x48", + "type": "image/png" + }, + { + "src": "/android-chrome-72x72.png", + "sizes": "72x72", + "type": "image/png" + }, + { + "src": "/android-chrome-96x96.png", + "sizes": "96x96", + "type": "image/png" + }, + { + "src": "/android-chrome-144x144.png", + "sizes": "144x144", + "type": "image/png" + }, + { + "src": "/android-chrome-192x192.png", + "sizes": "192x192", + "type": "image/png" + }, + { + "src": "/android-chrome-256x256.png", + "sizes": "256x256", + "type": "image/png" + }, + { + "src": "/android-chrome-384x384.png", + "sizes": "384x384", + "type": "image/png" + }, + { + "src": "/android-chrome-512x512.png", + "sizes": "512x512", + "type": "image/png" + } + ], + "theme_color": "#ffffff", + "background_color": "#ffffff", + "display": "standalone" +} diff --git a/style/favicon_package_v0.16 (2).zip b/style/favicon_package_v0.16 (2).zip new file mode 100644 index 0000000..337b8ad Binary files /dev/null and b/style/favicon_package_v0.16 (2).zip differ diff --git a/style/images/017.png b/style/images/017.png new file mode 100644 index 0000000..899463d Binary files /dev/null and b/style/images/017.png differ diff --git a/style/images/042.png b/style/images/042.png new file mode 100644 index 0000000..2ae96d0 Binary files /dev/null and b/style/images/042.png differ diff --git a/style/images/043.png b/style/images/043.png new file mode 100644 index 0000000..159f365 Binary files /dev/null and b/style/images/043.png differ diff --git a/style/images/048.png b/style/images/048.png new file mode 100644 index 0000000..88f0f8a Binary files /dev/null and b/style/images/048.png differ diff --git a/style/images/051.png b/style/images/051.png new file mode 100644 index 0000000..c35305b Binary files /dev/null and b/style/images/051.png differ diff --git a/style/images/055.png b/style/images/055.png new file mode 100644 index 0000000..e682245 Binary files /dev/null and b/style/images/055.png differ diff --git a/style/style.css b/style/style.css index 7a65d33..95ccf59 100644 --- a/style/style.css +++ b/style/style.css @@ -110,6 +110,12 @@ body{ .task_panel_btn#samba_stop{ background-image: url('images/009.png');} .task_panel_btn#samba_start{ background-image: url('images/024.png');} .task_panel_btn#pkg_install{ background-image: url('images/007.png');} +.task_panel_btn#histowipe{ background-image: url('images/048.png');} +.task_panel_btn#wui_stop{ background-image: url('images/051.png');} +.task_panel_btn#be_stop{ background-image: url('images/042.png');} +.task_panel_btn#be_start{ background-image: url('images/043.png');} +.task_panel_btn#wui_start{ background-image: url('images/055.png');} +.task_panel_btn#wan_cp{ background-image: url('images/017.png');} .task_panel_btn:hover{ color: black; border: black 2px solid; diff --git a/task_confirm.php b/task_confirm.php new file mode 100644 index 0000000..52ba655 --- /dev/null +++ b/task_confirm.php @@ -0,0 +1,18 @@ + -1 ){ + print_PAGE_HEADER( 1 ); + print_TASK_CONFIRM( $CTID ); + print_PAGE_BOTTOM(); + exit(); + }; + header( 'loaction: /' ); +?> \ No newline at end of file diff --git a/wan_cp.php b/wan_cp.php new file mode 100644 index 0000000..b71357e --- /dev/null +++ b/wan_cp.php @@ -0,0 +1,18 @@ + \ No newline at end of file