Hamas tells Iran it can confront Israel in Gaza for months