elhacker.net cabecera Bienvenido(a), Visitante. Por favor Ingresar o Registrarse
¿Perdiste tu email de activación?.

 

 


Tema destacado: Rompecabezas de Bitcoin, Medio millón USD en premios


+  Foro de elhacker.net
|-+  Programación
| |-+  Programación General
| | |-+  [Delphi] KingSpam 0.4
0 Usuarios y 1 Visitante están viendo este tema.
Páginas: [1] Ir Abajo Respuesta Imprimir
Autor Tema: [Delphi] KingSpam 0.4  (Leído 1,709 veces)
BigBear


Desconectado Desconectado

Mensajes: 545



Ver Perfil
[Delphi] KingSpam 0.4
« en: 22 Mayo 2015, 17:23 pm »

Un simple programa para hacer spam en canales IRC , tambien puede listar canales y usuarios.

Es algo inestable les recomiendo la version en Perl.

Una imagen :



Código
  1. // KingSpam 0.4
  2. // (C) Doddy Hackman 2015
  3.  
  4. unit spam;
  5.  
  6. interface
  7.  
  8. uses
  9.  Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants,
  10.  System.Classes, Vcl.Graphics,
  11.  Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Vcl.ComCtrls, Vcl.StdCtrls,
  12.  Vcl.Imaging.pngimage, Vcl.ExtCtrls, IdContext, IdBaseComponent, IdComponent,
  13.  IdTCPConnection, IdTCPClient, IdCmdTCPClient, IdIRC, PerlRegEx, Vcl.Menus,
  14.  ShellApi;
  15.  
  16. type
  17.  TForm1 = class(TForm)
  18.    PageControl1: TPageControl;
  19.    TabSheet1: TTabSheet;
  20.    GroupBox1: TGroupBox;
  21.    Label1: TLabel;
  22.    host: TEdit;
  23.    Label2: TLabel;
  24.    port: TEdit;
  25.    Label3: TLabel;
  26.    nombre: TEdit;
  27.    Label4: TLabel;
  28.    canal: TEdit;
  29.    Label5: TLabel;
  30.    spam: TEdit;
  31.    Button1: TButton;
  32.    Button2: TButton;
  33.    Button3: TButton;
  34.    TabSheet2: TTabSheet;
  35.    GroupBox2: TGroupBox;
  36.    GroupBox3: TGroupBox;
  37.    canales: TListBox;
  38.    users: TListBox;
  39.    TabSheet3: TTabSheet;
  40.    GroupBox4: TGroupBox;
  41.    GroupBox5: TGroupBox;
  42.    lista_canales: TListBox;
  43.    console1: TMemo;
  44.    Label6: TLabel;
  45.    canal_agregar: TEdit;
  46.    Button4: TButton;
  47.    Button5: TButton;
  48.    TabSheet5: TTabSheet;
  49.    GroupBox8: TGroupBox;
  50.    console2: TMemo;
  51.    IdIRC1: TIdIRC;
  52.    Button9: TButton;
  53.    StatusBar1: TStatusBar;
  54.    GroupBox6: TGroupBox;
  55.    canal_spam_usuarios: TEdit;
  56.    TabSheet4: TTabSheet;
  57.    GroupBox7: TGroupBox;
  58.    Image2: TImage;
  59.    Label7: TLabel;
  60.    PopupMenu1: TPopupMenu;
  61.    L1: TMenuItem;
  62.    R1: TMenuItem;
  63.    OpenDialog1: TOpenDialog;
  64.    file_spam: TListBox;
  65.    spam_usuarios: TTimer;
  66.    Button11: TButton;
  67.    Button6: TButton;
  68.    otrospamfile: TListBox;
  69.    Image3: TImage;
  70.    procedure Button2Click(Sender: TObject);
  71.    procedure IdIRC1Raw(ASender: TIdContext; AIn: Boolean;
  72.      const AMessage: string);
  73.  
  74.    procedure Button3Click(Sender: TObject);
  75.    procedure Button4Click(Sender: TObject);
  76.    procedure Button5Click(Sender: TObject);
  77.  
  78.    procedure Button1Click(Sender: TObject);
  79.    procedure L1Click(Sender: TObject);
  80.    procedure R1Click(Sender: TObject);
  81.    procedure spam_usuariosTimer(Sender: TObject);
  82.    procedure Button11Click(Sender: TObject);
  83.    procedure Button6Click(Sender: TObject);
  84.    procedure FormCreate(Sender: TObject);
  85.  
  86.  private
  87.    { Private declarations }
  88.  public
  89.    { Public declarations }
  90.  end;
  91.  
  92. var
  93.  Form1: TForm1;
  94.  buscando_usuarios: string;
  95.  buscando_canales: string;
  96.  control_guardar_canales: string;
  97.  control_guardar_users: string;
  98.  
  99. implementation
  100.  
  101. {$R *.dfm}
  102. // Functions
  103.  
  104. procedure savefile(filename, texto: string);
  105. var
  106.  ar: TextFile;
  107.  
  108. begin
  109.  
  110.  AssignFile(ar, filename);
  111.  FileMode := fmOpenWrite;
  112.  
  113.  if FileExists(filename) then
  114.    Append(ar)
  115.  else
  116.    Rewrite(ar);
  117.  
  118.  Write(ar, texto + sLineBreak);
  119.  CloseFile(ar);
  120.  
  121. end;
  122.  
  123. procedure TForm1.Button11Click(Sender: TObject);
  124. begin
  125.  StatusBar1.Panels[0].Text := '[+] Finished';
  126.  StatusBar1.Update;
  127.  IdIRC1.Disconnect;
  128.  spam_usuarios.Enabled := false;
  129. end;
  130.  
  131. procedure TForm1.Button1Click(Sender: TObject);
  132. var
  133.  i: integer;
  134.  contenido: TStringList;
  135.  stream: TFileStream;
  136. begin
  137.  
  138.  file_spam.Clear;
  139.  
  140.  if OpenDialog1.Execute then
  141.  begin
  142.  
  143.    spam.Text := OpenDialog1.filename;
  144.  
  145.    contenido := TStringList.Create;
  146.    stream := TFileStream.Create((OpenDialog1.filename), fmShareDenyNone);
  147.    contenido.LoadFromStream(stream);
  148.  
  149.    for i := 0 to contenido.Count - 1 do
  150.    begin
  151.      file_spam.Items.Add(contenido[i]);
  152.    end;
  153.  end;
  154.  
  155. end;
  156.  
  157. procedure TForm1.Button2Click(Sender: TObject);
  158. var
  159.  seleccion: integer;
  160. begin
  161.  
  162.  canales.Items.Clear;
  163.  
  164.  buscando_canales := 'yes';
  165.  
  166.  seleccion := MessageDlg('Save Channels', mtInformation, mbYesNo, 0);
  167.  if seleccion = mrYes then
  168.  begin
  169.    control_guardar_canales := 'yes';
  170.  end;
  171.  
  172.  StatusBar1.Panels[0].Text := '[+] Searching channels ...';
  173.  StatusBar1.Update;
  174.  
  175.  // IdIRC1.Disconnect;
  176.  
  177.  IdIRC1.Nickname := nombre.Text;
  178.  IdIRC1.AltNickname := nombre.Text + '123';
  179.  IdIRC1.Username := nombre.Text;
  180.  IdIRC1.RealName := nombre.Text;
  181.  IdIRC1.Password := '';
  182.  IdIRC1.host := host.Text;
  183.  
  184.  try
  185.    begin
  186.      IdIRC1.Connect;
  187.      IdIRC1.Raw('LIST');
  188.    end;
  189.  except
  190.    begin
  191.      ShowMessage('Error connecting');
  192.    end;
  193.  end;
  194.  
  195.  if (FileExists(GetCurrentDir + '/logs/' + host.Text + '_canales.txt')) then
  196.  begin
  197.    ShellExecute(Handle, 'open', Pchar(GetCurrentDir + '/logs/' + host.Text +
  198.      '_canales.txt'), nil, nil, SW_SHOWNORMAL);
  199.  end;
  200.  
  201. end;
  202.  
  203. procedure TForm1.Button3Click(Sender: TObject);
  204. var
  205.  seleccion: integer;
  206. begin
  207.  
  208.  users.Items.Clear;
  209.  
  210.  buscando_usuarios := 'yes';
  211.  
  212.  seleccion := MessageDlg('Save users', mtInformation, mbYesNo, 0);
  213.  if seleccion = mrYes then
  214.  begin
  215.    control_guardar_users := 'yes';
  216.  end;
  217.  
  218.  StatusBar1.Panels[0].Text := '[+] Searching users ...';
  219.  StatusBar1.Update;
  220.  
  221.  // IdIRC1.Disconnect;
  222.  
  223.  IdIRC1.Nickname := nombre.Text;
  224.  IdIRC1.AltNickname := nombre.Text + '123';
  225.  IdIRC1.Username := nombre.Text;
  226.  IdIRC1.RealName := nombre.Text;
  227.  IdIRC1.Password := '';
  228.  IdIRC1.host := host.Text;
  229.  
  230.  try
  231.    begin
  232.      IdIRC1.Connect;
  233.      IdIRC1.Join(canal.Text);
  234.    end;
  235.  except
  236.    begin
  237.      ShowMessage('Error connecting');
  238.    end;
  239.  end;
  240.  
  241.  if (FileExists(GetCurrentDir + '/logs/' + canal.Text + '_usuarios.txt')) then
  242.  begin
  243.    ShellExecute(Handle, 'open', Pchar(GetCurrentDir + '/logs/' + canal.Text +
  244.      '_usuarios.txt'), nil, nil, SW_SHOWNORMAL);
  245.  end;
  246.  
  247. end;
  248.  
  249. procedure TForm1.Button4Click(Sender: TObject);
  250. begin
  251.  lista_canales.Items.Add(canal_agregar.Text);
  252. end;
  253.  
  254. procedure TForm1.Button5Click(Sender: TObject);
  255. var
  256.  i: integer;
  257.  canal_z: string;
  258. begin
  259.  
  260.  StatusBar1.Panels[0].Text := '[+] Spamming channel ...';
  261.  StatusBar1.Update;
  262.  
  263.  console1.Clear;
  264.  try
  265.    begin
  266.      IdIRC1.Nickname := nombre.Text;
  267.      IdIRC1.AltNickname := nombre.Text + '123';
  268.      IdIRC1.Username := nombre.Text;
  269.      IdIRC1.RealName := nombre.Text;
  270.      IdIRC1.Password := '';
  271.      IdIRC1.host := host.Text;
  272.      IdIRC1.Connect;
  273.  
  274.      for i := 0 to lista_canales.Count - 1 do
  275.      begin
  276.        canal_z := lista_canales.Items[i];
  277.        IdIRC1.Join(canal_z);
  278.        console1.Lines.Add('[+] Spam in channel : ' + canal_z);
  279.        IdIRC1.Say(canal_z, file_spam.Items[Random(file_spam.Count - 1) + 0]);
  280.        Sleep(2000);
  281.        IdIRC1.Part(canal_z);
  282.        Sleep(2000);
  283.      end;
  284.    end;
  285.  except
  286.    ShowMessage('Error connecting');
  287.  end;
  288.  
  289.  IdIRC1.Disconnect;
  290.  
  291.  StatusBar1.Panels[0].Text := '[+] Finished';
  292.  StatusBar1.Update;
  293.  
  294. end;
  295.  
  296. procedure TForm1.Button6Click(Sender: TObject);
  297. begin
  298.  StatusBar1.Panels[0].Text := '[+] Spamming users ...';
  299.  StatusBar1.Update;
  300.  
  301.  IdIRC1.Nickname := nombre.Text;
  302.  IdIRC1.AltNickname := nombre.Text + '123';
  303.  IdIRC1.Username := nombre.Text;
  304.  IdIRC1.RealName := nombre.Text;
  305.  IdIRC1.Password := '';
  306.  IdIRC1.host := host.Text;
  307.  
  308.  try
  309.    begin
  310.      IdIRC1.Connect;
  311.      IdIRC1.Join(canal_spam_usuarios.Text);
  312.      spam_usuarios.Interval := 10000;
  313.      spam_usuarios.Enabled := true;
  314.    end;
  315.  except
  316.    begin
  317.      ShowMessage('Error connecting');
  318.    end;
  319.  end;
  320. end;
  321.  
  322. procedure TForm1.FormCreate(Sender: TObject);
  323. begin
  324.  
  325.  if not DirectoryExists('logs') then
  326.  begin
  327.    CreateDir('logs');
  328.  end;
  329.  
  330.  OpenDialog1.InitialDir := GetCurrentDir;
  331.  
  332. end;
  333.  
  334. procedure TForm1.IdIRC1Raw(ASender: TIdContext; AIn: Boolean;
  335.  const AMessage: string);
  336. var
  337.  code: string;
  338.  regex: TPerlRegEx;
  339.  otroregex: TPerlRegEx;
  340.  canales_encontrados: string;
  341.  control: TPerlRegEx;
  342.  otrocontrol: TPerlRegEx;
  343.  i: integer;
  344.  i2: integer;
  345.  renicks: string;
  346.  listanow: TStringList;
  347.  arraynow: array of String;
  348.  
  349. begin
  350.  code := AMessage;
  351.  
  352.  regex := TPerlRegEx.Create();
  353.  otroregex := TPerlRegEx.Create();
  354.  
  355.  // console1.Lines.Add(code);
  356.  
  357.  regex.regex := '322 (.*?) (.*?) (.*?) :';
  358.  regex.Subject := code;
  359.  
  360.  if regex.Match then
  361.  begin
  362.    canales_encontrados := regex.Groups[2];
  363.    canales.Items.Add(canales_encontrados);
  364.    if (control_guardar_canales = 'yes') then
  365.    begin
  366.      savefile('logs/' + host.Text + '_canales.txt', canales_encontrados);
  367.    end;
  368.  end;
  369.  
  370.  otroregex.regex := '353 (.*) = #(.*) :(.*)';
  371.  otroregex.Subject := code;
  372.  
  373.  if otroregex.Match then
  374.  begin
  375.  
  376.    renicks := otroregex.Groups[3];
  377.  
  378.    renicks := StringReplace(renicks, nombre.Text, '', []);
  379.  
  380.    listanow := TStringList.Create;
  381.    listanow.Delimiter := ' ';
  382.    listanow.DelimitedText := renicks;
  383.  
  384.    for i2 := 0 to listanow.Count - 1 do
  385.    begin
  386.      users.Items.Add(listanow[i2]);
  387.      if (control_guardar_users = 'yes') then
  388.      begin
  389.        savefile('logs/' + canal.Text + '_usuarios.txt', listanow[i2]);
  390.      end;
  391.    end;
  392.  end;
  393.  
  394.  control := TPerlRegEx.Create();
  395.  control.regex := 'End of /LIST';
  396.  control.Subject := code;
  397.  if control.Match then
  398.  begin
  399.    if (buscando_canales = 'yes') then
  400.    begin
  401.      ShowMessage('Channels Loaded');
  402.      StatusBar1.Panels[0].Text := '[+] Channels Found';
  403.      StatusBar1.Update;
  404.      regex.Free;
  405.      IdIRC1.Disconnect;
  406.      IdIRC1.Destroy;
  407.      buscando_canales := 'no';
  408.    end;
  409.  end;
  410.  
  411.  otrocontrol := TPerlRegEx.Create();
  412.  otrocontrol.regex := 'End of /NAMES';
  413.  otrocontrol.Subject := code;
  414.  if otrocontrol.Match then
  415.  begin
  416.    if (buscando_usuarios = 'yes') then
  417.    begin
  418.      ShowMessage('Users Loaded');
  419.      StatusBar1.Panels[0].Text := '[+] Users Found';
  420.      StatusBar1.Update;
  421.      otrocontrol.Free;
  422.      IdIRC1.Part(canal.Text);
  423.      IdIRC1.Disconnect;
  424.      IdIRC1.Destroy();
  425.      buscando_usuarios := 'no';
  426.    end;
  427.  end;
  428.  
  429. end;
  430.  
  431. procedure TForm1.L1Click(Sender: TObject);
  432. var
  433.  i: integer;
  434.  contenido: TStringList;
  435.  stream: TFileStream;
  436. begin
  437.  
  438.  if OpenDialog1.Execute then
  439.  begin
  440.    contenido := TStringList.Create;
  441.    stream := TFileStream.Create((OpenDialog1.filename), fmShareDenyNone);
  442.    contenido.LoadFromStream(stream);
  443.  
  444.    for i := 0 to contenido.Count - 1 do
  445.    begin
  446.      lista_canales.Items.Add(contenido[i]);
  447.    end;
  448.  end;
  449.  
  450. end;
  451.  
  452. procedure TForm1.R1Click(Sender: TObject);
  453. begin
  454.  lista_canales.Clear;
  455. end;
  456.  
  457. procedure TForm1.spam_usuariosTimer(Sender: TObject);
  458. var
  459.  i: integer;
  460. begin
  461.  
  462.  for i := 0 to users.Count - 1 do
  463.  begin
  464.  
  465.    StatusBar1.Panels[0].Text := '[+] Spamming to ' + users.Items[i];
  466.    StatusBar1.Update;
  467.  
  468.    console2.Lines.Add('[+] Spamming to ' + users.Items[i]);
  469.  
  470.    IdIRC1.Say(users.Items[i],
  471.      file_spam.Items[Random(file_spam.Count - 1) + 0]);
  472.  
  473.  end;
  474.  
  475. end;
  476.  
  477. end.
  478.  
  479. // The End ?
  480.  

Si lo quieren bajar lo pueden hacer de aca


En línea

Br1ant


Desconectado Desconectado

Mensajes: 791


Incluso la "nada" es un "algo"


Ver Perfil WWW
Re: [Delphi] KingSpam 0.4
« Respuesta #1 en: 23 Mayo 2015, 11:07 am »

Aportazo, esencial para los que iniciamos en Perl!

Saludos!


En línea

Namasté, criatura.
Páginas: [1] Ir Arriba Respuesta Imprimir 

Ir a:  

Mensajes similares
Asunto Iniciado por Respuestas Vistas Último mensaje
[Descarga] CodeGear RAD Studio - Delphi 2007 + Delphi for PHP « 1 2 3 »
Software
GroK 26 25,367 Último mensaje 14 Mayo 2014, 17:51 pm
por sebaseok
[Perl] KingSpam 0.8
Scripting
BigBear 0 1,569 Último mensaje 24 Enero 2014, 17:17 pm
por BigBear
[Ruby] KingSpam 0.4
Scripting
BigBear 0 1,377 Último mensaje 18 Septiembre 2015, 16:49 pm
por BigBear
WAP2 - Aviso Legal - Powered by SMF 1.1.21 | SMF © 2006-2008, Simple Machines