Gunman disarmed after attacking civilian