that holds the close button/link. No styling is required, but you'll likely want some. */
32 | #tipped-closer-wrapper {
33 | display:none;
34 | text-align:center;
35 | margin: 0px;
36 | }
37 |
38 | /* The
that is the close button/link. No styling is required, but you'll likely want some. */
39 | #tipped-closer {
40 | display:none;
41 | border:2px outset #999;
42 | background-color:#CCC;
43 | }
44 |
--------------------------------------------------------------------------------
/endpoints/lib/auth/WebAuth.php:
--------------------------------------------------------------------------------
1 | false,
10 | 'canLogout' => false
11 | );
12 |
13 | var $config = array(
14 | 'serverUserKey' => 'REMOTE_USER'
15 | );
16 |
17 | function phpvbAuthWebAuth($userConfig = null) {
18 | if($userConfig) $this->config = array_merge($this->config,$userConfig);
19 | }
20 |
21 | function login($username, $password)
22 | {
23 | }
24 |
25 | function autoLoginHook()
26 | {
27 | global $_SESSION;
28 | // WebAuth passthrough
29 | if ( isset($_SERVER[$this->config['serverUserKey']]) )
30 | {
31 | $_SESSION['valid'] = true;
32 | $_SESSION['user'] = $_SERVER[$this->config['serverUserKey']];
33 | $_SESSION['admin'] = (!$this->config['adminUser']) || ($_SESSION['user'] == $this->config['adminUser']);
34 | $_SESSION['authCheckHeartbeat'] = time();
35 | }
36 | }
37 |
38 | function heartbeat($vbox)
39 | {
40 | global $_SESSION;
41 | if ( isset($_SERVER[$this->config['serverUserKey']]) )
42 | {
43 | $_SESSION['valid'] = true;
44 | $_SESSION['authCheckHeartbeat'] = time();
45 | }
46 | }
47 |
48 | function changePassword($old, $new)
49 | {
50 | }
51 |
52 | function logout(&$response)
53 | {
54 | $response['data']['result'] = 1;
55 | if ( isset($this->config['logoutURL']) )
56 | {
57 | $response['data']['url'] = $this->config['logoutURL'];
58 | }
59 | }
60 |
61 | function listUsers()
62 | {
63 |
64 | }
65 |
66 | function updateUser($vboxRequest, $skipExistCheck)
67 | {
68 |
69 | }
70 |
71 | function deleteUser($user)
72 | {
73 |
74 | }
75 | }
76 |
--------------------------------------------------------------------------------
/panes/vmmISCSI.html:
--------------------------------------------------------------------------------
1 |
8 |
46 |
--------------------------------------------------------------------------------
/panes/about.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
Copyright (C) 2010-2015 Ian Moore (imoore76 at yahoo dot com) - LICENSE
5 |
http://sourceforge.net/projects/phpvirtualbox/
6 |
7 | I develop and support phpVirtualBox in my spare time - free of charge. I do not receive payments from VirtualBox (Oracle) nor am
8 | I affiliated with them in any way. If you find this program useful, I ask that you please donate.
9 |
10 |
11 |
12 |
13 |
14 |
15 | VirtualBox 6.0.* adaptation by Pasha1st
16 |
17 |
https://github.com/pasha1st/phpvirtualbox-6
18 |
19 | 
20 | WebMoney WMZ: Z292591296225
21 | BitCoin: 1BsCFRCkwdcGmGDm1F8qqkm4Dcai5XtEaM
22 |
23 |
29 |
--------------------------------------------------------------------------------
/recovery.php-disabled:
--------------------------------------------------------------------------------
1 | skipSessionCheck = true;
39 | $vbox->connect();
40 |
41 | $vbox->vbox->setExtraData('phpvb/users/admin/pass', hash('sha512', 'admin'));
42 | $vbox->vbox->setExtraData('phpvb/users/admin/admin', '1');
43 | echo("Admin account updated. Please rename this file to recovery.php-disabled. phpVirtualBox will refuse to run if this has not been done.");
44 |
45 | } catch (Exception $e) {
46 | echo("");
47 | print_r($e);
48 | echo("");
49 | }
50 | return;
51 | }
52 |
53 | ?>
54 |
55 |
56 | Admin Account Recovery
57 |
58 |
59 | Admin Account Recovery
60 | This form will add the default user admin with a default password of admin. If the user admin already exists, its password will be changed to admin.
61 | Click the Recover button to add / update this user.
62 |
68 |
69 |
70 |
71 |
--------------------------------------------------------------------------------
/js/jquery.scrollTo-min.js:
--------------------------------------------------------------------------------
1 | /**
2 | * jQuery.ScrollTo - Easy element scrolling using jQuery.
3 | * Copyright (c) 2007-2009 Ariel Flesler - aflesler(at)gmail(dot)com | http://flesler.blogspot.com
4 | * Dual licensed under MIT and GPL.
5 | * Date: 5/25/2009
6 | * @author Ariel Flesler
7 | * @version 1.4.2
8 | *
9 | * http://flesler.blogspot.com/2007/10/jqueryscrollto.html
10 | */
11 | ;(function(d){var k=d.scrollTo=function(a,i,e){d(window).scrollTo(a,i,e)};k.defaults={axis:'xy',duration:parseFloat(d.fn.jquery)>=1.3?0:1};k.window=function(a){return d(window)._scrollable()};d.fn._scrollable=function(){return this.map(function(){var a=this,i=!a.nodeName||d.inArray(a.nodeName.toLowerCase(),['iframe','#document','html','body'])!=-1;if(!i)return a;var e=(a.contentWindow||a).document||a.ownerDocument||a;return d.browser.safari||e.compatMode=='BackCompat'?e.body:e.documentElement})};d.fn.scrollTo=function(n,j,b){if(typeof j=='object'){b=j;j=0}if(typeof b=='function')b={onAfter:b};if(n=='max')n=9e9;b=d.extend({},k.defaults,b);j=j||b.speed||b.duration;b.queue=b.queue&&b.axis.length>1;if(b.queue)j/=2;b.offset=p(b.offset);b.over=p(b.over);return this._scrollable().each(function(){var q=this,r=d(q),f=n,s,g={},u=r.is('html,body');switch(typeof f){case'number':case'string':if(/^([+-]=)?\d+(\.\d+)?(px|%)?$/.test(f)){f=p(f);break}f=d(f,this);case'object':if(f.is||f.style)s=(f=d(f)).offset()}d.each(b.axis.split(''),function(a,i){var e=i=='x'?'Left':'Top',h=e.toLowerCase(),c='scroll'+e,l=q[c],m=k.max(q,i);if(s){g[c]=s[h]+(u?0:l-r.offset()[h]);if(b.margin){g[c]-=parseInt(f.css('margin'+e))||0;g[c]-=parseInt(f.css('border'+e+'Width'))||0}g[c]+=b.offset[h]||0;if(b.over[h])g[c]+=f[i=='x'?'width':'height']()*b.over[h]}else{var o=f[h];g[c]=o.slice&&o.slice(-1)=='%'?parseFloat(o)/100*m:o}if(/^\d+$/.test(g[c]))g[c]=g[c]<=0?0:Math.min(g[c],m);if(!a&&b.queue){if(l!=g[c])t(b.onAfterFirst);delete g[c]}});t(b.onAfter);function t(a){r.animate(g,j,b.easing,a&&function(){a.call(this,n,b)})}}).end()};k.max=function(a,i){var e=i=='x'?'Width':'Height',h='scroll'+e;if(!d(a).is('html,body'))return a[h]-d(a)[e.toLowerCase()]();var c='client'+e,l=a.ownerDocument.documentElement,m=a.ownerDocument.body;return Math.max(l[h],m[h])-Math.min(l[c],m[c])};function p(a){return typeof a=='object'?a:{top:a,left:a}}})(jQuery);
--------------------------------------------------------------------------------
/panes/userEdit.html:
--------------------------------------------------------------------------------
1 |
8 |
47 |
65 |
--------------------------------------------------------------------------------
/vboxinit:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 | #
3 | # vboxinit: auto start sessions when booting and save
4 | # sessions when host is stopped
5 | #
6 | # Based on vboxtool. Only tested in Debian.
7 | #
8 | # Debian install:
9 | # copy this script to /etc/init.d
10 | # run:
11 | # chmod u+rx /etc/init.d/vboxinit
12 | # update-rc.d vboxinit defaults
13 |
14 | ### BEGIN INIT INFO
15 | # Provides: vboxinit
16 | # Required-Start: vboxdrv $local_fs
17 | # Required-Stop: vboxdrv $local_fs
18 | # Default-Start: 2 3 4 5
19 | # Default-Stop: 0 1 6
20 | # Description: Controls VirtualBox sessions
21 | ### END INIT INFO
22 |
23 | . /etc/default/virtualbox
24 |
25 | # Enable/disable service
26 | if [ "${VBOXWEB_USER}" == "" ]; then
27 | exit 0
28 | fi
29 |
30 | # Check for VirtualBox binary path
31 | if [ "$VBOX_BIN_PATH" != "" ]; then
32 | PATH = "$PATH:$VBOX_BIN_PATH";
33 | fi
34 |
35 | start()
36 | {
37 | # Get all autostart machines
38 | MACHINES=$($su_command "VBoxManage list vms | awk '{ print \$NF }' | sed -e 's/[{}]//g'")
39 | for UUID in $MACHINES; do
40 | STARTUP=$($su_command "VBoxManage getextradata $UUID 'pvbx/startupMode'" | awk '{ print $NF }')
41 | if [ "${STARTUP}" == "auto" ]; then
42 | VMNAME=$($su_command "VBoxManage showvminfo $UUID | sed -n '0,/^Name:/s/^Name:[ \t]*//p'")
43 | echo "$0: starting machine ${VMNAME} ..."
44 | $su_command "VBoxManage startvm $UUID --type headless" >>/var/log/vb.log
45 | fi
46 | done
47 | }
48 |
49 | stop()
50 | {
51 | # vms are saved, instead of stopped.
52 | MACHINES=$($su_command "VBoxManage list runningvms | awk '{ print \$NF }' | sed -e 's/[{}]//g'")
53 | for UUID in $MACHINES; do
54 | VMNAME=$($su_command "VBoxManage showvminfo $UUID | sed -n '0,/^Name:/s/^Name:[ \t]*//p'")
55 | echo "$0: saving machine ${VMNAME} state ..."
56 | $su_command "VBoxManage controlvm $UUID savestate" >>/var/log/vb.log
57 | done
58 |
59 | }
60 |
61 | status()
62 | {
63 | $su_command "VBoxManage list runningvms"
64 | }
65 |
66 | restart()
67 | {
68 | stop
69 | start
70 | }
71 |
72 |
73 | # Implementation of user control, execute several commands as another (predefined) user,
74 | su_command="su - ${VBOXWEB_USER} -s /bin/bash -c"
75 |
76 | #
77 | # Check for a command line option
78 | #
79 | case "$1" in
80 |
81 | start)
82 | start
83 | ;;
84 | stop)
85 | stop
86 | ;;
87 | status)
88 | status
89 | ;;
90 | restart)
91 | restart
92 | ;;
93 | *)
94 | echo "Usage: $0 {start|stop|restart|status}"
95 | exit 1
96 | ;;
97 | esac
98 |
99 | exit 0
100 |
--------------------------------------------------------------------------------
/panes/chooser.html:
--------------------------------------------------------------------------------
1 |
11 |
12 |
97 |
--------------------------------------------------------------------------------
/endpoints/lib/utils.php:
--------------------------------------------------------------------------------
1 | auth->capabilities['sessionStart']) {
27 | call_user_func(array($settings->auth, $settings->auth->capabilities['sessionStart']), $keepopen);
28 | return;
29 | }
30 |
31 | // No session support? No login...
32 | if(@$settings->noAuth || !function_exists('session_start')) {
33 | global $_SESSION;
34 | $_SESSION['valid'] = true;
35 | $_SESSION['authCheckHeartbeat'] = time();
36 | $_SESSION['admin'] = true;
37 | return;
38 | }
39 |
40 | // Session not is auto-started by PHP
41 | if(!ini_get('session.auto_start')) {
42 |
43 | ini_set('session.use_trans_sid', 0);
44 | ini_set('session.use_only_cookies', 1);
45 |
46 | // Session path
47 | if(isset($settings->sessionSavePath)) {
48 | session_save_path($settings->sessionSavePath);
49 | }
50 |
51 | if(isset($settings->session_name)) {
52 | $session_name = $settings->session_name;
53 | } else {
54 | $session_name = md5($_SERVER['DOCUMENT_ROOT'].$_SERVER['HTTP_USER_AGENT'].dirname(__FILE__));
55 | }
56 | session_name($session_name);
57 | session_start();
58 | }
59 |
60 | if(!$keepopen)
61 | session_write_close();
62 |
63 | }
64 |
65 |
66 | /**
67 | * Clean (strip slashes from if applicable) $_GET and $_POST and return
68 | * an array containing a merged array of both.
69 | * @return array
70 | */
71 | function clean_request() {
72 |
73 | if($_SERVER['HTTP_X_REQUESTED_WITH'] == 'XMLHttpRequest') {
74 | $json = json_decode(file_get_contents('php://input'), true);
75 | if(!is_array($json))
76 | $json = array();
77 | } else {
78 | $json = array();
79 | }
80 | $req = array_merge_recursive($_GET, $_POST);
81 | return array_merge_recursive($req, $json);
82 |
83 | }
84 |
85 | if(!function_exists('hash')) {
86 | // Lower security, but better than nothing
87 | /**
88 | * Return a hash of the passed string. Mimmics PHP's hash() params
89 | * @param unused $type
90 | * @param string $str string to hash
91 | */
92 | function hash($type,$str='') {
93 | return sha1(json_encode($str));
94 | }
95 | }
--------------------------------------------------------------------------------
/languages/source/en.dat:
--------------------------------------------------------------------------------
1 | a:1:{s:8:"contexts";a:4:{s:19:"UIGChooserItemGroup";a:1:{s:8:"messages";a:3:{s:13:"%n machine(s)";a:1:{s:11:"translation";a:1:{s:11:"numerusform";a:2:{i:0;s:10:"%n machine";i:1;s:11:"%n machines";}}}s:11:"%n group(s)";a:1:{s:11:"translation";a:1:{s:11:"numerusform";a:2:{i:0;s:8:"%n group";i:1;s:9:"%n groups";}}}s:0:"";a:2:{s:7:"numerus";s:3:"yes";s:11:"translation";s:0:"";}}}s:10:"VBoxGlobal";a:1:{s:8:"messages";a:7:{s:11:"%n month(s)";a:1:{s:11:"translation";a:1:{s:11:"numerusform";a:2:{i:0;s:8:"%n month";i:1;s:9:"%n months";}}}s:9:"%n day(s)";a:1:{s:11:"translation";a:1:{s:11:"numerusform";a:2:{i:0;s:6:"%n day";i:1;s:7:"%n days";}}}s:0:"";a:2:{s:7:"numerus";s:3:"yes";s:11:"translation";s:0:"";}s:12:"%n minute(s)";a:1:{s:11:"translation";a:1:{s:11:"numerusform";a:2:{i:0;s:9:"%n minute";i:1;s:10:"%n minutes";}}}s:12:"%n second(s)";a:1:{s:11:"translation";a:1:{s:11:"numerusform";a:2:{i:0;s:9:"%n second";i:1;s:10:"%n seconds";}}}s:10:"%n hour(s)";a:1:{s:11:"translation";a:1:{s:11:"numerusform";a:2:{i:0;s:7:"%n hour";i:1;s:8:"%n hours";}}}s:10:"%n year(s)";a:1:{s:11:"translation";a:1:{s:11:"numerusform";a:2:{i:0;s:7:"%n year";i:1;s:8:"%n years";}}}}}s:19:"VBoxTakeSnapshotDlg";a:1:{s:8:"messages";a:1:{s:213:"Warning: You are taking a snapshot of a running machine which has %n immutable image(s) attached to it. As long as you are working from this snapshot the immutable image(s) will not be reset to avoid loss of data.";a:1:{s:11:"translation";a:1:{s:11:"numerusform";a:2:{i:0;s:207:"Warning: You are taking a snapshot of a running machine which has %n immutable image attached to it. As long as you are working from this snapshot the immutable image will not be reset to avoid loss of data.";i:1;s:209:"Warning: You are taking a snapshot of a running machine which has %n immutable images attached to it. As long as you are working from this snapshot the immutable images will not be reset to avoid loss of data.";}}}}}s:15:"UIMessageCenter";a:1:{s:8:"messages";a:1:{s:212:"The %n following virtual machine(s) are currently in a saved state: %1
If you continue the runtime state of the exported machine(s) will be discarded. The other machine(s) will not be changed.
";a:2:{s:7:"comment";s:221:"This text is never used with n == 0. Feel free to drop the %n where possible, we only included it because of problems with Qt Linguist (but the user can see how many machines are in the list and doesn't need to be told).";s:11:"translation";a:1:{s:11:"numerusform";a:2:{i:0;s:197:"The virtual machine %1 is currently in a saved state.
If you continue the runtime state of the exported machine will be discarded. Note that the existing machine is not changed.
";i:1;s:202:"The virtual machines %1 are currently in a saved state.
If you continue the runtime state of the exported machines will be discarded. Note that the existing machines are not changed.
";}}}}}}}
--------------------------------------------------------------------------------
/panes/settingsGlobalLanguage.html:
--------------------------------------------------------------------------------
1 |
9 |
10 |
11 | | Interface Language: |
12 |
13 |
14 | |
15 |
21 | |
22 |
23 |
24 |
73 |
--------------------------------------------------------------------------------
/endpoints/lib/auth/LDAP.php:
--------------------------------------------------------------------------------
1 | false,
12 | 'canLogout' => true
13 | );
14 |
15 | var $config = array(
16 | 'host' => '127.0.0.1', // LDAP server ip
17 | 'bind_dn' => 'uid=%s, ou=admins, dc=internal, dc=local', // %s will be replaced with login username
18 | 'adminUser' => ''
19 | );
20 |
21 | function phpvbAuthLDAP($userConfig = null) {
22 | if($userConfig) $this->config = array_merge($this->config,$userConfig);
23 | }
24 |
25 | function login($username, $password)
26 | {
27 | global $_SESSION;
28 |
29 | // Check for LDAP functions
30 | if(!function_exists('ldap_connect')) {
31 |
32 | $ex = 'LDAP support is not enabled in your PHP configuration.';
33 |
34 | if(strtolower(substr(PHP_OS, 0, 3)) == 'win') {
35 |
36 | ob_start();
37 | phpinfo(INFO_GENERAL);
38 | $phpinfo = ob_get_contents();
39 | ob_end_clean();
40 | preg_match('/Loaded Configuration File <\/td>