コード例 #1
0
function chromas_log($alias, $trailing, $dest)
{
    $params = parse_parameters($trailing, "=", " ");
    if ($params !== False) {
        foreach ($params as $key => $value) {
            if (strpos($key, " ") !== False) {
                $params = False;
                break;
            }
        }
    }
    if ($params === False) {
        term_echo("chromas_log failed: invalid parameters");
        return False;
    }
    # chromas, 23 march 2015
    if (isset($params["until"]) == False) {
        date_default_timezone_set("UTC");
        $params["until"] = strftime("%F %T", time() - 5);
    }
    $paramstr = "";
    foreach ($params as $key => $value) {
        if ($paramstr != "") {
            $paramstr = $paramstr . "&";
        }
        $paramstr = $paramstr . urlencode($key) . "=" . urlencode($value);
    }
    if (isset($params["channel"]) == False) {
        $paramstr = $paramstr . "&channel=" . urlencode($dest);
    }
    if (isset($params["out"]) == False) {
        $paramstr = $paramstr . "&out=irc-full";
    }
    if ($alias == "~log") {
        $uri = "/s/soylent_log.php?" . $paramstr;
    } else {
        $uri = "/s/soylent_log.php?op=" . $alias . "&" . $paramstr;
    }
    if (get_bucket("chromas_irc_log_debug") == "on") {
        pm("chromas", "http://chromas.0x.no" . $uri);
        pm("crutchy", "http://chromas.0x.no" . $uri);
    }
    $response = wget("chromas.0x.no", $uri, 80, ICEWEASEL_UA, "", 10, "", 1024, False);
    $html = trim(strip_headers($response));
    if ($html == "") {
        pm("#", "chromas_log failed: no response");
        return False;
    }
    $lines = explode("\n", trim($html));
    return $lines;
}
コード例 #2
0
ファイル: app_name.php プロジェクト: Feng-xp/QuincyKit
 * OTHER DEALINGS IN THE SOFTWARE.
 */
//
// This is the main admin UI script
//
// You can add applications by adding their respective bundle identifiers
// and you can delete applications and define if external symbolification
// should be turned on or not
//
require_once '../config.php';
require_once 'common.inc';
if ($acceptallapps) {
    die('<html><head><META http-equiv="refresh" content="0;URL=app_versions.php"></head><body></body></html>');
}
init_database();
parse_parameters(',bundleidentifier,symbolicate,id,name,issuetrackerurl,hockeyappidentifier,pushids,emails,');
if (!isset($bundleidentifier)) {
    $bundleidentifier = "";
}
if (!isset($symbolicate)) {
    $symbolicate = "";
}
if (!isset($id)) {
    $id = "";
}
if (!isset($name)) {
    $name = "";
}
if (!isset($issuetrackerurl)) {
    $issuetrackerurl = "";
}
コード例 #3
0
ファイル: app_versions.php プロジェクト: Feng-xp/QuincyKit
 * OTHER DEALINGS IN THE SOFTWARE.
 */
//
// This script shows all available versions for an application
//
// You can add versions, change the status of a version (which corresponds
// to the bugfix status), see how many crash groups are created for this
// version and how many crash reports in total are available
// If a version has no crash reports assigned, and no crash group
// has this version assigned as a bugfix version, this script also provides
// the possibility to delete the version
//
require_once '../config.php';
require_once 'common.inc';
init_database();
parse_parameters(',bundleidentifier,version,status,symbolicate,id,notify,deletecrashes,');
if (!isset($bundleidentifier)) {
    $bundleidentifier = "";
}
if (!isset($version)) {
    $version = "";
}
if (!isset($status)) {
    $status = "";
}
if (!isset($id)) {
    $id = "";
}
if (!isset($notify)) {
    $notify = NOTIFY_OFF;
}
コード例 #4
0
 * 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.
 */
//
// Shows a list of crashes for a given crash group
//
// Shows all crashes for a given crash group. You can download each crash
// from this view, or see all the relevant information about this crash
// that is available
//
require_once '../config.php';
require_once 'common.inc';
init_database();
parse_parameters(',deleteid,groupid,bundleidentifier,version,symbolicate,all,search,type,fixversion,description,');
if (!isset($all)) {
    $all = false;
}
if (!isset($groupid)) {
    $groupid = "";
}
if (!isset($deleteid)) {
    $deleteid = "";
}
if (!isset($bundleidentifier)) {
    $bundleidentifier = "";
}
if (!isset($version)) {
    $version = "";
}
コード例 #5
0
 * 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.
 */
