Jump to content

A2xA

Members
  • Posts

    137
  • Joined

  • Last visited

    Never

Posts posted by A2xA

  1. I have a script that makes a game hub for a member.  It is using mkdir and then chmodding it.  If the folder already exists then it gives me this error:

     

    Warning: mkdir() [function.mkdir]: File exists in "SHOWS MY DIRECTORY" on line 6

     

    This is an ugly/bad error message + it isn't good for security because it shows my file directorys.  If someone could tell me how to fix this I would be grateful.

     

    Thanks!  ;)

  2. I wan't to make my form secure.  Which means no / or < or leave it blank.  You get my point.  Would it be best to add it to the code that the form is processing, or the actual form itself?  If you could point me to a tutorial I could also follow that.  I just couldn't find anything!  ;)

     

     

    Form Code:

    <form name="hubmove" action="taken out" method="post">
    
    <h3>Step 1. Enter Hub ID or Name To Make Hub, Then Come Back And Proceed to Step 2<h3>
      <input name="dir" value="" type="text">
    
    <INPUT TYPE="submit">
    </form>
    

     

    Processing code:

    <html>
    <?php
    
    $dir = $_POST[dir];
    
    mkdir("taken out", 0755);
    chmod("taken out", 0777);  
    
    ?>
    <h3> Click <a href="taken out">Here</a> to return back to hubs Complete Step 2. To Activate your Hubs<h3>
    </html>
    
    

     

    Thanks, I appreciate it!  I need to secure my stuff so I can release it.  This is the last step.  All who helps Thanks!  ;)

  3. 2n24pag.png

     

    On My site http://wiicharged.com I have made the game hubs option.  Right now the options that I'm wanting you to test out are the create a hub and join a hub option.

     

    The hub can be found here http://wiicharged.com/index.php?action=hubs

     

    First thing to test security:

     

    Make the hubs. 

     

    http://wiicharged.com/index.php?action=hubs;sa=make;

     

    How this works is when they create a hub the first step actually creates the folder and the second step copyies the main "hub" files from a directory to their folder.  When they think their confirming it or whatever (clever  ;D )

     

    Second thing to test security

     

    Join the hubs/actual hub itself

     

    http://wiicharged.com/index.php?action=hubs;sa=join;

     

    The user types in their "hub ID" and it pops up their "hub"  Which is a flash file that writes to a txt file.

     

     

     

     

    Don't bash it up too much.  It's my first script and I plan to add more later.  As for the visual aspect of it.  I'm not done.  I just tried to put the main stuff in there (the script)  Please tell me how I can improve the security of my script before I release it?  Thanks!  ;D

  4. Wait, Nevermind, I fixed it.  Now it is working without the re-sizing.  Do you know why it isn't re-sizing?

     

    <html>
    <head>
    
    <SCRIPT LANGUAGE="JavaScript">
    
    <!-- Idea by:  Nic Wolfe -->
    <!-- This script and many more are available free online at -->
    <!-- The JavaScript Source!! http://javascript.internet.com -->
    
    function popUp(URL) {
    day = new Date();
    id = day.getTime();
    
    window.open(URL, id , 'toolbar=0','scrollbars=0','location=0','statusbar=0','menubar=0','resizable=0','width=275','height=300');
    
    }
    </script>
    <title>Join The WiiCharged Hub</title>
    </head>
    <body>
    <input type="button" value="Open the Hub" onclick="popUp('http://wiicharged.com/hubchat/<?php $dir = $_POST[hubid]; echo$dir; ?>/shout.swf');" />
    
    </body>
    
    

  5. Um...I corrected it and it..stil won't work... ???

     

     

    <html>
    <head>
    
    <SCRIPT LANGUAGE="JavaScript">
    
    <!-- Idea by:  Nic Wolfe -->
    <!-- This script and many more are available free online at -->
    <!-- The JavaScript Source!! http://javascript.internet.com -->
    
    <!-- Begin
    function popUp(URL) {
    day = new Date();
    id = day.getTime();
    window.open(URL, '" + id + "', 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=275,height=300');");
    }
    // End -->
    </head>
    </script>
    
    <form>
    <input type=button value="Open the Hub" onClick="javascript:popUp('<?php $hubid = $_POST[hubid]; $file = 'http://wiicharged.com/hubchat/$dir/shout.swf';  echo $file;?>');" />
    </form>
    
    
    
    
    
    </html>
    
    

     

    Sorry  :-X

  6. Well, I sort of need it to pop up.  I did what you said, but the submit button still isn't working  :-X

     

    New code:

     

    <html>
    <head>
    
    <SCRIPT LANGUAGE="JavaScript">
    
    <!-- Idea by:  Nic Wolfe -->
    <!-- This script and many more are available free online at -->
    <!-- The JavaScript Source!! http://javascript.internet.com -->
    
    <!-- Begin
    function popUp(URL) {
    day = new Date();
    id = day.getTime();
    window.open(URL, '" + id + "', 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=275,height=300');");
    }
    // End -->
    </head>
    </script>
    <body>
    <form>
    <input type=button value="Open the Hub" onClick="javascript:popUp('<?php $hubid = $_POST[hubid]; $file = 'http://wiicharged.com/hubchat/$dir/shout.swf';  echo $file;?>');
    </form>
    </body>
    
    
    
    
    </html>
    
    

  7. I'm making it where the user types in their 'hub' and it brings them to it.

     

    the form for the page before (to send the variable)  is:

     

    <form action="/hubs/main.php" name="join" method="post">
    <input type="text" name="hubid">
    <input type="submit">
    </form>
    

     

    the next page where the data is sent to is:

     

    <html>
    <head>
    
    <SCRIPT LANGUAGE="JavaScript">
    
    <!-- Idea by:  Nic Wolfe -->
    <!-- This script and many more are available free online at -->
    <!-- The JavaScript Source!! http://javascript.internet.com -->
    
    <!-- Begin
    function popUp(URL) {
    day = new Date();
    id = day.getTime();
    eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=275,height=300');");
    }
    // End -->
    </head>
    </script>
    <body>
    <form>
    <input type=button value="Open the Hub" onClick="javascript:popUp('<?php $hubid = $_POST[hubid]; $file = 'http://wiicharged.com/hubchat/$dir/shout.swf';  echo $file;?>');
    </form>
    </body>
    
    
    
    
    </html>
    
    

     

    The main problem is getting the variables to transfer over from the php to the java (and the submit button not working) 

     

    Thanks!  all help is appreciated!  Where it is is at http://wiicharged.com/index.php?action=hubs;sa=join;

  8. I want a user to type in the form their hub ID.  Then a window pops up with the desired url.

     

    ie:

     

    The user types in the $hubid.  Then  http://wiicharged.com/hubchat/$hubid/chat.html

     

    I know how to do this without the pop-up.  I just don't know how to incorpirate this with

     

    <a href="http://www.yourweblog.com/yourfile.html" onclick="window.open('http://www.yourweblog.com/yourfile.html','popup','width=500,height=500,scrollbars=no,resizable=no,toolbar=no,directories=no,location=no,menubar=no,status=no,left=0,top=0'); return false">About</a>

     

    Thanks!  After this is answered then my system will be done!

  9. I still need help with this... it won't work.

     

     

    <html>
    <?php
    
    $dir = $_POST[dir];
    
    
    $file = '/home/wiicharg/public_html/hubchat/hubex/shout.php';
    $newfile = '/home/wiicharg/public_html/hubchat/***Need variable here***/shout.php';
    
    if (!copy($file, $newfile)) {
        echo "failed to copy $file...\n";
    }
    
    ?>
    </html>
    
    

×
×
  • 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.