Uname:Linux Sandbox-A 4.4.0-210-generic #242-Ubuntu SMP Fri Apr 16 09:57:56 UTC 2021 x86_64

Base Dir : /var/www/html

User : gavin


403WebShell
403Webshell
Server IP : 68.183.124.220  /  Your IP : 216.73.217.137
Web Server : Apache/2.4.18 (Ubuntu)
System : Linux Sandbox-A 4.4.0-210-generic #242-Ubuntu SMP Fri Apr 16 09:57:56 UTC 2021 x86_64
User : gavin ( 1000)
PHP Version : 7.0.33-0ubuntu0.16.04.16
Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : ON
Directory :  /home/gavin/workspace/readjs/node_modules/x-default-browser/lib/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /home/gavin/workspace/readjs/node_modules/x-default-browser/lib/detect-windows.js
var exec = require('child_process').exec;

module.exports = function (callback) {

    // It seems that StartMenuInternet is more reliable; IE may be default without changing http-shell-open-command
    var registryQuery = 'HKCU\\Software\\Clients\\StartMenuInternet';
    //var registryQuery = 'HKCU\\Software\\Classes\\http\\shell\\open\\command'
    var command = 'reg query ' + registryQuery + ' | findstr "REG_SZ"';

    exec(command, function (err, stdout, stderr) {
        var value;
        // parse the output which is sth like this (XP):
        //   ! REG.EXE VERSION 3.0
        //
        //   HKEY_CURRENT_USER\Software\Classes\http\shell\open\command
        //   <NO NAME>   REG_SZ  "C:\Program Files\Mozilla Firefox\firefox.exe" -osint -url "%1"
        if (err) {
            if (stderr.length > 0) {
                return callback('Unable to execute the query: ' + err);
            } else {
                // findstr failed due to not finding match => key is empty, default browser is IE
                value = 'iexplore.exe';
            }
        }

        if (!value) {
            // XP hack to get rid of space so we can later split on it...
            stdout = stdout.replace("NO NAME", "NONAME");
            // on XP it's tab-separated, on Win7 space-separated...
            var split = stdout.trim().split(/(\t| +)/);
            // splits to sth like [ '(Default)', '    ', 'REG_SZ', '    ', 'value' ] but for "Google Chrome" it will be further split...
            value = (split[4] + (split[5] || "") + (split[6] || "")).toLowerCase();
        }

        //var pos1 = value.indexOf('"') + 1;
        //var pos2 = value.indexOf('"', pos1);
        //var path = value.substring(pos1, pos2);

        var out = {
            isIE:       value.indexOf('iexplore') > -1,     // IEXPLORE.EXE             / -
            isSafari:   value.indexOf('safari') > -1,       // Safari.exe
            // works also for nightly
            isFirefox:  value.indexOf('firefox') > -1,      // FIREFOX.EXE              / "C:\Program Files (x86)\Mozilla Firefox\firefox.exe" -osint -url "%1"
            // note that both chrome and chromium are chrome.exe! we can't look for 'chrome' hence
            isChrome:   value.indexOf('google') > -1,       // Google Chrome            / "C:\Program Files (x86)\Google\Chrome\Application\chrome.exe" -- "%1"
            isChromium: value.indexOf('chromium') > -1,     // Chromium.<randomstring>  / "C:\Users\<username>\AppData\Local\Chromium\Application\chrome.exe" -- "%1"
            isOpera:    value.indexOf('opera') > -1,        // OperaStable              / "C:\Program Files (x86)\Opera\launcher.exe" -noautoupdate -- "%1"
            identity:   value
        };
        out.isBlink = (out.isChrome || out.isChromium || out.isOpera);
        out.isWebkit = (out.isSafari || out.isBlink);
        out.commonName = require('./common-name')(out);

        callback(null, out);
    });
};

Youez - 2016 - github.com/yon3zu
LinuXploit