Advertisement
Guest User

Untitled

a guest
May 26th, 2017
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 1.36 KB | None | 0 0
  1. class commands():
  2.     def __init__(self):
  3.         pass
  4.  
  5.     def start(self):
  6.         os.system("hamachi start")
  7.  
  8.     def stop(self):
  9.         os.system("hamachi stop")
  10.  
  11.     def setNick(self, nick):
  12.         com = "hamachi set-nick %s" % nick
  13.         os.system(com)
  14.  
  15.     def getNicks(self):
  16.         nicks = os.system("hamachi get-nicks")
  17.         return nicks
  18.  
  19.     def logIn(self):
  20.         os.system("hamachi login")
  21.  
  22.     def logOut(self):
  23.         os.system("hamachi logout")
  24.  
  25.     def list(self):
  26.         results = os.system("hamachi list")
  27.         return results
  28.  
  29.     def createNet(self, network, password):
  30.        com = "hamachi create %s %s" % (network, password)
  31.        os.system(com)
  32.  
  33.     def deleteNet(self, network):
  34.         com = "hamachi delete %s" % network
  35.         os.system(com)
  36.  
  37.     def kick(self, network, id):
  38.         com = "hamachi evict %s %s" % (network, id)
  39.         os.system(com)
  40.  
  41.     def joinNet(self, network, password):
  42.         com = "hamachi join %s %s" % (network, password)
  43.         os.system(com)
  44.  
  45.     def leaveNet(self, network):
  46.         com = "hamachi leave %s" % network
  47.         os.system(com)
  48.  
  49.     def goOnlineNet(self, network):
  50.         com = "hamachi go-online %s" % network
  51.         os.system(com)
  52.  
  53.     def goOfflineNet(self, network):
  54.         com = "hamachi go-offline %s" % network
  55.         os.system(com)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement