【发布时间】:2022-12-12 07:13:32
【问题描述】:
我正在使用一个名为 callow 的暴力破解脚本,我试图在一个免费的沙箱上对其进行测试(因为我正在学习道德黑客),当我运行该脚本时,我遇到了这些错误:
Traceback (most recent call last):
File "C:\Users\Joe\callow\callow.py", line 163, in <module>
wizard()
File "C:\Users\Joe\callow\callow.py", line 93, in wizard
brutes(username, username_selector, password_selector, submit_selector, pass_list, website)
File "C:\Users\Joe\callow\callow.py", line 119, in brutes
Sel_user = browser.find_element_by_css_selector(username_selector) # Finds Selector
AttributeError: 'WebDriver' object has no attribute 'find_element_by_css_selector'
这是我的代码中错误似乎源自的部分。
try:
Sel_user = browser.find.element_by_css_selector(username_selector) # Finds Selector
except selenium.common.exceptions.NoSuchElementException:
print((color.RED + '\n[!]'+ color.CWHITE + ' Username feild selector is invalid.'))
sys.stdout.flush()
exit()
try:
Sel_pas = browser.find_element_by_css_selector(password_selector) # Finds Selector
except selenium.common.exceptions.NoSuchElementException:
print((color.RED + '\n[!]'+ color.CWHITE + ' Password feild selector is invalid.'))
sys.stdout.flush()
exit()
try:
enter = browser.find.element_by_css_selector(submit_selector) # Finds Selector
except selenium.common.exceptions.NoSuchElementException:
print((color.RED + '\n[!]'+ color.CWHITE + ' Login button selector is invalid.'))
sys.stdout.flush()
exit()
我怎样才能解决这个问题?
【问题讨论】:
标签: python brute-force