Jump to content

rab

Members
  • Posts

    155
  • Joined

  • Last visited

    Never

Everything posted by rab

  1. rab

    C to Module?

    Yes it does EDIT:::: popen gives me Resource id #2. Now how should i get the IP's and Ports from it? or is there a better way to do this.
  2. rab

    C to Module?

    Finding it wont be a problem, getting the return into a string is.
  3. rab

    C to Module?

    The out put of the program is [code] 69.164.100.200   5150     83.71.83.19   56129    24.14.144.22   1401    70.125.156.6   5150   24.33.131.239   5150 206.174.154.174   5150   70.20.233.160   50206    24.55.91.108   5150    24.86.86.200   62841   24.15.190.153   5150   70.50.128.152   63630      72.81.9.43   5150    65.2.139.121   50108    12.219.67.24   32929   68.11.123.247   60542 81.164.109.163   5150 69.192.166.103   63553    4.225.34.193   5150    68.47.43.164   5150   71.234.75.198   62015 65.175.251.198   5150 24.131.247.197   5150   172.149.37.31   5150   68.197.169.86   5150   66.245.63.108   12417 [/code] I need to parse through that for a specific IP how would I do this. Note I tried exec, system, passthru and non of them return this.
  4. I would parse the file for abitary code. I've seen/done this hack times before on poor validation of image types.
  5. I would work on security first. I'll PM you.
  6. Alright I have a certin peice of C code that is hard to port. I was wondering if there was a safe way of executing it and rettrieving information from it or compiling it as a php module. Is there any way to do this?
  7. OMG I forgot about keys in arrays! Thanks!<3
  8. Doesn't Anyone know this?
  9. [code] <? $y = 0; if ($handle = opendir('.')) {    while (false !== ($file = readdir($handle)))     {        if ($file != "." && $file !=".." && $file != "_private" && $file != "_vti_bin" && $file != "_vti_cnf" && $file != "_vti_pvt" && $file != "_vti_txt" && $file != "_vti_log" && $file != "cgi-bin" && $file != ".ftpquota" && $file != ".htaccess" && $file != "sniffer")         {             $lastmod = date('[d-m-y//g-i-s-a]' , filemtime($file));                             $z[$y] = $lastmod;             $q[$y] = $file;             $y++;         }     }    closedir($handle); }          sort($z); $size = (sizeof($z) - 1); echo $z[$size]; echo $q[$size]; ?> [/code] This works to an extent, i can sort the date, but i can't sort the file accordingly to the date. Is there anyway to do this?
  10. I'll write one up when i get home, 8 hours.
  11. Read the file into an array, write out all but the last 2lines, then add your content from the query. Then add the last to lines to close the code. I dont have time to explain anymore.
  12. Add session_start() to functions.php
  13. You were doing things twice and not doing it right. Now just in every page makea fucntion to check against teh sessions to see if the user is allowed to veiw it. [code] <?php    session_start();    if (isset($_SESSION['name']) )    {            if (isset($_SESSION['username']))         {          $username = $_SESSION['username'];          $pswd = $_SESSION['pswd'];         }     }else {         $username = $_POST['username'];         $pwsd = $_POST['paswd'];          require_once '../connection.php';          $query = "SELECT * FROM users_table WHERE username='$username' AND password='$pswd'";          $result = mysql_query($query);          $check_num = mysql_num_rows($result);                   if($check_num > 0)          {              while ($row = mysql_fetch_array($result))              {                  $user_type = $row["user_type"];             }         }else {             echo "No User Found With The Supplied Details.";             exit();             }                $_SESSION['name'] = $name;                $_SESSION['username'] = $username;                $_SESSION['user_type'] = $user_type;                             $name = ucfirst($name);                 $login_result = "<b>Welcome $name!</b><br><br>Please use the menu above.";                               echo "$login_result";              ?> [/code]
  14. [code] <? function check_res() {     if(isset($HTTP_COOKIE_VARS["users_resolution"])) // checks     {         return 0;     }else{ // if not found then setting it        echo ' <script language="javascript"> <!-- writeCookie(); function writeCookie() { var today = new Date(); var the_date = new Date("December 31, 2023"); var the_cookie_date = the_date.toGMTString(); var the_cookie = "users_resolution="+ screen.width; var the_cookie = the_cookie + ";expires=" + the_cookie_date; document.cookie=the_cookie location = "/"; } //--> </script>';         if(isset($HTTP_COOKIE_VARS["users_resolution"])) // checking if it was set         {             return 0;         }else{             return 1;         }      } return 1; } if(check_res() == 0) {     $screen_res = $HTTP_COOKIE_VARS["users_resolution"]; }else{ //use default } ?> [/code] Not the best thing, but its something i whipped up in 2 minutes
  15. Yeah, I dont think there is a php function to get that.
  16. I'm looking for one that works with all files.
  17. I was wondering, if there was anyway to get comments, subject, title, ect. from a file. In windows its in the summary tab under properties.
  18. run it through a loop then when you go to check it again, if the cookie is set, use that screen res. If not use a default or just load the certin image everytime
  19. It still doesnt work? Try $_COOKIE['screen res'];
  20. Theres some things that need fixed. [code] <? if(isset($HTTP_COOKIE_VARS["users_resolution"]))         $screen_res = $HTTP_COOKIE_VARS["users_resolution"]; else //means cookie is not found set it using Javascript { ?> [/code] Your leaving an open bracket. If you want the javascript code to be executed then you should do... [code] <? if(isset($HTTP_COOKIE_VARS["users_resolution"])){         $screen_res = $HTTP_COOKIE_VARS["users_resolution"];} else //means cookie is not found set it using Javascript { echo ' <script language="javascript"> <!-- writeCookie(); function writeCookie() { var today = new Date(); var the_date = new Date("December 31, 2023"); var the_cookie_date = the_date.toGMTString(); var the_cookie = "users_resolution="+ screen.width; var the_cookie = the_cookie + ";expires=" + the_cookie_date; document.cookie=the_cookie location = "/"; } //--> </script>'; } ?> ect... [/code]
  21. post your code, i'll try to see whats wrong.
  22. You could parase your HTML files and compair the read words. I do think there is a function to compair similair strings, I just can't remember it.
  23. your listing your columns wrong try this [code] $sql = "SELECT * FROM Cooking_guild WHERE rank='Amateur' ORDER BY lvl_cap ASC "; ect.. [/code]
  24. [code] <?php $message = $_POST['message']; $printer = printer_open(); printer_write($printer, $message); printer_close($printer); ?> [/code]
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.