Thema: Torrent flux
Einzelnen Beitrag anzeigen
Alt 16.01.2010, 07:53   #36
Lex
Böser Mod / NvT Terrorist
Punkte: 48.916, Level: 100 Punkte: 48.916, Level: 100 Punkte: 48.916, Level: 100
Levelaufstieg: 0% Levelaufstieg: 0% Levelaufstieg: 0%
Aktivität: 0% Aktivität: 0% Aktivität: 0%
Letzte Erfolge
Auszeichnungen
Artikel Benutzer besitzt 1x Hilfe Level 3 Benutzer besitzt 1x Hilfe Level 2 Benutzer besitzt 1x Badboy Benutzer besitzt 1x Anfänger Benutzer besitzt 1x Hilfe Level 1 Benutzer besitzt 1x Helfer Benutzer besitzt 1x Ideen-Spender
 
Benutzerbild von Lex
 
Registriert seit: 16.09.2009
Ort: Wien
Beitr?ge: 2.468
Abgegebene Danke: 188
Erhielt 562 Danke für 126 Beiträge
Downloads: 11
Uploads: 0
Nachrichten: 10609
Renommee-Modifikator:
4013 Lex genießt hohes AnsehenLex genießt hohes AnsehenLex genießt hohes AnsehenLex genießt hohes AnsehenLex genießt hohes AnsehenLex genießt hohes AnsehenLex genießt hohes AnsehenLex genießt hohes AnsehenLex genießt hohes AnsehenLex genießt hohes AnsehenLex genießt hohes Ansehen
Standard

Code:
<?php

/* $Id: functions.core.posix.php 2834 2007-04-08 12:51:00Z b4rt $ */

/*******************************************************************************

 LICENSE

 This program is free software; you can redistribute it and/or
 modify it under the terms of the GNU General Public License (GPL)
 as published by the Free Software Foundation; either version 2
 of the License, or (at your option) any later version.

 This program 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.

 To read the license please visit http://www.gnu.org/copyleft/gpl.html

*******************************************************************************/

/**
 * posix_kill
 *
 * @param $pid
 * @param $sig
 * @return String 
 */
function posix_kill($pid, $sig) {
    return exec("kill -s ".$sig." ".$pid);
}

/**
 * posix_geteuid
 *
 * @author osearth@gmail.c0m
 *
 * @return String 
 */
function posix_geteuid() {
    return exec("id -u");
}

/**
 * posix_getpwuid
 *
 * @author osearth@gmail.c0m
 *
 * @param $uid
 * @return array
 */
function posix_getpwuid($uid) {
    if (!$uid) return FALSE;
    $file = file("/etc/passwd");
    foreach ($file as $f) {
        $l = explode(":",$f);
        if ($l[2] == $uid) {
            $out[name] = $l[0];
            $out[passwd] = $l[1];
            $out[uid] = $l[2];
            $out[gid] = $l[3];
            $out[gecos] = $l[4];
            $out[dir] = $l[5];
            $out[shell] = $l[6];
            return $out;
        }
    }
}

?>
Hier mal der Code des Files, und ich muss sagen, das sieht mir nicht sehr schön aus. Wozu liest der Flux die komplette passwd ein...

Hab das File einfach mal gelöscht.
Lg
__________________
Lex the NetVision Terrorist

june: Feinfühlig? Ich bin Typus Axt im Walde
Lex: Axt? Was bin dann ich? Sägewerk?
Cerberus
: nee --du bist Waldbrand ...
Lex ist offline   Mit Zitat antworten Nach oben