diff --git a/commands/su.json b/commands/su.json
index 49c6758..ff7441c 100644
--- a/commands/su.json
+++ b/commands/su.json
@@ -184,6 +184,22 @@
{
shell.json[i] = blashrc[i];
}
+
+ if ( blashrc['banner'] )
+ {
+ if ( document.getElementById ( 'banner' ))
+ {
+ document.getElementById ( 'banner' ).innerHTML = blashrc['banner'] + '
';
+ }
+ }
+
+ if ( blashrc['promptText'] )
+ {
+ if ( document.getElementById ( 'promptText' ))
+ {
+ document.getElementById ( 'promptText' ).innerHTML = shell.unescapePrompt ( blashrc['promptText'], shell.json.promptSequences );
+ }
+ }
}
if ( stylercIndex > 0 )
diff --git a/modules/users/users.php b/modules/users/users.php
index 2dd64a3..f354781 100644
--- a/modules/users/users.php
+++ b/modules/users/users.php
@@ -351,6 +351,36 @@ switch ( $action )
print set_content ( $file, $content );
break;
+ case 'list':
+ if ( !( $xml = new SimpleXMLElement ( $xmlcontent )))
+ {
+ print "Unable to open the users XML file\n";
+ return false;
+ }
+
+ $users = array();
+
+ for ( $i = 0; $i < count ( $xml->user ); $i++ )
+ {
+ array_push ( $users, $xml->user[$i]['name'] );
+ }
+
+ sort ( $users, SORT_STRING );
+
+ foreach ( $users as $i => $user )
+ {
+ print $user;
+
+ if ( $i < count ( $users ) - 1 )
+ {
+ print "
";
+ }
+
+ print "\n";
+ }
+
+ break;
+
default :
print "Unallowed action\n";
break;
diff --git a/system/blash.js b/system/blash.js
index 1f3308c..2a663ad 100644
--- a/system/blash.js
+++ b/system/blash.js
@@ -268,6 +268,22 @@ function blash ()
{
shell.json[i] = blashrc[i];
}
+
+ if ( blashrc['banner'] )
+ {
+ if ( document.getElementById ( 'banner' ))
+ {
+ document.getElementById ( 'banner' ).innerHTML = blashrc['banner'] + '
';
+ }
+ }
+
+ if ( blashrc['promptText'] )
+ {
+ if ( document.getElementById ( 'promptText' ))
+ {
+ document.getElementById ( 'promptText' ).innerHTML = shell.unescapePrompt ( blashrc['promptText'], shell.json.promptSequences );
+ }
+ }
}
if ( stylercIndex > 0 )
diff --git a/system/blash.json b/system/blash.json
index 815d0ee..73f265d 100644
--- a/system/blash.json
+++ b/system/blash.json
@@ -74,6 +74,7 @@
"touch",
"useradd",
"userdel",
+ "users",
"whoami"
]
}
diff --git a/system/default_blashrc.json b/system/default_blashrc.json
index f7e7427..bf96659 100644
--- a/system/default_blashrc.json
+++ b/system/default_blashrc.json
@@ -3,7 +3,7 @@
*/
{
- "banner" : "Welcome back to blash
",
+ "banner" : "Welcome back to blash",
"machine" : "localhost",
/**
diff --git a/system/files.json b/system/files.json
index 88e16e4..3999359 100644
--- a/system/files.json
+++ b/system/files.json
@@ -33,26 +33,6 @@
"path" : "/home",
"type" : "directory"
},
- {
- "path" : "/home/guest",
- "type" : "directory"
- },
- {
- "path" : "/home/guest/mbox",
- "type" : "file",
- "content" : "No new mail"
- },
- {
- "path" : "/home/blacklight",
- "type" : "directory",
- "can_read" : "blacklight",
- "can_write" : "blacklight"
- },
- {
- "path" : "/home/blacklight/mbox",
- "type" : "file",
- "content" : "No new mail"
- },
{
"path" : "/google",
"type" : "file",