NetVision-Technik

Zur?ck   NetVision-Technik > Forum > Server > Webserver > Security

Security Hier kommen alle Fragen und Lösungen zur Sicherheit und zu Fixes am Serversystem rein

 
 
Themen-Optionen Ansicht
Alt 21.11.2009, 23:14   #11
NaIch
Profi
Punkte: 15.393, Level: 80 Punkte: 15.393, Level: 80 Punkte: 15.393, Level: 80
Levelaufstieg: 9% Levelaufstieg: 9% Levelaufstieg: 9%
Aktivität: 0% Aktivität: 0% Aktivität: 0%
Letzte Erfolge
 
Benutzerbild von NaIch
 
Registriert seit: 13.06.2008
Ort: Zuhause
Beitr?ge: 928
Abgegebene Danke: 53
Erhielt 38 Danke für 11 Beiträge
Downloads: 37
Uploads: 0
Nachrichten: 52
Renommee-Modifikator:
985 NaIch ist einfach richtig nettNaIch ist einfach richtig nettNaIch ist einfach richtig nettNaIch ist einfach richtig nett
Standard

nach was muss den dann suchen ?????

PHP-Code:
<?
/*
// +--------------------------------------------------------------------------+
// | Project:    NVTracker - NetVision BitTorrent Tracker                     |
// +--------------------------------------------------------------------------+
// | This file is part of NVTracker. NVTracker is based on BTSource,          |
// | originally by RedBeard of TorrentBits, extensively modified by           |
// | Gartenzwerg.                                                             |
// |                                                                          |
// | NVTracker is free software; you can redistribute it and/or modify        |
// | it under the terms of the GNU General Public License as published by     |
// | the Free Software Foundation; either version 2 of the License, or        |
// | (at your option) any later version.                                      |
// |                                                                          |
// | NVTracker is distributed in the hope that it will be useful,             |
// | but WITHOUT ANY WARRANTY; without even the implied warranty of           |
// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the            |
// | GNU General Public License for more details.                             |
// |                                                                          |
// | You should have received a copy of the GNU General Public License        |
// | along with NVTracker; if not, write to the Free Software Foundation,     |
// | Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA            |
// +--------------------------------------------------------------------------+
// | Obige Zeilen dürfen nicht entfernt werden!    Do not remove above lines! |
// +--------------------------------------------------------------------------+
 */

require_once("include/bittorrent.php");

hit_start();

if (!mkglobal("username:password"))
    die("Hier ist was faul...");

dbconn();

hit_count();
failedloginscheck ();

function bark($text = "Benutzername oder Passwort ungültig")
{
  stderr("Login fehlgeschlagen!", $text);
}

session_start();

$res = mysql_query("SELECT * FROM users WHERE username = " . sqlesc($username) . " AND status = 'confirmed'");
$row = mysql_fetch_assoc($res);

if (!$row)
    failedlogins();

if ($row["passhash"] != md5($row["secret"] . $password . $row["secret"]))
    failedlogins();
if ($row["enabled"] == "no")
    bark("Dieser Account wurde deaktiviert.");

logincookie($row["id"], $row["passhash"]);

$ip = getip();

$_SESSION["userdata"] = $row;
$_SESSION["userdata"]["ip"] = $ip;

mysql_query("UPDATE users SET last_access='" . date("Y-m-d H:i:s") . "', ip='$ip' WHERE id=" . $row["id"]); // or die(mysql_error());
$url = $GLOBALS["DEFAULTBASEURL"] . "/index.php";
switch($row["go_after_login"])
{
  case 1 : $url = $GLOBALS["DEFAULTBASEURL"] . "/userdetails.php?id=" . $row["id"];
           break;
  case 2 : $url = $GLOBALS["DEFAULTBASEURL"] . "/user-controlpanel.php";
           break;
  case 3 : $url = $GLOBALS["DEFAULTBASEURL"] . "/mytorrents.php";
           break;
  case 4 : $url = $GLOBALS["DEFAULTBASEURL"] . "/browse.php";
           break;
  case 5 : $url = $GLOBALS["DEFAULTBASEURL"] . "/index.php";
           break;
}
if (!empty($_POST["returnto"]))
    header("Location: ".$BASEURL.$_POST["returnto"]);
else
    //    header("Location: $BASEURL/my.php?".SID);
    header("Location: ".$url);

hit_end();

?>

Ge?ndert von NaIch (21.11.2009 um 23:19 Uhr)
NaIch ist offline   Mit Zitat antworten Nach oben
 


Aktive Benutzer in diesem Thema: 2 (Registrierte Benutzer: 0, G?ste: 2)
 

Forumregeln
Es ist Ihnen nicht erlaubt, neue Themen zu verfassen.
Es ist Ihnen nicht erlaubt, auf Beitr?ge zu antworten.
Es ist Ihnen nicht erlaubt, Anh?nge hochzuladen.
Es ist Ihnen nicht erlaubt, Ihre Beitr?ge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.

Gehe zu


Alle Zeitangaben in WEZ +1. Es ist jetzt 15:01 Uhr.


Powered by vBulletin® Version 3.8.9 (Deutsch)
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
Template-Modifikationen durch TMS