Advertisement
Guest User

Untitled

a guest
Mar 16th, 2015
405
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.35 KB | None | 0 0
  1. import os
  2. import sys
  3.  
  4. arg = sys.argv[1]
  5.  
  6. if arg == "an":
  7.     bashCommand = 'curl -X GET --insecure "thymian:1337" https://192.168.1.47/api/device/Lampe1/turnOn';
  8.     os.system(bashCommand);
  9.  
  10. if arg == "aus":
  11.     bashCommand = 'curl -X GET --insecure "thymian:1337" https://192.168.1.47/api/device/Lampe1/turnOff';
  12.     os.system(bashCommand);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement