OpenSecurity/bin/terminate_client_tray.pyw
author Oliver Maurhart <oliver.maurhart@ait.ac.at>
Wed, 29 Oct 2014 15:18:22 +0100
changeset 240 d7ef04254e9c
parent 226 107dc235508f
permissions -rw-r--r--
lizenz fixed in all files
oliver@226
     1
# -*- coding: utf-8 -*-
oliver@226
     2
oliver@226
     3
# ------------------------------------------------------------
oliver@226
     4
# terminate the client tray
oliver@226
     5
# 
oliver@226
     6
# Autor: Oliver Maurhart, <oliver.maurhart@ait.ac.at>
oliver@226
     7
#
oliver@240
     8
# Copyright 2013-2014 X-Net and AIT Austrian Institute of Technology
oliver@226
     9
# 
oliver@226
    10
# 
oliver@240
    11
#     X-Net Services GmbH
oliver@240
    12
#     Elisabethstrasse 1
oliver@240
    13
#     4020 Linz
oliver@240
    14
#     AUSTRIA
oliver@240
    15
#     https://www.x-net.at
oliver@240
    16
# 
oliver@240
    17
#     AIT Austrian Institute of Technology
oliver@240
    18
#     Donau City Strasse 1
oliver@240
    19
#     1220 Wien
oliver@240
    20
#     AUSTRIA
oliver@240
    21
#     http://www.ait.ac.at
oliver@240
    22
# 
oliver@240
    23
# 
oliver@240
    24
# Licensed under the Apache License, Version 2.0 (the "License");
oliver@240
    25
# you may not use this file except in compliance with the License.
oliver@240
    26
# You may obtain a copy of the License at
oliver@240
    27
# 
oliver@240
    28
#    http://www.apache.org/licenses/LICENSE-2.0
oliver@240
    29
# 
oliver@240
    30
# Unless required by applicable law or agreed to in writing, software
oliver@240
    31
# distributed under the License is distributed on an "AS IS" BASIS,
oliver@240
    32
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
oliver@240
    33
# See the License for the specific language governing permissions and
oliver@240
    34
# limitations under the License.
oliver@226
    35
# ------------------------------------------------------------
oliver@226
    36
oliver@226
    37
oliver@226
    38
# ------------------------------------------------------------
oliver@226
    39
# imports
oliver@226
    40
oliver@226
    41
import urllib2
oliver@226
    42
oliver@226
    43
oliver@226
    44
# ------------------------------------------------------------
oliver@226
    45
# code
oliver@226
    46
oliver@226
    47
oliver@226
    48
# start
oliver@226
    49
if __name__ == "__main__":
oliver@226
    50
oliver@226
    51
    try:
oliver@226
    52
oliver@226
    53
        # TODO: HARDCODED ADDRESS OF OPENSECURITY CLIENT TRAY
oliver@226
    54
        browsing_vm = urllib2.urlopen('http://127.0.0.1:8090/quit').readline()
oliver@226
    55
        print('Called http://127.0.0.1:8090/quit')
oliver@226
    56
        
oliver@226
    57
    except Exception as e:
oliver@226
    58
        print('Failed: %s' % (e.message))
oliver@226
    59
        
oliver@226
    60