[Delphi] Spam King 0.2

Iniciado por BigBear, 14 Junio 2013, 19:04 PM

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

BigBear

Un simple programa para spammear en un canal IRC , solo ponen los mensajes a enviar y el programa cada cierto tiempo marcado por ustedes mandara mensajes privados a cada persona en ese canal marcado.

Una imagen :



El codigo

Código (delphi) [Seleccionar]

// Spam King 0.2
// Coded By Doddy H

unit irc;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, StdCtrls, sButton, sSkinManager, ExtCtrls, IdBaseComponent,
  IdComponent, IdTCPConnection, IdTCPClient, IdHTTP, IdContext, IdCmdTCPClient,
  IdIRC, sMemo, sGroupBox, sLabel, sEdit, ComCtrls, sStatusBar, sListBox,
  PerlRegEx, jpeg, acPNG;

type
  TForm1 = class(TForm)
    sSkinManager1: TsSkinManager;
    Timer1: TTimer;
    IdIRC1: TIdIRC;
    sGroupBox1: TsGroupBox;
    sLabel2: TsLabel;
    sEdit1: TsEdit;
    sEdit2: TsEdit;
    sLabel3: TsLabel;
    sEdit3: TsEdit;
    sLabel4: TsLabel;
    sEdit4: TsEdit;
    sStatusBar1: TsStatusBar;
    sGroupBox2: TsGroupBox;
    sListBox1: TsListBox;
    sLabel5: TsLabel;
    sEdit5: TsEdit;
    sButton2: TsButton;
    sGroupBox3: TsGroupBox;
    sListBox2: TsListBox;
    sButton1: TsButton;
    sLabel6: TsLabel;
    sEdit6: TsEdit;
    sButton3: TsButton;
    sGroupBox4: TsGroupBox;
    sMemo1: TsMemo;
    PerlRegEx1: TPerlRegEx;
    Console: TsGroupBox;
    sMemo2: TsMemo;
    sLabel1: TsLabel;
    Image1: TImage;
    sLabel7: TsLabel;
    procedure sButton1Click(Sender: TObject);
    procedure Timer1Timer(Sender: TObject);
    procedure IdIRC1PrivateMessage(ASender: TIdContext; const ANicknameFrom,
      AHost, ANicknameTo, AMessage: string);
    procedure sButton3Click(Sender: TObject);
    procedure IdIRC1NicknamesListReceived(ASender: TIdContext;
      const AChannel: string; ANicknameList: TStrings);
    procedure sButton2Click(Sender: TObject);
    procedure FormCreate(Sender: TObject);
    procedure IdIRC1Raw(ASender: TIdContext; AIn: Boolean;
      const AMessage: string);
    procedure IdIRC1Disconnected(Sender: TObject);
    procedure IdIRC1Connected(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  Form1: TForm1;

implementation

{$R *.dfm}

procedure TForm1.FormCreate(Sender: TObject);
begin

  sSkinManager1.SkinDirectory := ExtractFilePath(Application.ExeName) + 'Data';
  sSkinManager1.SkinName := 'tv-b';
  sSkinManager1.Active := True;

end;

procedure TForm1.IdIRC1Connected(Sender: TObject);
begin
  sStatusBar1.Panels[0].text := '[+] Connected ...';
  Form1.sStatusBar1.Update;
end;

procedure TForm1.IdIRC1Disconnected(Sender: TObject);
begin
  sStatusBar1.Panels[0].text := '[+] Stopped';
  Form1.sStatusBar1.Update;
end;

procedure TForm1.IdIRC1NicknamesListReceived
  (ASender: TIdContext; const AChannel: string; ANicknameList: TStrings);
var
  i: integer;
  i2: integer;
  renicks: string;
  listanow: TStringList;
  arraynow: array of String;

begin

  sListBox2.Clear;

  for i := 0 to ANicknameList.Count - 1 do
  begin

    PerlRegEx1.Regex := '(.*) = ' + sEdit3.text + ' :(.*)';
    PerlRegEx1.Subject := ANicknameList[i];

    if PerlRegEx1.Match then
    begin
      renicks := PerlRegEx1.SubExpressions[2];

      renicks := StringReplace(renicks, sEdit4.text, '', []);

      listanow := TStringList.Create;
      listanow.Delimiter := ' ';
      listanow.DelimitedText := renicks;

      for i2 := 0 to listanow.Count - 1 do
      begin
        sListBox2.Items.Add(listanow[i2]);
      end;

    end;

  end;

end;

procedure TForm1.IdIRC1PrivateMessage(ASender: TIdContext; const ANicknameFrom,
  AHost, ANicknameTo, AMessage: string);
begin
  sMemo1.Lines.Add(ANicknameFrom + ' : ' + AMessage);
end;

procedure TForm1.IdIRC1Raw(ASender: TIdContext; AIn: Boolean;
  const AMessage: string);
begin
  sMemo2.Lines.Add(AMessage);
end;

procedure TForm1.sButton1Click(Sender: TObject);
begin

  sListBox2.Items.Clear;
  sMemo2.Lines.Clear;
  sMemo1.Lines.Clear;

  IdIRC1.Host := sEdit1.text;
  IdIRC1.Port := StrToInt(sEdit2.text);
  IdIRC1.Nickname := sEdit4.text;
  IdIRC1.Username := sEdit4.text + ' 1 1 1 1';
  IdIRC1.AltNickname := sEdit4.text + '-123';

  try

    IdIRC1.Connect;
    IdIRC1.Join(sEdit3.text);

    Timer1.Interval := StrToInt(sEdit6.text) * 1000;
    Timer1.Enabled := True;

  except
    sStatusBar1.Panels[0].text := '[-] Error';
    Form1.sStatusBar1.Update;
  end;

end;

procedure TForm1.sButton2Click(Sender: TObject);
begin
  sListBox1.Items.Add(sEdit5.text);
end;

procedure TForm1.sButton3Click(Sender: TObject);
begin
  sStatusBar1.Panels[0].text := '[-] Stopped';
  Form1.sStatusBar1.Update;
  IdIRC1.Disconnect();
  Abort;

end;

procedure TForm1.Timer1Timer(Sender: TObject);
var
  i: integer;
begin

  sStatusBar1.Panels[0].text := '[+] Spamming ...';
  Form1.sStatusBar1.Update;

  for i := 0 to sListBox2.Count - 1 do
  begin

    IdIRC1.Say(sListBox2.Items[i], sListBox1.Items[Random(sListBox1.Count - 1)
        + 0]);

  end;

end;

end.

// The End ?


Si lo quieren bajar lo pueden hacer de aca