I was thinking of writing such program, but apparently they already exist.
Bidding at the last seconds increases chance of good bargains on common/multiple/relisted ebay products. Unlike some auction sites, Ebay doesn't extend end time for bidding.
Instead of writing my own automatic bidding software, perhaps I should use some of these so called "auction snipers" or snipe/snipes such as Ebay Auction Sniper, Gixen, etc.
The only trouble I have is they could be either unsecure (web version thus requiring user/pass of ebay account entered) or not free.