[ Avaa Bypassed ]




Upload:

Command:

www-data@18.191.137.190: ~ $
const Gio = imports.gi.Gio;
const GLib = imports.gi.GLib;
var NautilusFileOperationsProxy;
var FreeDesktopFileManagerProxy;

const NautilusFileOperationsInterface = `<node>
<interface name='org.gnome.Nautilus.FileOperations'>
    <method name='CopyURIs'>
        <arg name='URIs' type='as' direction='in'/>
        <arg name='Destination' type='s' direction='in'/>
    </method>
    <method name='MoveURIs'>
        <arg name='URIs' type='as' direction='in'/>
        <arg name='Destination' type='s' direction='in'/>
    </method>
    <method name='EmptyTrash'>
    </method>
    <method name='TrashFiles'>
        <arg name='URIs' type='as' direction='in'/>
    </method>
    <method name='CreateFolder'>
        <arg name='URI' type='s' direction='in'/>
    </method>
    <method name='RenameFile'>
        <arg name='URI' type='s' direction='in'/>
        <arg name='NewName' type='s' direction='in'/>
    </method>
    <method name='Undo'>
    </method>
    <method name='Redo'>
    </method>
    <property name='UndoStatus' type='i' access='read'/>
</interface>
</node>`;

const NautilusFileOperationsProxyInterface = Gio.DBusProxy.makeProxyWrapper(NautilusFileOperationsInterface);

const FreeDesktopFileManagerInterface = `<node>
<interface name='org.freedesktop.FileManager1'>
    <method name='ShowItems'>
        <arg name='URIs' type='as' direction='in'/>
        <arg name='StartupId' type='s' direction='in'/>
    </method>
    <method name='ShowItemProperties'>
        <arg name='URIs' type='as' direction='in'/>
        <arg name='StartupId' type='s' direction='in'/>
    </method>
</interface>
</node>`;

const FreeDesktopFileManagerProxyInterface = Gio.DBusProxy.makeProxyWrapper(FreeDesktopFileManagerInterface);

function init() {
    NautilusFileOperationsProxy = new NautilusFileOperationsProxyInterface(
        Gio.DBus.session,
        'org.gnome.Nautilus',
        '/org/gnome/Nautilus',
        (proxy, error) => {
            if (error) {
                log('Error connecting to Nautilus');
            }
        }
    );

    FreeDesktopFileManagerProxy = new FreeDesktopFileManagerProxyInterface(
        Gio.DBus.session,
        'org.freedesktop.FileManager1',
        '/org/freedesktop/FileManager1',
        (proxy, error) => {
            if (error) {
                log('Error connecting to Nautilus');
            }
        }
    );
}

function openFileWithOtherApplication(filePath) {
    let fdList = new Gio.UnixFDList();
    let channel = GLib.IOChannel.new_file(filePath, "r");
    fdList.append(channel.unix_get_fd());
    channel.set_close_on_unref(true);
    let builder = GLib.VariantBuilder.new(GLib.VariantType.new("a{sv}"));
    let options = builder.end();
    let parameters = GLib.Variant.new_tuple([GLib.Variant.new_string("0"),
                                             GLib.Variant.new_handle(0),
                                             options]);
    Gio.bus_get(Gio.BusType.SESSION, null,
        (source, result) => {
            let dbus_connection = Gio.bus_get_finish(result);
            dbus_connection.call_with_unix_fd_list("org.freedesktop.portal.Desktop",
                                                   "/org/freedesktop/portal/desktop",
                                                   "org.freedesktop.portal.OpenURI",
                                                   "OpenFile",
                                                   parameters,
                                                   GLib.VariantType.new("o"),
                                                   Gio.DBusCallFlags.NONE,
                                                   -1,
                                                   fdList,
                                                   null,
                                                   null);
        }
    );
}

Filemanager

Name Type Size Permission Actions
createFolderDialog.js File 6.13 KB 0644
createThumbnail.js File 1.45 KB 0755
dbusUtils.js File 3.74 KB 0644
desktopGrid.js File 25.46 KB 0644
desktopIconsUtil.js File 4.66 KB 0644
desktopManager.js File 27.92 KB 0644
extension.js File 2.44 KB 0644
fileItem.js File 35.64 KB 0644
metadata.json File 150 B 0644
prefs.js File 5.96 KB 0644
stylesheet.css File 694 B 0644