!C99Shell v. 2.0 [PHP 7 Update] [25.02.2019]!

Software: Apache. PHP/5.6.40 

uname -a: Linux cpanel06wh.bkk1.cloud.z.com 2.6.32-954.3.5.lve1.4.80.el6.x86_64 #1 SMP Thu Sep 24
01:42:00 EDT 2020 x86_64
 

uid=851(cp949260) gid=853(cp949260) groups=853(cp949260) 

Safe-mode: OFF (not secure)

/opt/passenger-5.3.7-4.el6.cloudlinux/src/agent/Core/SpawningKit/   drwxr-xr-x
Free 220.65 GB of 981.82 GB (22.47%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Feedback    Self remove    Logout    


Viewing file:     Result.h (5.76 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
/*
 *  Phusion Passenger - https://www.phusionpassenger.com/
 *  Copyright (c) 2014-2018 Phusion Holding B.V.
 *
 *  "Passenger", "Phusion Passenger" and "Union Station" are registered
 *  trademarks of Phusion Holding B.V.
 *
 *  Permission is hereby granted, free of charge, to any person obtaining a copy
 *  of this software and associated documentation files (the "Software"), to deal
 *  in the Software without restriction, including without limitation the rights
 *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
 *  copies of the Software, and to permit persons to whom the Software is
 *  furnished to do so, subject to the following conditions:
 *
 *  The above copyright notice and this permission notice shall be included in
 *  all copies or substantial portions of the Software.
 *
 *  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
 *  THE SOFTWARE.
 */
#ifndef _PASSENGER_SPAWNING_KIT_RESULT_H_
#define _PASSENGER_SPAWNING_KIT_RESULT_H_

#include <string>
#include <vector>

#include <sys/types.h>

#include <FileDescriptor.h>
#include <Exceptions.h>
#include <SystemTools/SystemTime.h>
#include <ConfigKit/ConfigKit.h>
#include <Core/SpawningKit/Context.h>
#include <Core/SpawningKit/Config.h>

namespace Passenger {
namespace SpawningKit {

using namespace std;


/**
 * Represents the result of a spawning operation.
 *
 * - begin hinted parseable class -
 */
class Result {
public:
    struct Socket {
        struct Schema: public ConfigKit::Schema {
            Schema() {
                using namespace Passenger::ConfigKit;

                add("address", STRING_TYPE, REQUIRED);
                add("protocol", STRING_TYPE, REQUIRED);
                add("description", STRING_TYPE, OPTIONAL);
                add("concurrency", INT_TYPE, OPTIONAL, -1);
                add("accept_http_requests", BOOL_TYPE, OPTIONAL, false);

                finalize();
            }
        };

        string address;
        string protocol;
        string description;
        /**
         * Special values:
         * 0 = unlimited concurrency
         * < 0 = unknown
         */
        int concurrency;
        bool acceptHttpRequests;

        Socket()
            : concurrency(-1),
              acceptHttpRequests(false)
            { }

        Socket(const Schema &schema, const Json::Value &values) {
            ConfigKit::Store store(schema);
            vector<ConfigKit::Error> errors;

            if (!store.update(values, errors)) {
                throw ArgumentException("Invalid initial values: "
                    + toString(errors));
            }

            address = store["address"].asString();
            protocol = store["protocol"].asString();
            if (!store["description"].isNull()) {
                description = store["description"].asString();
            }
            concurrency = store["concurrency"].asInt();
            acceptHttpRequests = store["accept_http_requests"].asBool();
        }

        Json::Value inspectAsJson() const {
            Json::Value doc;
            doc["address"] = address;
            doc["protocol"] = protocol;
            if (!description.empty()) {
                doc["description"] = description;
            }
            doc["concurrency"] = concurrency;
            doc["accept_http_requests"] = acceptHttpRequests;
            return doc;
        }
    };

    enum Type {
        UNKNOWN,
        GENERIC,
        KURIA,
        AUTO_SUPPORTED,
        /**
         * Indicates that this Process does not refer to a real OS
         * process. The sockets in the socket list are fake and need not be deleted.
         * Set to true by DummySpawner, used during unit tests.
         */
        DUMMY
    };

private:
    void validate_autoGeneratedCode(vector<StaticString> &internalFieldErrors,
        vector<StaticString> &appSuppliedFieldErrors) const;

public:
    /****** Fields supplied by HandshakePrepare and HandshakePerform ******/

    /**
     * @hinted_parseable
     * @require result.pid != -1
     */
    pid_t pid;

    /**
     * @hinted_parseable
     */
    Type type;

    /**
     * @hinted_parseable
     * @require_non_empty
     */
    string gupid;

    /**
     * @hinted_parseable
     */
    string codeRevision;

    /**
     * @hinted_parseable
     */
    FileDescriptor stdinFd;

    /**
     * @hinted_parseable
     */
    FileDescriptor stdoutAndErrFd;

    /**
     * @hinted_parseable
     * @require result.spawnStartTime != 0
     */
    unsigned long long spawnStartTime;

    /**
     * @hinted_parseable
     * @require result.spawnEndTime != 0
     */
    unsigned long long spawnEndTime;

    /**
     * @hinted_parseable
     * @require result.spawnStartTimeMonotonic != 0
     */
    MonotonicTimeUsec spawnStartTimeMonotonic;

    /**
     * @hinted_parseable
     * @require result.spawnEndTimeMonotonic != 0
     */
    MonotonicTimeUsec spawnEndTimeMonotonic;


    /****** Fields supplied by the app ******/

    vector<Socket> sockets;


    Result()
        : pid(-1),
          type(UNKNOWN),
          spawnStartTime(0),
          spawnEndTime(0),
          spawnStartTimeMonotonic(0),
          spawnEndTimeMonotonic(0)
        { }

    void initialize(const Context &context, const Config * const config) {
        gupid = integerToHex(SystemTime::get() / 60) + "-" +
            context.randomGenerator->generateAsciiString(10);
        spawnStartTime = SystemTime::getUsec();
        spawnStartTimeMonotonic = SystemTime::getMonotonicUsec();
    }

    bool validate(vector<StaticString> &internalFieldErrors,
        vector<StaticString> &appSuppliedFieldErrors) const
    {
        validate_autoGeneratedCode(internalFieldErrors, appSuppliedFieldErrors);

        if (type == UNKNOWN) {
            internalFieldErrors.push_back(P_STATIC_STRING("type may not be unknown"));
        }
        if (sockets.empty()) {
            appSuppliedFieldErrors.push_back(P_STATIC_STRING("sockets are not supplied"));
        }

        return internalFieldErrors.empty() && appSuppliedFieldErrors.empty();
    }
};
// - end hinted parseable class -


} // namespace SpawningKit
} // namespace Passenger

#include <Core/SpawningKit/Result/AutoGeneratedCode.h>

#endif /* _PASSENGER_SPAWNING_KIT_RESULT_H_ */

:: Command execute ::

Enter:
 
Select:
 

:: Search ::
  - regexp 

:: Upload ::
 
[ Read-Only ]

:: Make Dir ::
 
[ Read-Only ]
:: Make File ::
 
[ Read-Only ]

:: Go Dir ::
 
:: Go File ::
 

--[ c99shell v. 2.0 [PHP 7 Update] [25.02.2019] maintained by KaizenLouie | C99Shell Github | Generation time: 0.0096 ]--