Permalink
Browse files

Compatibility updates.

git-svn-id: http://vboxweb.googlecode.com/svn/trunk@103 729376a8-6c6b-11de-afdd-bb9f892af8c1
  • Loading branch information...
Ian Moore
Ian Moore committed Nov 4, 2010
1 parent 7c5acac commit 9d5801cfe0f34b270606049a64a43d15a0172ce9
Showing with 12,937 additions and 19,402 deletions.
  1. +0 −8 README.txt
  2. +8 −7 VBoxWebSrv.py
  3. +16 −0 VBoxWebSrv.vbs
  4. +0 −10,308 lib/VirtualBox_client.py
  5. +0 −8,097 lib/VirtualBox_server.py
  6. +11,189 −0 lib/VirtualBox_services.py
  7. +1,084 −649 lib/{VirtualBox_types.py → VirtualBox_services_types.py}
  8. +548 −205 lib/VirtualBox_wrappers.py
  9. +50 −71 lib/vboxactions.py
  10. 0 www/images/vbox/Makefile.kup
  11. BIN www/images/vbox/adjust_win_size_16px.png
  12. BIN www/images/vbox/adjust_win_size_disabled_16px.png
  13. BIN www/images/vbox/auto_resize_off_16px.png
  14. BIN www/images/vbox/auto_resize_off_disabled_16px.png
  15. BIN www/images/vbox/auto_resize_on_16px.png
  16. BIN www/images/vbox/auto_resize_on_disabled_16px.png
  17. BIN www/images/vbox/auto_resize_on_on_16px.png
  18. BIN www/images/vbox/auto_resize_on_on_disabled_16px.png
  19. BIN www/images/vbox/chipset_16px.png
  20. BIN www/images/vbox/close_16px.png
  21. BIN www/images/vbox/delete_snapshot_16px.png
  22. BIN www/images/vbox/delete_snapshot_dis_16px.png
  23. BIN www/images/vbox/discard_cur_state_16px.png
  24. BIN www/images/vbox/discard_cur_state_dis_16px.png
  25. BIN www/images/vbox/discard_cur_state_snapshot_16px.png
  26. BIN www/images/vbox/discard_cur_state_snapshot_dis_16px.png
  27. BIN www/images/vbox/diskimage_16px.png
  28. BIN www/images/vbox/fullscreen_16px.png
  29. BIN www/images/vbox/fullscreen_disabled_16px.png
  30. BIN www/images/vbox/fullscreen_on_16px.png
  31. BIN www/images/vbox/fullscreen_on_disabled_16px.png
  32. BIN www/images/vbox/hostkey_16px.png
  33. BIN www/images/vbox/hostkey_captured_16px.png
  34. BIN www/images/vbox/hostkey_captured_pressed_16px.png
  35. BIN www/images/vbox/hostkey_disabled_16px.png
  36. BIN www/images/vbox/hostkey_pressed_16px.png
  37. BIN www/images/vbox/list_movedown_16px.png
  38. BIN www/images/vbox/list_movedown_disabled_16px.png
  39. BIN www/images/vbox/list_moveup_16px.png
  40. BIN www/images/vbox/list_moveup_disabled_16px.png
  41. BIN www/images/vbox/machine_16px.png
  42. BIN www/images/vbox/machine_disabled_16px.png
  43. BIN www/images/vbox/nw_16px.png
  44. BIN www/images/vbox/nw_disabled_16px.png
  45. BIN www/images/vbox/nw_read_16px.png
  46. BIN www/images/vbox/nw_write_16px.png
  47. BIN www/images/vbox/pin_16px.png
  48. BIN www/images/vbox/restore_16px.png
  49. BIN www/images/vbox/seamless_16px.png
  50. BIN www/images/vbox/seamless_disabled_16px.png
  51. BIN www/images/vbox/seamless_on_16px.png
  52. BIN www/images/vbox/seamless_on_disabled_16px.png
  53. BIN www/images/vbox/show_logs_16px.png
  54. BIN www/images/vbox/show_logs_disabled_16px.png
  55. BIN www/images/vbox/vrdp_16px.png
  56. BIN www/images/vbox/vrdp_disabled_16px.png
  57. BIN www/images/vbox/vrdp_on_16px.png
  58. BIN www/images/vbox/vrdp_on_disabled_16px.png
  59. +1 −2 www/login.html
  60. +14 −14 www/panes/settingsDisplay.html
  61. +4 −22 www/panes/settingsGlobalGeneral.html
  62. +6 −6 www/panes/tabVMConsole.html
  63. +9 −9 www/panes/tabVMDetails.html
  64. +4 −0 www/panes/tabVMSnapshots.html
  65. +2 −2 www/panes/vmm.html
  66. +2 −2 www/panes/wizardNewHD.html
