Skip to content

Commit

Permalink
Update nudge.py
Browse files Browse the repository at this point in the history
  • Loading branch information
MrStonedOne committed Feb 2, 2016
1 parent b0d14cf commit fd1f683
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions bot/nudge.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,20 @@


def pack():
ip = sys.argv[1]
try:
data = sys.argv[2:]
except:
data = "NO DATA SPECIFIED"
ip = sys.argv[1]
try:
data = sys.argv[2:]
except:
data = "NO DATA SPECIFIED"

nudge(pickle.dumps({"ip": ip, "data": data}))
nudge(pickle.dumps({"ip": ip, "data": data}))


def nudge(data):
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
s.connect(("localhost", 45678))
s.send(data)
s.close()
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
s.connect(("localhost", 45678))
s.send(data)
s.close()

if __name__ == "__main__" and len(sys.argv) > 1:
pack()
pack()

0 comments on commit fd1f683

Please sign in to comment.