Sandboxie Scripting Engine...

Discussion in 'Sandboxie (SBIE Open Source) Plus & Classic' started by DavidXanatos, May 27, 2023.

  1. DavidXanatos

    DavidXanatos Developer

    Joined:
    Sep 6, 2006
    Posts:
    2,332
    Location:
    Viena
    I'm thinking about how best to implement the Troubleshooting Wizard (https://www.wilderssecurity.com/thr...shooting-wizard-upcomming-new-feature.451560/) and it looks to me like the most flexible approach would be to add some scripting support to sandman.
    As it happens Qt has a V8 based QJSEngine which can be easily used and has QObject bindings.

    So since I may end up using it for the wizard why not make it available to users as well, now what it exactly would be able to do is again subject to ongoing planning so its a good time to bring in suggestions.

    The most basic functionality will be of cause editing the sandboxie.ini and offering limited interaction through the Wizard so it would also need the ability to start programs in the sandbox and wait for the sandbox to finish.

    Plus a bunch of other troubleshooting capabilities like register shell extensions un register shell extensions, create a sandbox link on the desktop or wherever.

    What functionality would you as users want such an engine to have?
     
  2. n8chavez

    n8chavez Registered Member

    Joined:
    Jul 19, 2003
    Posts:
    3,355
    Location:
    Location Unknown
    As long as I can get MS Office to work in SBIE I'd be happy.
     
  3. DavidXanatos

    DavidXanatos Developer

    Joined:
    Sep 6, 2006
    Posts:
    2,332
    Location:
    Viena
    If you have a major issue with MS office i would recommend to open a thread about it ant it alone, or an github issue, this thread is for the new feature idea.
     
  4. n8chavez

    n8chavez Registered Member

    Joined:
    Jul 19, 2003
    Posts:
    3,355
    Location:
    Location Unknown
    I've done that twice before and neither you nor anyone else helped me. Besides, you said this thread was related to editing the sandboxie.ini and for the config wizard, right? If you can script the ability to create a config for an exe the user selects would that not be what you are asking for? How is that different than what I suggested?
     
  5. DavidXanatos

    DavidXanatos Developer

    Joined:
    Sep 6, 2006
    Posts:
    2,332
    Location:
    Viena
    idk. lets see, please post the links to the already opened threads/issues
     
  6. DavidXanatos

    DavidXanatos Developer

    Joined:
    Sep 6, 2006
    Posts:
    2,332
    Location:
    Viena
    So I was thinking of creating the following basic scripting API

    SysObject
    • listDir
    • mkDir
    • remove (File or dir)
    • openFile - creates file when not existing - returns internal file handle number to be used with readFile and writeFile
    • readFile
    • writeFile
    • clsoeFile
    • getFileInfo (size atributes, etc. pp...)

    • listRegKey
    • setRegValue - creates key when needed
    • getRegValue
    • removeRegValue
    • removeRegKey

    • sleep

    SbieObject
    • getBox - by name, returns BoxObject
    • listBoxes - returns a array of names
    • newBox - returns a BoxObject

    • getTemplate - by name, returns IniObject
    • listTemplates
    • newTemplate

    • getGlobal - returns IniObject for the GlobalSettings
    • getPlus - returns IniObject for the sandboxie.plus ini here all sections are accesible using section\name syntax

    • makeShortcut

    IniObject
    • listValues

    • setIniValue
    • addIniValue
    • delIniValue
    • getIniValue
    • getIniValues

    • removeSection

    BoxObject derived from IniObject
    • run - run process in sandbox
    • clear - delet content

    • listTasks - list processes
    • killTask - kill a selected process
    • taskInfo - return a object with informations about a process

    • getPath - returns the root file path
    • getKey - returns the root registry path

    • isOpen- are processes running
    • close - terminate all processes

    • removeSection @overwrite - delete the sandbox

    WizardObject
    • TBD...

    QJSEngine implements basically Javascript just without all the browser objects.
    we wil have the wollofing objects in the global namespace:
    sys SysObject
    sbie SbieObject
    wizard WizardObject

    instances of BoxObject and IniObject will be obtained through the sbie object

    What do yout hink? Any extra wishes?
    Should we maybe have an own process object, or perhaps an own file object, or shoudl we dumb down the file handling to just read and write file to take filenames and offsets opening and closing a file on each access?
     
  7. soccerfan

    soccerfan Registered Member

    Joined:
    Oct 15, 2007
    Posts:
    561
    So, will this have the ability to work with standard or portable installations
    and with sandboxie.ini location in a nonstandard (since v1.9.3) path?
     
  8. DavidXanatos

    DavidXanatos Developer

    Joined:
    Sep 6, 2006
    Posts:
    2,332
    Location:
    Viena
    yes of cause for the mechanics its not relevant where the files are etc...
    I do all my developing with a portable installation as then i can better switch between different builds, configs, etc...
     
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.