German officials said there are indications that a gunman who shot dead nine people in shisha bars in Hanau in an overnight rampage had a far-right motive.