Two spyware bills, one requiring that permission is granted before personal information is collected, have passed through the US House of Representatives.

The Securely Protect Yourself Against Cyber Trespass Act, or Spy Act, would also outlaw the act of taking over a computer in order to send unauthorised information or code, or diverting a Web browser without the permission of the computer owner.

The bill, which passed the House on a vote of 393-4, prohibits Web advertising that computer users cannot close "without undue effort" or without shutting down the computer, and it prohibits collecting personal information through keystroke logging.

A second bill, the Internet Spyware Prevention Act, or I-Spy Act, sets jail terms of up to five years for a person who uses spyware to access a computer without authorisation and uses the computer to commit another federal crime. The I-Spy Act also would allow a jail term of up to two years for a person who uses spyware to obtain someone else's personal information or to defeat security protections on a computer with the intent of defrauding or injuring the computer owner.

The I-Spy Act, sponsored by Virginia Republican Representative Bob Goodlatte, passed the House by a vote of 395-1. Both bills still have to pass the US Senate and be signed by President George Bush to become law. In October, both bills passed the House of Representatives but failed to make it through the Senate.

The Spy Act, sponsored by California Republican Representative Mary Bono, would allow fines of up to $3 million for spyware-like activity such as delivering unauthorised software to a computer or hijacking a Web browser. Security software updates are exempted from the Spy Act.

Unlike an older Bono bill, this version of the Spy Act doesn't attempt to define spyware, but outlaws several actions commonly associated with spyware.

An earlier Bono spyware bill, introduced in July 2003, broadly prohibited and defined spyware. Some software vendors, including those that market anti-virus update software, objected that the definition was overly broad and could subject their services to fines.

Microsoft issued a statement praising both new bills as providing "important tools in the battle against spyware and other deceptive software." But Microsoft also called for the Senate to include language that would protect vendors of anti-spyware software from lawsuits by companies distributing spyware. Microsoft released its own Windows AntiSpyware software in January.