A much more probable scenario: Tehran would use the attack to invoke Article 10 of the Nuclear Non-Proliferation Treaty (NPT) and withdraw from the treaty altogether. This article gives each party the right to withdraw if it decides that extraordinary events "have jeopardized the supreme interests of its country." Iran would cease all cooperation with the International Atomic Energy Agency, expel all UN inspectors, and by that, deprive the international community of much-needed transparency and insight.
More ominously, the attack could prompt the Iranian leadership to make the crucial decision to seek an actual nuclear bomb and not just the capability to build one, while accentuating Iran's role as a power against the status quo.
Consequently, a successful bombing campaign by either the US or Israel would simply guarantee a nuclear armed and vengeful Iran five years down the road. Mohamed ElBaradei, the head of the IAEA, said recently that if Iran left the NPT, it could build a nuclear weapon within a year.