comment
IRC Chat
play_arrow
Este sitio utiliza cookies propias y de terceros. Si continúa navegando consideramos que acepta el uso de cookies. OK Más Información.

[Perl Tk] Pastebin Uploader

  • 0 Respuestas
  • 1079 Vistas

0 Usuarios y 1 Visitante están viendo este tema.

Desconectado BigBear

  • *
  • Underc0der
  • Mensajes: 543
  • Actividad:
    0%
  • Reputación 3
    • Ver Perfil
« en: Julio 03, 2011, 10:02:24 pm »
Un lindo programa para publicar varios o un codigo en pastebin

Imagenes









Código: Perl
  1. #!usr/bin/perl
  2. #PasteBin Uploader 0.5 (C) Doddy Hackman 2011
  3.  
  4. use Tk;
  5. use Tk::FileSelect;
  6. use Win32;
  7. use LWP::UserAgent;
  8.  
  9. if ($^O eq 'MSWin32') {
  10. use Win32::Console;
  11. Win32::Console::Free();
  12. }
  13.  
  14. my $nave = LWP::UserAgent->new;
  15. $nave->agent("Mozilla/5.0 (Windows; U; Windows NT 5.1; nl; rv:1.8.1.12) Gecko/20080201Firefox/2.0.0.12");
  16. $nave->timeout(5);
  17.  
  18. my $logo = MainWindow->new();
  19. $logo->title("PasteBin Uploader 0.5");
  20. $logo->geometry("300x130+20+20");
  21. $logo->resizable(0,0);
  22. $logo->Label(-text=>"Options",-font=>"Impact1")->place(-x=>115,-You are not allowed to view links. Register or Login=>10);
  23. $logo->Button(-text=>"File",-width=>20,-command=>\&single)->place(-You are not allowed to view links. Register or Login=>50,-x=>10);
  24. $logo->Button(-text=>"Directory",-width=>20,-command=>\&di)->place(-You are not allowed to view links. Register or Login=>50,-x=>150);
  25. $logo->Button(-text=>"Show Logs",-width=>20,-command=>\&lognow)->place(-x=>75,-You are not allowed to view links. Register or Login=>88);
  26.  
  27. MainLoop;
  28.  
  29. sub single {
  30.  
  31. $sin = MainWindow->new();
  32. $sin->title("Pastebin Uploader 0.5 (C) Doddy Hackman 2011");
  33. $sin->geometry("550x80+20+20");
  34. $sin->Label(-text=>"File : ",-font=>"Impact1")->place(-x=>20,-You are not allowed to view links. Register or Login=>20);
  35. my $filex = $sin->Entry(-width=>50)->place(-You are not allowed to view links. Register or Login=>25,-x=>65);
  36. $sin->Button(-text=>"Browse",-width=>10,-command=>\&bro)->place(-You are not allowed to view links. Register or Login=>23,-x=>375);
  37. $sin->Button(-text=>"Upload",-width=>10,-command=>\&singleup)->place(-You are not allowed to view links. Register or Login=>23,-x=>450);
  38.  
  39. sub bro {
  40. $sin->update;
  41. $browse = $sin->FileSelect(-directory => "/");
  42. my $file = $browse->Show;
  43. $filex->configure (-text =>$file);
  44. }
  45.  
  46. sub singleup {
  47.  
  48. my $file = $filex->get();
  49. You are not allowed to view links. Register or Login $file;
  50.  
  51. if (-f $file)  {
  52.  
  53. ($name,$exta) =verfile($file);
  54.  
  55. my $ext = extensiones($exta);
  56.  
  57. if ($ext ne "Yet") {
  58.  
  59.  
  60. $code = openfile($file);
  61.  
  62. $re = lleva($name,$code,$ext);
  63.  
  64. unless($re=~/Bad API request/ig) {
  65. Win32::MsgBox("Uploaded!!!",0,"PasteBin Uploader");
  66. savefile("uploads_paste.txt","\n[+] File : $file");
  67. savefile("uploads_paste.txt","[+] Link : ".$re);
  68. } else {
  69. Win32::MsgBox("Error uploading",0,"PasteBin Uploader 0.5");
  70. }
  71. }
  72. } else {
  73. Win32::MsgBox("File Error",0,"PasteBin Uploader 0.5");
  74. }
  75. }
  76. }
  77.  
  78.  
  79. sub di {
  80.  
  81.  
  82. my $more = MainWindow->new();
  83. $more->title("Pastebin Uploader 0.5 (C) Doddy Hackman 2011");
  84. $more->geometry("450x280+50+50");
  85. $more->resizable(0,0);
  86.  
  87. $more->Label(-text=>"Directory : ",-font=>"Impact1")->place(-You are not allowed to view links. Register or Login=>10,-x=>10);
  88. my $filex = $more->Entry(-width=>35)->place(-You are not allowed to view links. Register or Login=>15,-x=>80);
  89. $more->Button(-text=>"Start",-width=>10,-command=>\&multi)->place(-You are not allowed to view links. Register or Login=>12,-x=>300);
  90. $more->Button(-text=>"Browse",-width=>10,-command=>\&poner)->place(-x=>370,-You are not allowed to view links. Register or Login=>12);
  91.  
  92. $more->Label(-text=>"Files")->place(-You are not allowed to view links. Register or Login=>70,-x=>65);
  93. my $lista_archivos = $more->Listbox(-width=>32)->place(-You are not allowed to view links. Register or Login=>100,-x=>20);
  94.  
  95. $more->Label(-text=>"Status")->place(-You are not allowed to view links. Register or Login=>70,-x=>300);
  96. my $lista_re = $more->Listbox(-width=>32)->place(-You are not allowed to view links. Register or Login=>100,-x=>230);
  97.  
  98.  
  99. sub poner {
  100. my $ven = MainWindow->new();
  101. $ven->title("Choose Directory");
  102. $ven->geometry("300x280+20+20");
  103. $ven->resizable(0,0);
  104. $test = $ven->Scrolled("DirTree",-width=>100,-height=>20,-exportselection=>1,-command=>\&choose)->You are not allowed to view links. Register or Login();
  105.  
  106. sub choose {
  107. $filex->configure(-text=>$_[0]);
  108. $ven->destroy;
  109. }
  110. }
  111.  
  112. sub multi {
  113.  
  114. my $dir = $filex->get();
  115.  
  116. if (-d $dir) {
  117.  
  118. my @files = verdir($dir);
  119.  
  120. for my $file(@files) {
  121.  
  122. You are not allowed to view links. Register or Login $file;
  123.  
  124. my ($name,$exta) =verfile($file);
  125.  
  126. my $ext = extensiones($exta);
  127.  
  128. if ($ext ne "Yet") {
  129.  
  130. my $code = openfile($dir."/".$file);
  131. $lista_archivos->insert("end",$file);
  132. $logo->update;
  133. $re = lleva($name,$code,$ext);
  134. unless($re=~/Bad API request/ig) {
  135. $lista_re->insert("end","File Uploaded !!");
  136. savefile("uploads_paste.txt","\n[+] File : $file");
  137. savefile("uploads_paste.txt","[+] Link : ".$re);
  138. } else {
  139. $lista_re->insert("end","Error uploading");
  140. }
  141. }
  142. }
  143. } else {
  144. Win32::MsgBox("Directory Error",0,"PasteBin Uploader 0.5");
  145. }
  146.  
  147. }
  148.  
  149.  
  150. }
  151.  
  152. sub lognow {
  153. if (-f "logs/uploads_paste.txt") {
  154. You are not allowed to view links. Register or Login("start logs/uploads_paste.txt");
  155. }
  156. }
  157.  
  158. sub toma {
  159. You are not allowed to view links. Register or Login $nave->get($_[0])->content;
  160. }
  161.  
  162. sub savefile {
  163. You are not allowed to view links. Register or Login (SAVE,">>logs/".$_[0]);
  164. You are not allowed to view links. Register or Login SAVE $_[1]."\n";
  165. You are not allowed to view links. Register or Login SAVE;
  166. }
  167.  
  168. sub tomar {
  169. my ($web,$var) = @_;
  170. You are not allowed to view links. Register or Login $nave->post($web,[%{$var}])->content;
  171. }
  172.  
  173.  
  174. sub verdir{
  175. my @files;
  176. my @archivos;
  177. You are not allowed to view links. Register or Login DIR,$_[0];
  178. my @archivos = You are not allowed to view links. Register or Login DIR;
  179. for (@archivos) {
  180. if (-f $_[0]."/".$_) {
  181. You are not allowed to view links. Register or Login(@files,$_)
  182. }
  183. }
  184. You are not allowed to view links. Register or Login @files;
  185. }
  186.  
  187. sub verfile {
  188. if ($_[0]=~/(.*)\.(.*)/ig) {
  189. You are not allowed to view links. Register or Login ($1,$2);
  190. }
  191. }
  192.  
  193. sub extensiones {
  194.  
  195. if ($_[0] =~/py/ig) {
  196. $code  = "python";
  197. }
  198. elsif ($_[0] =~/pl/ig) {
  199. $code = "perl";
  200. }
  201. elsif ($_[0] =~/rb/ig) {
  202. $code = "ruby";
  203. }
  204. elsif ($_[0] =~/php/ig) {
  205. $code = "php";
  206. }
  207. elsif ($_[0] =~/txt/ig) {
  208. $code = "";
  209. }
  210. else {
  211. $code = "Yet";
  212. }
  213. You are not allowed to view links. Register or Login $code;
  214. }
  215.  
  216. sub openfile {
  217.        
  218. my $r;
  219.  
  220. You are not allowed to view links. Register or Login (FILE,$_[0]);
  221. @wor = <FILE>;
  222. You are not allowed to view links. Register or Login FILE;
  223. for(@wor) {
  224. $r.= $_;
  225. }
  226. You are not allowed to view links. Register or Login $r;
  227. }
  228.  
  229. sub lleva {
  230. You are not allowed to view links. Register or Login $nave->post('http://pastebin.com/api_public.php',{ paste_code => $_[1],paste_name=> $_[0],paste_format=>$_[2],paste_expire_date=>'N',paste_private=>"public",submit=>'submit'})->content;
  231. }
  232.  
  233. # ¿ The End ?
  234.  
  235.  
  236.  
« Última modificación: Julio 17, 2011, 03:41:47 am por Sthefano02 »

 

¿Te gustó el post? COMPARTILO!



Tutorial perl desde cero By: Black Poision & Painboy

Iniciado por ProcessKill

Respuestas: 2
Vistas: 3061
Último mensaje Septiembre 02, 2011, 09:43:36 pm
por blozzter
[Perl] Verificando si es root para correr un script

Iniciado por c1st

Respuestas: 1
Vistas: 1428
Último mensaje Octubre 07, 2012, 06:01:39 pm
por ANTRAX
[Uniscan] Scanner de vulnerabilidades WEB hecho en Perl

Iniciado por tar3kw0rm3d

Respuestas: 0
Vistas: 1563
Último mensaje Junio 02, 2013, 08:01:28 pm
por tar3kw0rm3d
[Perl] Counter Strike 1.6 Servers List

Iniciado por BigBear

Respuestas: 0
Vistas: 1113
Último mensaje Noviembre 12, 2012, 07:32:11 pm
por BigBear
DoSing IP 1.0 - [Creado por SkillmaX] + Source [PERL]

Iniciado por SkillmaX

Respuestas: 0
Vistas: 1344
Último mensaje Julio 04, 2010, 10:14:31 am
por SkillmaX