1
Python Scripting / Re: Import payloads in Python script
« on: January 15, 2015, 06:24:53 PM »
Now it's Working!!!!!
Thanks a lot for your support!
Marco!
Thanks a lot for your support!
Marco!
This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
import socket
import sys
def doSimpleThing(var):
temp = str(var)
try:
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
except socket.error:
print 'Failed to create socket'
sys.exit()
host = '192.168.1.40';
port = 20000;
zona = '6'
try:
remote_ip = socket.gethostbyname( host )
except socket.gaierror:
print 'Hostname could not be resolved. Exiting'
sys.exit()
s.connect((remote_ip , port))
message1 = "*99*0##"
message2 = "*#4*" + zona + "*#14*" + "0" + temp + "0" + "*1##"
try :
s.sendall(message1)
except socket.error:
print 'Send failed'
sys.exit()
try :
s.sendall(message2)
except socket.error:
print 'Send failed'
sys.exit()
import socket
import sys
from System.Collections.Generic import *
vc.triggerEvent("t.zonagiorno", List[str](["payload1"]))
print str
try:
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
except socket.error:
print 'Failed to create socket'
sys.exit()
host = '192.168.1.12';
port = 35869;
zona = '6'
try:
remote_ip = socket.gethostbyname( host )
except socket.gaierror:
print 'Hostname could not be resolved. Exiting'
sys.exit()
s.connect((remote_ip , port))
message1 = "*569*85*8"
message2 = "*#4*" + zona + "*#14*" + "0" + str + "0" + "*1##"
try :
s.sendall(message1)
except socket.error:
print 'Send failed'
sys.exit()
try :
s.sendall(message2)
except socket.error:
print 'Send failed'
sys.exit()