require_once '../config.php';
require_once 'common.inc';
init_database();
parse_parameters(',action,id,groupid,bundleidentifier,version,fixversion,description,');
parse_parameters_post(',action,id,groupid,bundleidentifier,version,fixversion,description,');
if (!isset($action)) {
    $action = "";
}
if (!isset($id)) {
    $id = "";
}
if (!isset($groupid)) {
    $groupid = "";
}
if (!isset($bundleidentifier)) {
    $version = "";
}
if (!isset($version)) {
    $version = "";
コード例 #6
0
ファイル: crashes.php プロジェクト: Feng-xp/QuincyKit
 * 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.
 */
//
// Shows a list of crashes for a given crash group
//
// Shows all crashes for a given crash group. You can download each crash
// from this view, or see all the relevant information about this crash
// that is available
//
require_once '../config.php';
require_once 'common.inc';
init_database();
parse_parameters(',groupid,bundleidentifier,version,search,type,');
if (!isset($all)) {
    $all = false;
}
if (!isset($groupid)) {
    $groupid = "";
}
if (!isset($bundleidentifier)) {
    $bundleidentifier = "";
}
if (!isset($version)) {
    $version = "";
}
if (!isset($search)) {
    $search = "";
}
コード例 #7
0
ファイル: groups.php プロジェクト: nikunjagr/QuincyKit
 */
//
// This script shows all crash groups for a version
//
// This script shows a list of all crash groups of a version of an application,
// the amount of crash logs assigned to this group and the assigned bugfix version
// You can edit the bugfix version, if this version is not added yet, it will be added
// automatically to the version list. You can also assign a short description for
// this crash group or download the latest crash log data for this group directly.
// All crashes that weren't assigned to a group, will be shown in the list with in one
// combined entry too
//
require_once '../config.php';
require_once 'common.inc';
init_database();
parse_parameters(',bundleidentifier,version,');
if (!isset($bundleidentifier)) {
    $bundleidentifier = "";
}
if (!isset($version)) {
    $version = "";
}
if ($bundleidentifier == "") {
    die(end_with_result('Wrong parameters'));
}
if ($version == "") {
    die(end_with_result('Wrong parameters'));
}
show_header('- Crash Patterns');
echo '<h2>';
if (!$acceptallapps) {
コード例 #8
0
ファイル: redirect.php プロジェクト: houzhenggang/privoxy
        }
    }
    if (isset($to)) {
        // Trim whitespace and convert to lowercase.
        $to = strtolower(trim($to));
        // Restrict the characters in the string by removing everything
        // from the first disallowed character onwards.
        //
        // Allowed characters are 0-9, a-z, ".", "_", "-".
        //
        $to = substr($to, 0, strspn($to, "0123456789abcdefghijklmnopqrstuvwxyz._-"));
    } else {
        $to = "";
    }
}
parse_parameters();
// For debugging:
// print "Version {$version_major}.{$version_minor}.{$version_point}<br>";
// print "Target \"{$to}\"<br>";
// Please do NOT delete any of these redirects.  Even if you take them
// out of Privoxy, they may be in use by older releases.
// Note 2: Should *not* include #target part in these URLs.
// (It works with MS IE, but is not valid HTTP.)
//http://ijbswa.sourceforge.net/user-manual/configuration.html
switch ($to) {
    case "faq":
        // Used by 2.9.0+
        //      header ("Location: http://www.junkbusters.com/ht/en/ijb2faq.html");
        header("Location: http://www.privoxy.org/faq/");
        exit;
    case "option":
コード例 #9
0
ファイル: sn_api.php プロジェクト: cmn32480/exec-irc-bot
$alias = $argv[4];
$cmd = $argv[5];
define("API_WIKI_URL", "sylnt.us/api");
if ($trailing == "") {
    privmsg(API_WIKI_URL);
    return;
}
$element = array();
$parts = explode("/", $trailing);
if (count($parts) > 1) {
    for ($i = 1; $i < count($parts); $i++) {
        $element[] = $parts[$i];
    }
    $trailing = $parts[0];
}
$params = parse_parameters($trailing, "=", " ", False);
if ($params !== False) {
    foreach ($params as $key => $value) {
        if (strpos($key, " ") !== False) {
            $params = False;
            break;
        }
    }
}
if ($params === False) {
    privmsg(API_WIKI_URL);
    return;
}
$paramstr = "";
foreach ($params as $key => $value) {
    if ($paramstr != "") {