Foro de elhacker.net

Programación => Programación General => Mensaje iniciado por: BigBear en 5 Mayo 2013, 18:33 pm



Título: [Delphi] GetWhois 0.1
Publicado por: BigBear en 5 Mayo 2013, 18:33 pm
Siempre habia querido hacer un programa para hacer un whois en delphi pero en ese entonces no conocia delphi lo suficiente como para poder hacerlo , hoy me tome unos 10 min libres y logre hacer uno , para hacerlo instale indy y escribi unas pocas lineas para hacerlo.

Una imagen :

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

El codigo (muy corto xD)

Código
  1. // GetWhois 0.1
  2. // Coded By Doddy H in the year 2013
  3.  
  4. unit whois;
  5.  
  6. interface
  7.  
  8. uses
  9.  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  10.  Dialogs, StdCtrls, sMemo, sButton, sEdit, sLabel, sGroupBox, sSkinManager,
  11.  IdBaseComponent, IdComponent, IdTCPConnection, IdTCPClient, IdWhois, ComCtrls,
  12.  sStatusBar, jpeg, ExtCtrls;
  13.  
  14. type
  15.  TForm1 = class(TForm)
  16.    sSkinManager1: TsSkinManager;
  17.    sGroupBox1: TsGroupBox;
  18.    sLabel1: TsLabel;
  19.    sEdit1: TsEdit;
  20.    sButton1: TsButton;
  21.    sGroupBox2: TsGroupBox;
  22.    sMemo1: TsMemo;
  23.    IdWhois1: TIdWhois;
  24.    sStatusBar1: TsStatusBar;
  25.    Image1: TImage;
  26.    procedure sButton1Click(Sender: TObject);
  27.    procedure FormCreate(Sender: TObject);
  28.  private
  29.    { Private declarations }
  30.  public
  31.    { Public declarations }
  32.  end;
  33.  
  34. var
  35.  Form1: TForm1;
  36.  
  37. implementation
  38.  
  39. {$R *.dfm}
  40.  
  41. procedure TForm1.FormCreate(Sender: TObject);
  42. begin
  43.  sSkinManager1.SkinDirectory := ExtractFilePath(Application.ExeName) + 'Data';
  44.  sSkinManager1.SkinName := 'garnet';
  45.  sSkinManager1.Active := True;
  46. end;
  47.  
  48. procedure TForm1.sButton1Click(Sender: TObject);
  49. begin
  50.  
  51.  if sEdit1.text = '' then
  52.  begin
  53.    ShowMessage('Write the domain');
  54.  end
  55.  else
  56.  begin
  57.    sStatusBar1.Panels[0].text := '[+] Searching ...';
  58.    Form1.sStatusBar1.Update;
  59.  
  60.    sMemo1.Clear;
  61.    sMemo1.Lines.text := IdWhois1.whois(sEdit1.text);
  62.  
  63.    sStatusBar1.Panels[0].text := '';
  64.    Form1.sStatusBar1.Update;
  65.  end;
  66. end;
  67.  
  68. end.
  69.  
  70. // The End ?
  71.  

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