Linux server.flyproject.com.br 3.10.0-1160.el7.x86_64 #1 SMP Mon Oct 19 16:18:59 UTC 2020 x86_64
Apache
: 207.244.227.86 | : 216.73.217.1
10 Domain
7.1.33
hubnog
www.github.com/MadExploits
Terminal
AUTO ROOT
Adminer
Backdoor Destroyer
Linux Exploit
Lock Shell
Lock File
Create User
CREATE RDP
PHP Mailer
BACKCONNECT
UNLOCK SHELL
HASH IDENTIFIER
CPANEL RESET
CREATE WP USER
README
+ Create Folder
+ Create File
/
usr /
share /
system-config-printer /
[ HOME SHELL ]
Name
Size
Permission
Action
icons
[ DIR ]
drwxr-xr-x
troubleshoot
[ DIR ]
drwxr-xr-x
ui
[ DIR ]
drwxr-xr-x
xml
[ DIR ]
drwxr-xr-x
HIG.py
57
B
-rw-r--r--
HIG.pyc
231
B
-rw-r--r--
HIG.pyo
231
B
-rw-r--r--
PhysicalDevice.py
10.69
KB
-rw-r--r--
PhysicalDevice.pyc
7.72
KB
-rw-r--r--
PhysicalDevice.pyo
7.72
KB
-rw-r--r--
SearchCriterion.py
1.32
KB
-rw-r--r--
SearchCriterion.pyc
982
B
-rw-r--r--
SearchCriterion.pyo
982
B
-rw-r--r--
ToolbarSearchEntry.py
6.91
KB
-rw-r--r--
ToolbarSearchEntry.pyc
6.43
KB
-rw-r--r--
ToolbarSearchEntry.pyo
6.43
KB
-rw-r--r--
applet.py
15.71
KB
-rwxr-xr-x
applet.pyc
14.03
KB
-rw-r--r--
applet.pyo
14.03
KB
-rw-r--r--
asyncconn.py
9.63
KB
-rw-r--r--
asyncconn.pyc
9.8
KB
-rw-r--r--
asyncconn.pyo
9.8
KB
-rw-r--r--
asyncipp.py
26.02
KB
-rw-r--r--
asyncipp.pyc
20.5
KB
-rw-r--r--
asyncipp.pyo
20.5
KB
-rw-r--r--
asyncpk1.py
25.68
KB
-rw-r--r--
asyncpk1.pyc
20.4
KB
-rw-r--r--
asyncpk1.pyo
20.4
KB
-rw-r--r--
authconn.py
18.34
KB
-rw-r--r--
authconn.pyc
15.74
KB
-rw-r--r--
authconn.pyo
15.74
KB
-rw-r--r--
check-device-ids.py
10.9
KB
-rwxr-xr-x
check-device-ids.pyc
8.13
KB
-rw-r--r--
check-device-ids.pyo
8.13
KB
-rw-r--r--
config.py
1.05
KB
-rw-r--r--
config.pyc
370
B
-rw-r--r--
config.pyo
370
B
-rw-r--r--
cupspk.py
27.35
KB
-rw-r--r--
cupspk.pyc
18.01
KB
-rw-r--r--
cupspk.pyo
18.01
KB
-rw-r--r--
debug.py
1.62
KB
-rw-r--r--
debug.pyc
1.55
KB
-rw-r--r--
debug.pyo
1.55
KB
-rw-r--r--
dnssdresolve.py
4.91
KB
-rw-r--r--
dnssdresolve.pyc
5.17
KB
-rw-r--r--
dnssdresolve.pyo
5.17
KB
-rw-r--r--
errordialogs.py
3.13
KB
-rw-r--r--
errordialogs.pyc
2.57
KB
-rw-r--r--
errordialogs.pyo
2.57
KB
-rw-r--r--
firewallsettings.py
9.25
KB
-rw-r--r--
firewallsettings.pyc
8.69
KB
-rw-r--r--
firewallsettings.pyo
8.69
KB
-rw-r--r--
gtkinklevel.py
4.71
KB
-rw-r--r--
gtkinklevel.pyc
4.18
KB
-rw-r--r--
gtkinklevel.pyo
4.18
KB
-rw-r--r--
gui.py
2.12
KB
-rw-r--r--
gui.pyc
1.76
KB
-rw-r--r--
gui.pyo
1.76
KB
-rw-r--r--
install-printerdriver.py
2.82
KB
-rwxr-xr-x
install-printerdriver.pyc
2.42
KB
-rw-r--r--
install-printerdriver.pyo
2.42
KB
-rw-r--r--
installpackage.py
1.34
KB
-rw-r--r--
installpackage.pyc
1.1
KB
-rw-r--r--
installpackage.pyo
1.1
KB
-rw-r--r--
jobviewer.py
91.15
KB
-rw-r--r--
jobviewer.pyc
64.36
KB
-rw-r--r--
jobviewer.pyo
64.36
KB
-rw-r--r--
monitor.py
31.96
KB
-rw-r--r--
monitor.pyc
23
KB
-rw-r--r--
monitor.pyo
23
KB
-rw-r--r--
newprinter.py
164.81
KB
-rw-r--r--
newprinter.pyc
102.42
KB
-rw-r--r--
newprinter.pyo
102.42
KB
-rw-r--r--
options.py
18.73
KB
-rw-r--r--
options.pyc
16.57
KB
-rw-r--r--
options.pyo
16.57
KB
-rw-r--r--
optionwidgets.py
8.78
KB
-rw-r--r--
optionwidgets.pyc
7.94
KB
-rw-r--r--
optionwidgets.pyo
7.94
KB
-rw-r--r--
ppdcache.py
7.41
KB
-rw-r--r--
ppdcache.pyc
6.1
KB
-rw-r--r--
ppdcache.pyo
6.1
KB
-rw-r--r--
ppdippstr.py
7.15
KB
-rw-r--r--
ppdippstr.pyc
5.64
KB
-rw-r--r--
ppdippstr.pyo
5.64
KB
-rw-r--r--
ppdsloader.py
10.78
KB
-rw-r--r--
ppdsloader.pyc
10.22
KB
-rw-r--r--
ppdsloader.pyo
10.22
KB
-rw-r--r--
printerproperties.py
78.52
KB
-rw-r--r--
printerproperties.pyc
51.48
KB
-rw-r--r--
printerproperties.pyo
51.48
KB
-rw-r--r--
probe_printer.py
15.24
KB
-rw-r--r--
probe_printer.pyc
13.82
KB
-rw-r--r--
probe_printer.pyo
13.82
KB
-rw-r--r--
pysmb.py
6.8
KB
-rwxr-xr-x
pysmb.pyc
5.47
KB
-rw-r--r--
pysmb.pyo
5.47
KB
-rw-r--r--
scp-dbus-service.py
19.04
KB
-rwxr-xr-x
scp-dbus-service.pyc
21.34
KB
-rw-r--r--
scp-dbus-service.pyo
21.34
KB
-rw-r--r--
serversettings.py
21.4
KB
-rw-r--r--
serversettings.pyc
16.15
KB
-rw-r--r--
serversettings.pyo
16.15
KB
-rw-r--r--
smburi.py
3.22
KB
-rw-r--r--
smburi.pyc
2.61
KB
-rw-r--r--
smburi.pyo
2.61
KB
-rw-r--r--
statereason.py
6.09
KB
-rw-r--r--
statereason.pyc
5.02
KB
-rw-r--r--
statereason.pyo
5.02
KB
-rw-r--r--
system-config-printer.py
80.8
KB
-rwxr-xr-x
system-config-printer.pyc
57.95
KB
-rw-r--r--
system-config-printer.pyo
57.95
KB
-rw-r--r--
timedops.py
8
KB
-rw-r--r--
timedops.pyc
8
KB
-rw-r--r--
timedops.pyo
8
KB
-rw-r--r--
userdefault.py
6.12
KB
-rw-r--r--
userdefault.pyc
5.34
KB
-rw-r--r--
userdefault.pyo
5.34
KB
-rw-r--r--
Delete
Unzip
Zip
${this.title}
Close
Code Editor : scp-dbus-service.py
#!/usr/bin/python ## system-config-printer ## Copyright (C) 2010, 2011, 2012, 2013 Red Hat, Inc. ## Authors: ## Tim Waugh <twaugh@redhat.com> ## 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, Fifth Floor, Boston, MA 02110-1301, USA. import dbus.service from gi.repository import GObject from gi.repository import GLib from gi.repository import Gdk import sys from debug import * import asyncconn import config import cups import cupshelpers import dnssdresolve import jobviewer import newprinter import PhysicalDevice import ppdcache import printerproperties cups.require ("1.9.52") CONFIG_BUS='org.fedoraproject.Config.Printing' CONFIG_PATH='/org/fedoraproject/Config/Printing' CONFIG_IFACE='org.fedoraproject.Config.Printing' CONFIG_NEWPRINTERDIALOG_IFACE=CONFIG_IFACE + ".NewPrinterDialog" CONFIG_PRINTERPROPERTIESDIALOG_IFACE=CONFIG_IFACE + ".PrinterPropertiesDialog" CONFIG_JOBVIEWER_IFACE=CONFIG_IFACE + ".JobViewer" g_ppds = None g_killtimer = None class KillTimer: def __init__ (self, timeout=30, killfunc=None): self._timeout = timeout self._killfunc = killfunc self._holds = 0 self._add_timeout () def _add_timeout (self): self._timer = GLib.timeout_add_seconds (self._timeout, self._kill) def _kill (self): debugprint ("Timeout (%ds), exiting" % self._timeout) if self._killfunc: self._killfunc () else: sys.exit (0) def add_hold (self): if self._holds == 0: debugprint ("Kill timer stopped") GLib.source_remove (self._timer) self._holds += 1 def remove_hold (self): if self._holds > 0: self._holds -= 1 if self._holds == 0: debugprint ("Kill timer started") self._add_timeout () def alive (self): if self._holds == 0: GLib.source_remove (self._timer) self._add_timeout () class FetchedPPDs(GObject.GObject): __gsignals__ = { 'ready': (GObject.SIGNAL_RUN_LAST, None, ()), 'error': (GObject.SIGNAL_RUN_LAST, None, (GObject.TYPE_PYOBJECT,)) } def __init__ (self, cupsconn, language): GObject.GObject.__init__ (self) self._cupsconn = cupsconn self._language = language self._ppds = None def is_ready (self): return self._ppds != None def get_ppds (self): return self._ppds def run (self): debugprint ("FetchPPDs: running") self._cupsconn.getPPDs2 (reply_handler=self._cups_getppds_reply, error_handler=self._cups_error) def _cups_error (self, conn, exc): debugprint ("FetchPPDs: error: %s" % repr (exc)) self.emit ('error', exc) def _cups_getppds_reply (self, conn, result): debugprint ("FetchPPDs: success") self._ppds = cupshelpers.ppds.PPDs (result, language=self._language) self.emit ('ready') class GetBestDriversRequest: def __init__ (self, device_id, device_make_and_model, device_uri, cupsconn, language, reply_handler, error_handler): self.device_id = device_id self.device_make_and_model = device_make_and_model self.device_uri = device_uri self.reply_handler = reply_handler self.error_handler = error_handler self._signals = [] debugprint ("+%s" % self) g_killtimer.add_hold () global g_ppds if g_ppds == None: debugprint ("GetBestDrivers request: need to fetch PPDs") g_ppds = FetchedPPDs (cupsconn, language) self._signals.append (g_ppds.connect ('ready', self._ppds_ready)) self._signals.append (g_ppds.connect ('error', self._ppds_error)) g_ppds.run () else: if g_ppds.is_ready (): debugprint ("GetBestDrivers request: PPDs already fetched") self._ppds_ready (g_ppds) else: debugprint ("GetBestDrivers request: waiting for PPDs") self._signals.append (g_ppds.connect ('ready', self._ppds_ready)) self._signals.append (g_ppds.connect ('error', self._ppds_error)) def __del__ (self): debugprint ("-%s" % self) def _disconnect_signals (self): for s in self._signals: g_ppds.disconnect (s) def _ppds_error (self, fetchedppds, exc): self._disconnect_signals () self.error_handler (exc) def _ppds_ready (self, fetchedppds): self._disconnect_signals () ppds = fetchedppds.get_ppds () try: if self.device_id: id_dict = cupshelpers.parseDeviceID (self.device_id) else: id_dict = {} (mfg, mdl) = cupshelpers.ppds.ppdMakeModelSplit (self.device_make_and_model) id_dict["MFG"] = mfg id_dict["MDL"] = mdl id_dict["DES"] = "" id_dict["CMD"] = [] fit = ppds.getPPDNamesFromDeviceID (id_dict["MFG"], id_dict["MDL"], id_dict["DES"], id_dict["CMD"], self.device_uri, self.device_make_and_model) ppdnamelist = ppds.orderPPDNamesByPreference (fit.keys ()) g_killtimer.remove_hold () self.reply_handler (map (lambda x: (x, fit[x]), ppdnamelist)) except Exception, e: try: g_killtimer.remove_hold () except: pass self.error_handler (e) class GroupPhysicalDevicesRequest: def __init__ (self, devices, reply_handler, error_handler): self.devices = devices self.reply_handler = reply_handler self.error_handler = error_handler debugprint ("+%s" % self) try: g_killtimer.add_hold () need_resolving = {} self.deviceobjs = {} for device_uri, device_dict in self.devices.iteritems (): deviceobj = cupshelpers.Device (device_uri, **device_dict) self.deviceobjs[device_uri] = deviceobj if device_uri.startswith ("dnssd://"): need_resolving[device_uri] = deviceobj if len (need_resolving) > 0: resolver = dnssdresolve.DNSSDHostNamesResolver (need_resolving) resolver.resolve (reply_handler=self._group) else: self._group () except Exception, e: g_killtimer.remove_hold () self.error_handler (e) def __del__ (self): debugprint ("-%s" % self) def _group (self, resolved_devices=None): # We can ignore resolved_devices because the actual objects # (in self.devices) have been modified. try: self.physdevs = [] for device_uri, deviceobj in self.deviceobjs.iteritems (): newphysicaldevice = PhysicalDevice.PhysicalDevice (deviceobj) matched = False try: i = self.physdevs.index (newphysicaldevice) self.physdevs[i].add_device (deviceobj) except ValueError: self.physdevs.append (newphysicaldevice) uris_by_phys = [] for physdev in self.physdevs: uris_by_phys.append (map (lambda x: x.uri, physdev.get_devices ())) g_killtimer.remove_hold () self.reply_handler (uris_by_phys) except Exception, e: g_killtimer.remove_hold () self.error_handler (e) class ConfigPrintingNewPrinterDialog(dbus.service.Object): def __init__ (self, bus, path, cupsconn): bus_name = dbus.service.BusName (CONFIG_BUS, bus=bus) dbus.service.Object.__init__ (self, bus_name, path) self.dialog = newprinter.NewPrinterGUI() self.dialog.NewPrinterWindow.set_modal (False) self.handles = [self.dialog.connect ('dialog-canceled', self.on_dialog_canceled), self.dialog.connect ('printer-added', self.on_printer_added), self.dialog.connect ('printer-modified', self.on_printer_modified)] self._ppdcache = ppdcache.PPDCache () self._cupsconn = cupsconn debugprint ("+%s" % self) def __del__ (self): debugprint ("-%s" % self) @dbus.service.method(dbus_interface=CONFIG_NEWPRINTERDIALOG_IFACE, in_signature='uss', out_signature='') def NewPrinterFromDevice(self, xid, device_uri, device_id): g_killtimer.add_hold () self.dialog.init ('printer_with_uri', device_uri=device_uri, devid=device_id, xid=xid) @dbus.service.method(dbus_interface=CONFIG_NEWPRINTERDIALOG_IFACE, in_signature='uss', out_signature='') def ChangePPD(self, xid, name, device_id): g_killtimer.add_hold () self.xid = xid self.name = name self.device_id = device_id self._ppdcache.fetch_ppd (name, self._change_ppd_got_ppd) def _change_ppd_got_ppd(self, name, ppd, exc): # Got PPD; now find device URI. self.ppd = ppd self._cupsconn.getPrinters (reply_handler=self._change_ppd_with_dev, error_handler=self._do_change_ppd) def _change_ppd_with_dev (self, conn, result): self.device_uri = result.get (self.name, {}).get ('device-uri', None) self._do_change_ppd (conn) def _do_change_ppd(self, conn, exc=None): self.dialog.init ('ppd', device_uri=self.device_uri, name=self.name, ppd=self.ppd, devid=self.device_id, xid=self.xid) @dbus.service.signal(dbus_interface=CONFIG_NEWPRINTERDIALOG_IFACE, signature='') def DialogCanceled(self): pass @dbus.service.signal(dbus_interface=CONFIG_NEWPRINTERDIALOG_IFACE, signature='s') def PrinterAdded(self, name): pass @dbus.service.signal(dbus_interface=CONFIG_NEWPRINTERDIALOG_IFACE, signature='sb') def PrinterModified(self, name, ppd_has_changed): pass def on_dialog_canceled(self, obj): g_killtimer.remove_hold () self.DialogCanceled () self.remove_handles () self.remove_from_connection () def on_printer_added(self, obj, name): g_killtimer.remove_hold () self.PrinterAdded (name) self.remove_handles () self.remove_from_connection () def on_printer_modified(self, obj, name, ppd_has_changed): g_killtimer.remove_hold () self.PrinterModifed (name, ppd_has_changed) self.remove_handles () self.remove_from_connection () def remove_handles (self): for handle in self.handles: self.dialog.disconnect (handle) class ConfigPrintingPrinterPropertiesDialog(dbus.service.Object): def __init__ (self, bus, path, xid, name): bus_name = dbus.service.BusName (CONFIG_BUS, bus=bus) dbus.service.Object.__init__ (self, bus_name=bus_name, object_path=path) self.dialog = printerproperties.PrinterPropertiesDialog () self.dialog.dialog.set_modal (False) handle = self.dialog.connect ('dialog-closed', self.on_dialog_closed) self.closed_handle = handle self.dialog.show (name) self.dialog.dialog.set_modal (False) g_killtimer.add_hold () @dbus.service.method(dbus_interface=CONFIG_PRINTERPROPERTIESDIALOG_IFACE, in_signature='', out_signature='') def PrintTestPage (self): debugprint ("Printing test page") return self.dialog.printTestPage () @dbus.service.signal(dbus_interface=CONFIG_PRINTERPROPERTIESDIALOG_IFACE, signature='') def Finished (self): pass def on_dialog_closed (self, dialog): dialog.destroy () g_killtimer.remove_hold () self.Finished () self.dialog.disconnect (self.closed_handle) self.remove_from_connection () class ConfigPrintingJobApplet(dbus.service.Object): def __init__ (self, bus, path): bus_name = dbus.service.BusName (CONFIG_BUS, bus=bus) dbus.service.Object.__init__ (self, bus_name=bus_name, object_path=path) Gdk.threads_enter () self.jobapplet = jobviewer.JobViewer(bus=dbus.SystemBus (), applet=True, my_jobs=True) Gdk.threads_leave () handle = self.jobapplet.connect ('finished', self.on_jobapplet_finished) self.finished_handle = handle self.has_finished = False g_killtimer.add_hold () debugprint ("+%s" % self) def __del__ (self): debugprint ("-%s" % self) @dbus.service.method(dbus_interface=CONFIG_JOBVIEWER_IFACE, in_signature='', out_signature='') def Quit(self): if not self.has_finished: self.jobapplet.cleanup () @dbus.service.signal(dbus_interface=CONFIG_JOBVIEWER_IFACE, signature='') def Finished(self): pass def on_jobapplet_finished (self, jobapplet): self.Finished () g_killtimer.remove_hold () self.has_finished = True self.jobapplet.disconnect (self.finished_handle) self.remove_from_connection () class ConfigPrinting(dbus.service.Object): def __init__ (self): self.bus = dbus.SessionBus () bus_name = dbus.service.BusName (CONFIG_BUS, bus=self.bus) dbus.service.Object.__init__ (self, bus_name, CONFIG_PATH) self._cupsconn = asyncconn.Connection () self._pathn = 0 self._jobapplet = None self._jobappletpath = None self._ppds = None self._language = locale.getlocale (locale.LC_MESSAGES)[0] def destroy (self): self._cupsconn.destroy () @dbus.service.method(dbus_interface=CONFIG_IFACE, in_signature='', out_signature='s') def NewPrinterDialog(self): self._pathn += 1 path = "%s/NewPrinterDialog/%s" % (CONFIG_PATH, self._pathn) ConfigPrintingNewPrinterDialog (self.bus, path, self._cupsconn) g_killtimer.alive () return path @dbus.service.method(dbus_interface=CONFIG_IFACE, in_signature='us', out_signature='s') def PrinterPropertiesDialog(self, xid, name): self._pathn += 1 path = "%s/PrinterPropertiesDialog/%s" % (CONFIG_PATH, self._pathn) ConfigPrintingPrinterPropertiesDialog (self.bus, path, xid, name) g_killtimer.alive () return path @dbus.service.method(dbus_interface=CONFIG_IFACE, in_signature='', out_signature='s') def JobApplet(self): if self._jobapplet == None or self._jobapplet.has_finished: self._pathn += 1 path = "%s/JobApplet/%s" % (CONFIG_PATH, self._pathn) self._jobapplet = ConfigPrintingJobApplet (self.bus, path) self._jobappletpath = path return self._jobappletpath @dbus.service.method(dbus_interface=CONFIG_IFACE, in_signature='sss', out_signature='a(ss)', async_callbacks=('reply_handler', 'error_handler')) def GetBestDrivers(self, device_id, device_make_and_model, device_uri, reply_handler, error_handler): GetBestDriversRequest (device_id, device_make_and_model, device_uri, self._cupsconn, self._language[0], reply_handler, error_handler) @dbus.service.method(dbus_interface=CONFIG_IFACE, in_signature='s', out_signature='as') def MissingExecutables(self, ppd_filename): ppd = cups.PPD (ppd_filename) return cupshelpers.missingExecutables (ppd) @dbus.service.method(dbus_interface=CONFIG_IFACE, in_signature='a{sa{ss}}', out_signature='aas', async_callbacks=('reply_handler', 'error_handler')) def GroupPhysicalDevices(self, devices, reply_handler, error_handler): GroupPhysicalDevicesRequest (devices, reply_handler, error_handler) def _client_demo (): # Client demo if len (sys.argv) > 2: device_uri = sys.argv[2] device_id = '' if (len (sys.argv) > 4 and sys.argv[3] == '--devid'): device_id = sys.argv[4] else: print "Device URI required" return from gi.repository import Gtk bus = dbus.SessionBus () obj = bus.get_object (CONFIG_BUS, CONFIG_PATH) iface = dbus.Interface (obj, CONFIG_IFACE) path = iface.NewPrinterDialog () debugprint (path) obj = bus.get_object (CONFIG_BUS, path) iface = dbus.Interface (obj, CONFIG_NEWPRINTERDIALOG_IFACE) loop = GObject.MainLoop () def on_canceled(path=None): print "%s: Dialog canceled" % path loop.quit () def on_added(name, path=None): print "%s: Printer '%s' added" % (path, name) loop.quit () iface.connect_to_signal ("DialogCanceled", on_canceled, path_keyword="path") iface.connect_to_signal ("PrinterAdded", on_added, path_keyword="path") iface.NewPrinterFromDevice (0, device_uri, device_id) loop.run () if __name__ == '__main__': import ppdippstr import gettext import locale try: locale.setlocale (locale.LC_ALL, "") except: pass gettext.textdomain (config.PACKAGE) gettext.bindtextdomain (config.PACKAGE, config.localedir) ppdippstr.init () Gdk.threads_init () from dbus.glib import DBusGMainLoop DBusGMainLoop (set_as_default=True) client_demo = False if len (sys.argv) > 1: for opt in sys.argv[1:]: if opt == "--debug": set_debugging (True) elif opt == "--client": client_demo = True if client_demo: _client_demo () sys.exit (0) debugprint ("Service running...") loop = GObject.MainLoop () g_killtimer = KillTimer (killfunc=loop.quit) cp = ConfigPrinting () loop.run () cp.destroy ()
Close