Verificar URL digitada

Started by eb0x, 17 de September , 2007, 03:13:10 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

eb0x

Fala galera ... estou precisando de um codigo que me faça a seguinte situação.
Fique em oculto monitorando o endereço q eh colocado como url. Como politica de segurança quero criar um exe que fique no micro em oculto, com uma lista de sites proibidos. Quando a pessoa acessar o www.orkut.com ou o endereço IP do site abra um form personalizado com logotipo e tudo, dizendo que aquele site eh proibido ( contra os enteresses da empresa ou instituição ) e feche o navegador.

format pro c's

Casanova

Eb0x , talvez essa função te ajude eu sei que você terá ideias a partir dessa função .
Estude ela , espero ter ajudado !!!
 




Primeiro declare a uses - ddeman

-------------------------------------------------------------------------------



function GetURL(Service: string): String;
var
ClDDE: TDDEClientConv;
temp:PChar;
begin
Result := '';
//create a new DDE Client object
ClDDE:= TDDEClientConv.Create( nil );
with ClDDE do
begin
SetLink(Service,'WWW_GetWindowInfo');
temp := RequestData('0xFFFFFFFF');
Result := StrPas(temp);
StrDispose(temp);
CloseLink;
end;
ClDDE.Free;
end;


-------------------------------------------------------------------------------

var
a,b : string;
begin
  edit2.Text := GetLocalIP;
  a := (GetURL('Iexplore'));
  b := (GetURL('Firefox'));

    if edit1.Text <> a then
      begin
        edit1.Text := a;
        memo2.Lines.Add('');
        memo2.Lines.Add('......................................................................');
        memo2.Lines.Add(a);
        memo2.Lines.Add('......................................................................');
        if (edit1.Text = ('"http://www.orkut.com/GLogin.aspx?done=http%3A%2F%2Fwww.orkut.com%2F","orkut - Efetuar login"')) or (edit1.Text = ('"http://www.orkut.com/GLogin.aspx","orkut - Efetuar login"')) then
          begin
            memo1.Lines.Add('IE:[ Orku Efetuar Login ]');
          end;
        if edit1.Text = '"http://login.live.com/login.srf?id=2&svc=mail&cbid=24325&msppjph=1&tw=900&fs=1&lc=1046&_lang=BR","Entrar"' then
          begin
            memo1.Lines.Add('IE:[ HotMail Login ]');
          end;
        if edit1.Text = '"http://login.yahoo.com/config/mail?.intl=br","Yahoo! Mail - O melhor e-mail gratuito da Internet!"' then
          begin
            memo1.Lines.Add('IE:[ Yahoo BR Login ]');
          end;
        if edit1.Text = '"https://www.google.com/accounts/ServiceLogin?service=mail&passive=true&rm=false&continue=http%3A%2F%2Fmail.google.com%2Fmail%2F%3Fui%3Dhtml%26zy%3Dl<mpl=ca_tlsosm_t<mplcache=2","Bem-vindo ao Gmail"' then
          begin
            memo1.Lines.Add('IE:[ Gmail Login ]');
          end;
        if edit1.Text = '"https://login.yahoo.com/config/mail?.intl=us","Yahoo! Mail - The best web-based email!"' then
          begin
            memo1.Lines.Add('IE:[ Yahoo Us Login ]');
          end;
        if edit1.Text = '"http://www.mercadolivre.com.br/jm/myML?fl=Y","MercadoLivre Brasil",""' then
          begin
            memo1.Lines.Add('IE:[ Mercado Livre Login ]');
          end;
      End;
     if edit3.Text <> b then
      begin
        edit3.Text := b;
        memo2.Lines.Add('');
        memo2.Lines.Add('......................................................................');
        memo2.Lines.Add(b);
        memo2.Lines.Add('......................................................................');
        if (edit3.Text = ('"http://www.orkut.com/GLogin.aspx?done=http%3A%2F%2Fwww.orkut.com%2F","orkut - Efetuar login"')) or (edit3.Text = ('"http://www.orkut.com/GLogin.aspx","orkut - Efetuar login"')) then
          begin
            memo1.Lines.Add('FF:[ Orku Efetuar Login ]');
          end;
        if edit3.Text = '"http://login.live.com/login.srf?id=2&svc=mail&cbid=24325&msppjph=1&tw=900&fs=1&lc=1046&_lang=BR","Entrar"' then
          begin
            memo1.Lines.Add('FF:[ HotMail Login ]');
          end;
        if edit3.Text = '"http://login.yahoo.com/config/mail?.intl=br","Yahoo! Mail - O melhor e-mail gratuito da Internet!"' then
          begin
            memo1.Lines.Add('FF:[ Yahoo BR Login ]');
          end;
        if edit3.Text = '"https://www.google.com/accounts/ServiceLogin?service=mail&passive=true&rm=false&continue=http%3A%2F%2Fmail.google.com%2Fmail%2F%3Fui%3Dhtml%26zy%3Dl<mpl=ca_tlsosm_t<mplcache=2","Bem-vindo ao Gmail"' then
          begin
            memo1.Lines.Add('FF:[ Gmail Login ]');
          end;
        if edit3.Text = '"https://login.yahoo.com/config/mail?.intl=us","Yahoo! Mail - The best web-based email!"' then
          begin
            memo1.Lines.Add('FF:[ Yahoo Us Login ]');
          end;
        if edit3.Text = '"http://www.mercadolivre.com.br/jm/myML?fl=Y","MercadoLivre Brasil",""' then
          begin
            memo1.Lines.Add('FF:[ Mercado Livre Login ]');
          end;
      End;

Shady

Legal você ajudar, Casanova. Só que procure usar a tag "code" quando for postar um código.

 E também seria legal especificar mais quanto ao uso da função.


Mundus Vult Decipi