quentinhardy / odat

ODAT: Oracle Database Attacking Tool
1.62k stars 344 forks source link

Uncatched exception when passing single port ranges #8

Closed epinna closed 8 years ago

epinna commented 8 years ago

Hello,

I experienced certain crashes when passing a single port on httpuritype scan-ports option with a single port. It also crashed with 80-80.

$ ./odat.py httpuritype -s IP -d SID -p PORT -U USER -P PWD --scan-ports HOST 80
05:19:56 ERROR -: Syntax for ports given not recognized (ex: 123-2452 or 143,134,4783)

Traceback (most recent call last):
  File "./odat.py", line 456, in <module>
    main()
  File "./odat.py", line 451, in main
    arguments.func(args)
  File "/home/epinna/tools/odat/HttpUriType.py", line 81, in runHttpUriTypeModule
    resultats = httpUriType.scanTcpPorts(httpObject=httpUriType,ip=args['scan-ports'][0],ports=ports)
  File "/home/epinna/tools/odat/Http.py", line 79, in scanTcpPorts
    pbar,nb = self.getStandardBarStarted(len(ports)),Queue.Queue(1)
  File "/home/epinna/tools/odat/OracleDatabase.py", line 243, in getStandardBarStarted
    return ProgressBar(widgets=['', Percentage(), ' ', Bar(),' ', ETA(), ' ',''], maxval=maxvalue).start()
  File "/home/epinna/tools/odat/progressbar.py", line 213, in __init__
    assert maxval > 0
AssertionError

Cheers

quentinhardy commented 8 years ago

Thank you for the issue. Bug fix done.