2 # -*- coding: utf-8 -*-
4 # ------------------------------------------------------------
7 # talk to the opensecurity server
9 # Autor: Oliver Maurhart, <oliver.maurhart@ait.ac.at>
11 # Copyright (C) 2013 AIT Austrian Institute of Technology
12 # AIT Austrian Institute of Technology GmbH
13 # Donau-City-Strasse 1 | 1220 Vienna | Austria
14 # http://www.ait.ac.at
16 # This program is free software; you can redistribute it and/or
17 # modify it under the terms of the GNU General Public License
18 # as published by the Free Software Foundation version 2.
20 # This program is distributed in the hope that it will be useful,
21 # but WITHOUT ANY WARRANTY; without even the implied warranty of
22 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
23 # GNU General Public License for more details.
25 # You should have received a copy of the GNU General Public License
26 # along with this program; if not, write to the Free Software
27 # Foundation, Inc., 51 Franklin Street, Fifth Floor,
28 # Boston, MA 02110-1301, USA.
29 # ------------------------------------------------------------
31 # ------------------------------------------------------------
34 from pprint import PrettyPrinter
37 # ------------------------------------------------------------
41 """get the list of known apps"""
43 # TODO: REPLACE THIS HARDCODED STUFF WITH REAL CODE TO THE OS SERVER
45 { 'vm': 'SecurityDVMBrowser', 'name': 'Browser', 'command': '/usr/bin/iceweasel'},
52 """get the list of registered vms, their ip and the prefered user"""
54 # TODO: REPLACE THIS HARDCODED STUFF WITH REAL CODE TO THE OS SERVER
56 { 'user': 'opensec', 'name': 'SecurityDVMBrowser', 'ip': '192.168.56.101'},
63 if __name__ == "__main__":
65 PrettyPrinter().pprint(query_apps())
67 PrettyPrinter().pprint(query_vms())