Jump to content
xisto Community

mendezgarcia

Members
  • Content Count

    48
  • Joined

  • Last visited

Posts posted by mendezgarcia


  1. P.S. While it is true you cannot just preview a PHP script in action in your browser like you can HTML, you can set up your own personal web server with PHP running and test scripts that way. That's what I do, you just need to remember to change the server parameters (if any) in the script, such as connection parameters for a mysql database, when you finally upload to an online server.

    194381[/snapback]


    Yes, use something like XAMPP

    https://sourceforge.net/projects/xampp/

     

    Another create a config file (which will be required every time).

    For example:

     

    define ("MYSQL_USER", "mendez");

    and:

     

    require 'config.php';

    mysql_connect("localhost", MYSQL_USER, ...);

     

    Easy... :)


  2. That was a long time ago - when PHP first came about. It moved to an executable CGI after that, and is now available in various forms, including an Apache module (although it is in no way limited to this).

    Yes, I was answering him: PHP started as a Perl module and now MAY be installed as an Apache module.
    I didn't know IPB would mess the indentation :)

    About the equal and identical operators, although they are apparently the same thing, they are very different. There was a security flaw in phpBB (security flaw number 6.57 x 10^6) that was fixed changing == to ===

  3. PHP started as a Perl module. Now it may be installed independently; as a apache mod.A few notes:1. Instead of using <? ?>, which is a shortcut (and may not work in some servers), use <?php ?>2. Try to improve your indentation. 3. There are major differences between the comparision operator "==" (equal) and "===" (identical).For example, "php" == 0 returns true, but "php" === 0 doesn't.


  4. Sorry, but I am not understanding the purpose of this script.

     

    I will point some cons:

     

    - People will still be able to hotlink to it - also, this will make usual hotlinking protection useless.

     

    - About the cache thing, no, the browser will not cache the images, thus increasing your

    bandwidth use.

     

    - The other point is that it will make creating pages harder (you will have to write a longer address for img src)

     

    - Scripts that rely on user input are EXTREMELY dangerous. For example, due to a huge design flaw

    (if you give some ext like 934910841 it won't be concatenated to the file name; allowing a potential

    hacker to inject code or see your files).

     

    Now, some coding tips:

     

    - I noticed unexperienced coding standards, especially indentation for the PHP code.

     

    - Usually instead of using several if and elseif you can use switch

     

    - Use $_GET instead of $_REQUEST

     

    - Be careful with your error checking routine; check if the given ext actually exists.

     

    - Instead of naming an ext an using switch/if else, you can use an array; for example:

    $exts = array ('jpg', 'gif', 'bmp', 'png', 'tiff')

    $exts[0] is jpg, $exts[1] is gif and so on.

     

    - Learn about INTERPOLATION.

    Strings using double quotes (") don't need to be concatenated.

     

    - And finally, the most important: NEVER TRUST USER INPUT!!

    Always filter it properly

     

    I hope you don't take this as offense, but as constructive criticism.


  5. Thanks for the tips, I changed my config; I'll see what happens.

     

    Firefox uses a lot of the memory here too (almost 50.000 K), what is more than

    Internet Explorer; and a little slower too. But its security is slightly better than IE's,

    and there are some useful plugins.

     

    ciroxyz: Well, taking a screenshot of part of your proccess is not very useful.

    Use HijackThis and create a log, then post it. Spybot is not very effective, I used

    it and its not good. I wasn't able to remove 2 spywares that were infecting my computer


  6. There is nothing better to explain than... the source:

    <html> <head>  <title>Convert decimal days</title> </head> <body> <font face="arial" size="2"> <h3>Convert decimal days</h3> <p><?phpfunction convert_date($date) {   $return = floor($date) . ' days';   $hours = ($date - floor($date))*24;   if ($hours != 0) {      $return .= ', ' . floor($hours) . ' hours';      $minutes = round(($hours - floor($hours))*60);      if ($minutes != 0) {         $return .= ' and ' . $minutes . ' minutes';      }   }   return $return;}$input = $_GET['days'];if (!empty($input)) {   echo $input . ' days = ' . convert_date($input) . '<p>';   }?>  <form>   <input type="text" name="days">   <input type="submit" value="Convert">  </form>  </font> </body></html>


  7. China has 20 nukes only? You are... brainless! China has more than 400 nukes. OK, the US have 10,000 nukes, but name400 cities worth nuking. And as you know, nuking a city will affect a big area near it; if China can successfully deploy the nukes and half of them hit the US, US will be destroyed and the air, soil and water become radioactive!For countries like US and China , nukes serve a single purpose: ensure mutual destruction. If China is losing a war against the US, I don't think they will hesitate to nuke the US.


  8. ROMs are copies of games, "translated" from cartridges to the computer.You can find arcade ROMs, SNES ROMS, or from almost any console you can imagine.Usually copies of CD and DVD games are not called ROMs, but ISOsThis is a serious issue, keep them away from Xisto. You should not be allowed even to link to the roms. It's like creating a page with <img src="http://forums.xisto.com/no_longer_exists/;. You are not hosting the image on Xisto but simply linking to it is against the ToS. I am not admin here but this is my opinion.Although IPS patches are not copyrigthed stuff they are used to facilitate the use of copyrighted stuff, so people hosting IPS files may also be sued. Don't be selfish, remember that other users are also hosted here, so if Xisto is sued, all of us will lose our hosting.


  9. Suppose, You've your letter copied on clipboard and some evil site steals it.I think it is also possible that using JavaScript a webpage may transfer selected text to the clipboard. And then using other methods of clipboard object a site may capture some personal data.

    The quoted text above was sent by Sunny using PM, but I thought it would be interesting to talk about it.
    Well, yes it IS possible to "transfer" selected text to JS and then send it to an "evil site" or whatever. But this would be a little more complicated thing to do. I'll post a method; there may be others, but they would follow the same structure.

    The "exploiter" would have to create a site and trick you to visit it. This site would have 2 frames or iframes; one of them showing the site he wants to "steal" and the other (invisible) actually logging, using setTimeout to regularly copy and send the content.

    But I think most of you know about phishing sites (what could be used as well, and it's even simpler) and wouldn't do something like this. Would you?

    About capturing personal data, I don't know what you consider "personal data", but Javascript can't touch any files in your computer , except the infamous cookies. But
    usually the browsers are disallow JS to access cookies from other sites.

  10. Please search the forums before you make or ask a question.

     

    I am repeating again, your forum username is visible only to you and we are very well about the security issues :-)

     

    Thanks.

    185077[/snapback]

    So this must be flawed because I can see other members usernames as well. :P

    Can anyone confirm this? [Just access any profile]


  11. Hello,I don't know if this has been suggested before or not, but I think that my Cpanel Username shouldn't be shown on my profile. This is potential problem; anyone that knows my site may visit this forum, access my profile and therefore get my cpanel username [duh]. I know, there is the password, but knowing the username a potential hacker would only need to find the pasword.Thanks :P

×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | 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.