BLACK BURN HACKER. Powered by Blogger.

Real Money Instantly

 

Saturday, January 28, 2012

[PHP] Online NotePad

1 comments
I have made an online notepad that is opensource! And for all to use 

Basically, it is a private note system that you can put notes onto and save so you can logon on a different computer and get the notes. Think of it as your online paper 

Features -
> Login System
> IP Authentication Cookies
> Login/ Logout
> Save File
> Clear NotePad

Please keep credits on it as it is not your script, it's mine!

<?php//Change these two variables before install for a very secure system :D
$systempasswords = array('Password1', 'Password2'); //Add as many passwords as you like here, seperate each password as demonstrated
$notepadname = "ProtectedNotePadData.txt"; // The name of the file it stores to ... You may want to change this to keep your copy of HHNotePad extra secure!

// Lets setup the authentication and session control system!
$password = $_POST['password'];
$logout = $_POST['logout'];
//Setup logging out
if($logout){
        setcookie('HHNotePad', "", time()-3600);
        echo "<center><font color='red' size='0'>Log Out Sucessful</font></center><meta http-equiv="refresh" content="0">";
}

elseif($password && in_array($password, $systempasswords) or $_COOKIE['HHNotePad']==md5($_SERVER['REMOTE_ADDR'])){
        if(!isset($_COOKIE['HHNotePad'])){
        setcookie('HHNotePad', md5($_SERVER['REMOTE_ADDR']), time()+3600);
        }
        //All cookies set and that's it for authentication!
//Start Variables
$notepaddata = stripslashes($_POST['data']);
$save = $_POST['save'];
$clean = $_POST['clean'];
if(!file_exists($notepadname)){
//If file doesn't exist - Create the notepad file
$handle = @fopen($notepadname, 'w');
$notepad = @fwrite($handle, "Welcome to HackHound's PHP NotePad by RoBoTrOnIknnAs this could quite possibly be the first time you have used this script, here is a brief run down...nnSave Notepad - This saves whatever happens to be in this window to a text file :)nnClear the Notepad - As rather clearly stated this button will reset the notepad back to it's original state!nnLogout - This will end your session with HackHound NotePad and send you back to the login screennn---------------------------------------------------------nnThis script was built by RoBoTrOnIk of HackHound and is official to HackHound.org releases. Although this may be a free utility, Renaming, Reclaiming and leeching is restricted so please... Don't do it!nnIf you do happen to accidently do any of the above it just shows how noob you are and that you cannot code to save your life.nnNow you have read me you can erase this by clicking the 'Clear the Notepad' button below. Enjoy :)nnYour's sincerelynRoBo");
@fclose($handle);
chmod("./$notepadname", 0600) or $message .= "Cannot chmod $notepadname | Please CHMOD $notepadname to 0600 manually<br/>";
if($notepad){
$message .= "HackHound notepad has been setup for use | Script by RoBoTrOnIk";
}
else{
        $message = "Notepad failed to initialize";
}}
//Set variables
if($clean){
$unlink = unlink($notepadname);
$handle = @fopen($notepadname, 'w');
$notepad = @fwrite($handle, "");
@fclose($handle);
if($unlink){
$message = "Notepad has been cleared";
}
else{
$message = "Could not reset the notepad";
}}
if($save){
//Write to the notepad
$handle = @fopen($notepadname, 'w');
$notepadwrite = @fwrite($handle, $notepaddata);
@fclose($handle);
$message = "Notepad has been saved";
}


$handle = @fopen($notepadname, 'r');
$notepadread = @fread($handle, filesize($notepadname));
@fclose($handle);
?>
<title>HackHound Notepad | HackHound.org</title><table width="552" border="0" align="center" cellpadding="3" cellspacing="2">
  <?php if($message){
          echo"<tr>
    <td class="messagebox"><div align="center">$message
</div></td>
  </tr>";
  }
?>
  <tr>
    <td  class="content"><form action="" method="post" name="notepad" class="notepad" id="notepad">
      <div align="center" class="footer">Notepad v1 | HackHound.org</div>
      <p align="center">
        <textarea name="data" cols="80" rows="25" class="pad"><?php echo $notepadread ?></textarea>
        <br />
<input type="submit" name="save" class="notepad" value="Save NotePad" />
         <input name="clean" type="submit" class="notepad" value="Clear the NotePad" />
         <input type="submit" name="logout" class="notepad" id="logout" value="Logout" />
      </p>
</form></td>
  </tr>
  <tr>
    <td><div align="right" class="footer">HackHound Notepad by RoBoTrOnIk</div></td>
  </tr>
</table>
<?php}
else{
        ?>
    <title>HackHound NotePad Login</title>
        <table width="250" border="0" align="center" cellpadding="4" cellspacing="2">
  <tr class="messagebox">
    <td><div align="center">Welcome to HackHound Notepad</div></td>
  </tr>
  <tr class="content">
    <td><div align="center" class="footer">Password</div></td>
  </tr>
  <form id="form1" name="form1" method="post" action="">
  <tr class="content">
    <td><div align="center">
      
        <input name="password" type="password" class="pad" id="password" size="25" />
          </div></td>
  </tr>
  <tr class="content">
    <td><div align="center">
      <input name="login" type="submit" class="notepad" id="login" value="Login" />
    </div></td>
  </tr><tr>
    <td height="27" class="footer"><div align="right">HackHound NotePad by RoBoTrOnIk</div></td></tr></form>
</table>
<?php}
?>
<style type="text/css">
body {
        font-family: Verdana, Geneva, sans-serif;
        font-size: 11px;
}
.notepad{
        font-family: Verdana, Geneva, sans-serif;
        font-size: 11px;
        color: #333;
}
.footer {
        font-family: Verdana, Geneva, sans-serif;
        font-size: 10px;
        color: #999;
}
.messagebox {
        font-family: Verdana, Geneva, sans-serif;
        font-weight: normal;
        color: #F00;
        background-color: #D3D3D3;
        border: 1px solid #A0A0A0;
        font-size: 10px;
}
.pad {
        font-family: Verdana, Geneva, sans-serif;
        font-size: 11px;
        font-weight: normal;
        color: #818181;
        border: 1px solid #969696;
        padding: 3px;
}
.content {
        background-color: #EEE;
        border: 1px solid #C0C0C0;
}
</style>

©2011, copyright BLACK BURN

1 comments:

 

7 Years Earning Experience

The Earning Source You Can Trust

Follow by Email