One Hat Cyber Team
Your IP :
216.73.216.115
Server IP :
194.44.31.54
Server :
Linux zen.imath.kiev.ua 4.18.0-553.77.1.el8_10.x86_64 #1 SMP Fri Oct 3 14:30:23 UTC 2025 x86_64
Server Software :
Apache/2.4.37 (Rocky Linux) OpenSSL/1.1.1k
PHP Version :
5.6.40
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
backup
/
oldserver
/
2
/
bin
/
View File Name :
fros
#!/usr/bin/python3 # -*- coding: utf-8 -*- ## Copyright (C) 2013 ABRT team <abrt-devel-list@redhat.com> ## Copyright (C) 2013 Red Hat, Inc. ## This program is free software; you can redistribute it and/or modify ## it under the terms of the GNU General Public License as published by ## the Free Software Foundation; either version 2 of the License, or ## (at your option) any later version. ## This program is distributed in the hope that it will be useful, ## but WITHOUT ANY WARRANTY; without even the implied warranty of ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ## GNU General Public License for more details. ## You should have received a copy of the GNU General Public License ## along with this program; if not, write to the Free Software ## Foundation, Inc., 51 Franklin Street, Suite 500, Boston, MA 02110-1335 USA import sys from ctypes import cdll, util, c_void_p, c_char_p XLIB_PATH = util.find_library('X11') if not XLIB_PATH: sys.stderr.write("Could not load X11 library\n") sys.exit(1) XLIB = cdll.LoadLibrary(XLIB_PATH) XOpenDisplay = XLIB.XOpenDisplay XOpenDisplay.argtypes = [c_char_p] XOpenDisplay.restype = c_void_p DISPLAY = XOpenDisplay(None) if DISPLAY == 0: sys.stderr.write("Cannot connect to X server\n") sys.exit(2) XCloseDisplay = XLIB.XCloseDisplay XCloseDisplay.argtypes = [c_void_p] XCloseDisplay(DISPLAY) from pyfros.froslogging import error, info, set_verbosity from pyfros.controls import Controls #pylint: disable=E0611 from gi.repository import Gtk #pylint: disable=W0401 from pyfros.plugins import * from pyfros.i18n import _ from pyfros import i18n import pyfros.plugins as plugins import argparse import types PLUGIN_DIR = "." def load_plugins(): loaded_plugins = [] import inspect #pylint: disable=W0612 for name, value in inspect.getmembers(plugins): if not hasattr(value, "getScreencastPluginInstance"): info("'{0}' is not a plugin".format(name)) continue plugin_instance = value.getScreencastPluginInstance() if plugin_instance.IsSuitable() > 0: # append only suitable plugins loaded_plugins.append(plugin_instance) info("Added plugin:", plugin_instance) # return plugins sorted by their IsSuitable weight, the best match first return sorted(loaded_plugins, key=lambda plugin: plugin.IsSuitable(), reverse=True) if __name__ == "__main__": # init internationalization i18n.init("fros") commands = argparse.ArgumentParser('parent', description=_("Screencasting cmdline")) commands.add_argument("--verbose", "-v", action="count", default=0) commands.add_argument("--is-available", action="store_true", help=_("check if the current environment supports screencasting (0: is available, 1: not available)"), default=False) args = commands.parse_args() set_verbosity(args.verbose) available_plugins = load_plugins() if args.is_available: if available_plugins: sys.exit(0) sys.exit(1) if not available_plugins: error(_("No screencasting plugin is available, please install plugin matching your environment (see: https://github.com/abrt/abrt/wiki/FAQ#screencasting)")) sys.exit(1) info("Selected plugin: ", available_plugins[0]) controls = Controls(available_plugins[0]) controls.show_all() Gtk.main()