OpenSecurity/bin/terminate_client_tray.pyw
changeset 226 107dc235508f
child 240 d7ef04254e9c
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/OpenSecurity/bin/terminate_client_tray.pyw	Mon Sep 29 12:46:51 2014 +0200
     1.3 @@ -0,0 +1,51 @@
     1.4 +# -*- coding: utf-8 -*-
     1.5 +
     1.6 +# ------------------------------------------------------------
     1.7 +# terminate the client tray
     1.8 +# 
     1.9 +# Autor: Oliver Maurhart, <oliver.maurhart@ait.ac.at>
    1.10 +#
    1.11 +# Copyright (C) 2014 AIT Austrian Institute of Technology
    1.12 +# AIT Austrian Institute of Technology GmbH
    1.13 +# Donau-City-Strasse 1 | 1220 Vienna | Austria
    1.14 +# http://www.ait.ac.at
    1.15 +#
    1.16 +# This program is free software; you can redistribute it and/or
    1.17 +# modify it under the terms of the GNU General Public License
    1.18 +# as published by the Free Software Foundation version 2.
    1.19 +# 
    1.20 +# This program is distributed in the hope that it will be useful,
    1.21 +# but WITHOUT ANY WARRANTY; without even the implied warranty of
    1.22 +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    1.23 +# GNU General Public License for more details.
    1.24 +# 
    1.25 +# You should have received a copy of the GNU General Public License
    1.26 +# along with this program; if not, write to the Free Software
    1.27 +# Foundation, Inc., 51 Franklin Street, Fifth Floor, 
    1.28 +# Boston, MA  02110-1301, USA.
    1.29 +# ------------------------------------------------------------
    1.30 +
    1.31 +
    1.32 +# ------------------------------------------------------------
    1.33 +# imports
    1.34 +
    1.35 +import urllib2
    1.36 +
    1.37 +
    1.38 +# ------------------------------------------------------------
    1.39 +# code
    1.40 +
    1.41 +
    1.42 +# start
    1.43 +if __name__ == "__main__":
    1.44 +
    1.45 +    try:
    1.46 +
    1.47 +        # TODO: HARDCODED ADDRESS OF OPENSECURITY CLIENT TRAY
    1.48 +        browsing_vm = urllib2.urlopen('http://127.0.0.1:8090/quit').readline()
    1.49 +        print('Called http://127.0.0.1:8090/quit')
    1.50 +        
    1.51 +    except Exception as e:
    1.52 +        print('Failed: %s' % (e.message))
    1.53 +        
    1.54 +