Skip to content

Commit

Permalink
Usernames in lowercase for title are no added to username list. If no…
Browse files Browse the repository at this point in the history
… username is found, continue working on remaining tasks.
  • Loading branch information
atarantini committed Aug 14, 2011
1 parent 6976822 commit 7baa205
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
5 changes: 2 additions & 3 deletions wpbf.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,7 @@
if args.enumerateusers:
exit(0)
else:
logger.error("Can't find username :(")
exit(0)
logger.error("Can't find usernames :(")
except urllib2.HTTPError:
logger.error("HTTP Error on: %s", wp.get_login_url())
exit(0)
Expand Down Expand Up @@ -146,7 +145,7 @@
wps = delta_time / delta_queue
except ZeroDivisionError:
wps = 0.6
print str(current_queue)+" tasks left / "+str(round(1 / wps, 2))+" tasks per second / "+str( round((wps*current_queue / 60)/60, 2) )+"h left"
print str(current_queue)+" tasks left / "+str(round(1 / wps, 2))+" tasks per second / "+str( round(wps*current_queue / 60, 2) )+"min left"
except KeyboardInterrupt:
logger.info("Clearing queue and killing threads...")
task_queue.queue.clear()
Expand Down
2 changes: 0 additions & 2 deletions wplib.py
Original file line number Diff line number Diff line change
Expand Up @@ -261,8 +261,6 @@ def enumerate_usernames(self, gap_tolerance=0):
username_title = self.get_user_from_title(data)
if username_title and username_title not in usernames:
usernames.append(username_title)
if username_title.lower() not in usernames:
usernames.append(username_title.lower())
gaps = 0

# Check for author in content
Expand Down

0 comments on commit 7baa205

Please sign in to comment.