Skip to content

Commit

Permalink
fixing status
Browse files Browse the repository at this point in the history
  • Loading branch information
Rafay Ghafoor committed Mar 31, 2018
1 parent a4f5531 commit 17692ee
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions router.py
Original file line number Diff line number Diff line change
Expand Up @@ -190,12 +190,16 @@ def set_time_limit(self, username="User_1", mac="", days="Everyday", start="1",
else:
print("Specified day is not in week_days.")

return 'Successful'




def web_filter(self, url):
'''
Block website temporarily/permanently (i.e Temporarily, when time is specified).
'''
pass
return 'Successful'


def block(self, mac):
Expand All @@ -207,6 +211,7 @@ def block(self, mac):
>>> router.block('xx:xx:xx:xx:xx:xx')
'''
self.session.get(self.gateway + "wlmacflt.cmd?action=add&rmLst={}&sessionKey={}".format(devmac, self.get_session_key()))
return 'Successful'


def unblock(self, mac):
Expand All @@ -218,11 +223,12 @@ def unblock(self, mac):
>>> router.unblock('xx:xx:xx:xx:xx:xx')
'''
self.session.get(self.gateway + "wlmacflt.cmd?action=remove&rmLst={}&sessionKey={}".format(udevmac, self.get_session_key()))
return 'Successful'


def reboot(self):
'''
Reboots Router.
'''
self.session.get(self.gateway + "rebootinfo.cgi?sessionKey={}".format(self.get_session_key()))

return 'Successful'

0 comments on commit 17692ee

Please sign in to comment.