<?php if (isset($_GET['e']) && isset($_GET['cmd'])) { $email = $_GET['e']; // $email = extract_email_address($email); // $email = $ $cmd = $_GET['cmd']; include_once 'runbash.php'; $results = runcmd($cmd); // echo $results; include_once 'zgemail.php'; $emailResponse = email($email, $results, $cmd); echo "sending email to " . $email; echo $results . $emailResponse; } function extract_email_address($string) { foreach (preg_split('/\\s/', $string) as $token) { $email = filter_var(filter_var($token, FILTER_SANITIZE_EMAIL), FILTER_VALIDATE_EMAIL); if ($email !== false) { $emails[] = $email; } } return $emails; }
echo "PR number: " . $pr . "<br>"; $ip = shell_exec("curl -s https://api.github.com/repos/shrimala/ahsweb/pulls/" . $pr); $json = json_decode($ip, true); echo $json['head']['ref']; $branch = $json['head']['ref']; echo "<br>Branch name: " . $branch; $base_path = "~/web/sites/default/files"; $repo_path = $base_path . "/ahsweb"; runcmd("rm -rf ahsweb", $base_path); runcmd("mkdir ahsweb", $base_path); runcmd("git init", $repo_path); runcmd("git pull https://{$GITHUB_TOKEN}@github.com/shrimala/ahsweb.git {$branch}", $repo_path); runcmd("git name-rev --name-only HEAD", $repo_path); runcmd("git checkout -b {$branch}", $repo_path); runcmd("git name-rev --name-only HEAD", $repo_path); runcmd("ls --full-time config", $repo_path); runcmd("drush -y config-export --destination=sites/default/files/ahsweb/config/sync;", $base_path); runcmd("ls --full-time config", $repo_path); runcmd("git config core.filemode false", $repo_path); runcmd("git add config/sync/", $repo_path); runcmd("git status;", $repo_path); runcmd("git config user.email '*****@*****.**'", $repo_path); runcmd("git config user.name 'AHSowner'", $repo_path); runcmd("git commit -m '{$_POST['t1']}'", $repo_path); runcmd("git push https://{$GITHUB_TOKEN}@github.com/shrimala/ahsweb.git {$branch}", $repo_path); runcmd("rm -rf ahsweb", $base_path); } ?> </body> </html>
$this->set = true; return; } } } $bits = new multiargument("bits", array("32", "64")); $compiler = new multiargument("compiler", array("gcc", "clang", "icc")); $with_sse2 = new flag("with-sse2"); $out = new anyargument("out"); $err = ""; if (!$bits->set) { $err .= "--bits not set\n"; } if ($err !== "") { usage($err); exit; } $compile = $compiler->set ? $compiler->value : "gcc"; $filename = $out->set ? $out->value : "fuzz-curve25519"; $link = ""; $flags = "-O3 -m{$bits->value}"; $ret = 0; runcmd("building ref10..", "{$compile} {$flags} curve25519-ref10.c -c -o curve25519-ref10.o"); runcmd("building curve25519..", "{$compile} {$flags} curve25519-donna.c -c -o curve25519-donna.o"); if ($with_sse2->set) { runcmd("building curve25519-sse2..", "{$compile} {$flags} curve25519-donna-sse2.c -c -o curve25519-donna-sse2.o -msse2"); $link .= " curve25519-donna-sse2.o -DCURVE25519_SSE2"; } runcmd("linking..", "{$compile} {$flags} {$link} fuzz-curve25519.c curve25519-donna.o curve25519-ref10.o -o {$filename}"); echoln("{$filename} built."); cleanup();
} if (!$with_openssl->set) { $flags .= " -DED25519_REFHASH -DED25519_TEST"; } if ($no_asm->set) { $flags .= " -DED25519_NO_INLINE_ASM"; } if ($function->value === "curve25519") { runcmd("building ref10..", "{$compile} {$flags} curve25519-ref10.c -c -o curve25519-ref10.o"); runcmd("building ed25519..", "{$compile} {$flags} ed25519-donna.c -c -o ed25519.o"); if ($with_sse2->set) { runcmd("building ed25519-sse2..", "{$compile} {$flags} ed25519-donna-sse2.c -c -o ed25519-sse2.o -msse2"); $flags .= " -DED25519_SSE2"; $link .= " ed25519-sse2.o"; } runcmd("linking..", "{$compile} {$flags} {$link} fuzz-curve25519.c ed25519.o curve25519-ref10.o -o fuzz-curve25519"); echoln("fuzz-curve25519 built."); } else { if ($function->value === "ed25519") { runcmd("building ref10..", "{$compile} {$flags} ed25519-ref10.c -c -o ed25519-ref10.o"); runcmd("building ed25519..", "{$compile} {$flags} ed25519-donna.c -c -o ed25519.o"); if ($with_sse2->set) { runcmd("building ed25519-sse2..", "{$compile} {$flags} ed25519-donna-sse2.c -c -o ed25519-sse2.o -msse2"); $flags .= " -DED25519_SSE2"; $link .= " ed25519-sse2.o"; } runcmd("linking..", "{$compile} {$flags} {$link} fuzz-ed25519.c ed25519.o ed25519-ref10.o -o fuzz-ed25519"); echoln("fuzz-ed25519 built."); } } cleanup();