An Israeli military spokeswoman confirmed troops had shot at several gunmen in northern Gaza and hit two of them .