View
@@ -1,4 +1,3 @@
-
VirtualBox Web Console is copyright (C) 2010 Ian Moore
(imoore76 at yahoo dot com)
@@ -16,10 +15,3 @@ INSTALLATION:
Please see the wiki located at http://code.google.com/p/vboxweb/ for
installation and configuration instructions.
-
-WARNING:
-
-This is intended to be run on a local network or intranet where access to the
-phpVirtualBox script is limited by network connectivity. The script performs no
-front-end user authentication of any kind. In other words, anyone who has access
-to this script on your web server may administer your VirtualBox installation.
View
@@ -68,6 +68,7 @@
jsonType = 'simplejson'
except:
print "Warning: using internal JSON encoder. Installing simplejson for python (usually a package named python-simplejson) will improve performance."
+ print "http://pypi.python.org/pypi/simplejson/"
jsonType = 'internal'
else:
import json
@@ -438,8 +439,9 @@ def screen(self, **kw):
try:
cherrypy.thread_data.vbox = vboxactions.vboxactions(self.ctx)
-
- machine = cherrypy.thread_data.vbox._getMachineRef(vm)
+ cherrypy.thread_data.vbox.connect()
+
+ machine = cherrypy.thread_data.vbox.vbox.findMachine(vm)
machineState = str(cherrypy.thread_data.vbox.vboxType('MachineState',machine.state))
if str(machineState) != 'Running' and str(machineState) != 'Saved':
@@ -755,16 +757,15 @@ def main(argv = sys.argv):
if argv[1] == "adduser":
if len(argv) <> 4:
print "Syntax: " + argv[0] + " adduser <username> <password>"
- print "\t\t(also used to change user's password)"
+ print "\n\t(also used to change user's password)"
return
h = hashlib.new('sha256')
h.update(argv[3])
if str(g_vboxManager.vbox.getExtraData("vboxwebc/users/" + argv[2])):
print "Updating password for " + argv[2]
else:
print "Adding user " + argv[2]
- g_vboxManager.vbox.setExtraData(
- "vboxwebc/users/" + argv[2], h.hexdigest())
+ g_vboxManager.vbox.setExtraData("vboxwebc/users/" + argv[2], h.hexdigest())
return
elif argv[1] == "deluser":
if len(argv) <> 3:
@@ -788,7 +789,7 @@ def main(argv = sys.argv):
"""
return
else:
- print "\nUnknown command '%s'. See '%s help' for available commands" % (argv[1], argv[0])
+ print "\nUnknown command '%s'. See 'VBoxWebSrv help' for available commands" % (argv[1])
return
cherrypy.engine.subscribe('start_thread', perThreadInit)
@@ -814,7 +815,7 @@ def main(argv = sys.argv):
break
if users != None:
- print "No VboxWebSrv users found. See '%s help' for help on adding users." % (argv[0])
+ print "No VboxWebSrv users found. See 'VBoxWebSrv help' for help on adding users."
quit()
print "VboxWebSrv binding to %s:%s..." %(cherrypy.config['server.socket_host'], cherrypy.config['server.socket_port'])
View
@@ -0,0 +1,16 @@
+Dim sh, scriptPath, p, WshShell, objArgs, strArgs
+
+set sh = WScript.CreateObject("WScript.Shell")
+scriptPath = Left ( WScript.ScriptFullName, InStrRev ( WScript.ScriptFullName, WScript.ScriptName) - 1 )
+p = sh.RegRead("HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\Python.exe\")
+
+rem WScript.Echo p & " " & scriptPath
+
+Set WshShell = WScript.CreateObject("WScript.Shell")
+
+Set objArgs = WScript.Arguments
+For I = 0 to objArgs.Count - 1
+ strArgs = strArgs & " " & objArgs(I)
+Next
+
+WshShell.Run "cmd /C " & p & " " & scriptPath & "VBoxWebSrv.py " & strArgs & " & pause", 1, True
Oops, something went wrong.

0 comments on commit 9d5801c

Please sign in to comment.