Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit c471b81

Browse files
committed
fix for a bug reported by BugTrace (IndexError: list index out of range)
1 parent bfc9378 commit c471b81

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

lib/core/option.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -946,7 +946,7 @@ def __setHTTPUserAgent():
946946
if __count == 1:
947947
__userAgent = kb.userAgents[0]
948948
else:
949-
__userAgent = kb.userAgents[randomRange(stop=__count)]
949+
__userAgent = kb.userAgents[randomRange(stop=__count-1)]
950950

951951
__userAgent = sanitizeStr(__userAgent)
952952
conf.httpHeaders.append(("User-Agent", __userAgent))

0 commit comments

Comments
 (0)