https://alvinsmith.gitbook.io/progressive-oscp/untitled/vulnversity-privilege-escalation
[Unit]
Description=roooooooooot
[Service]
Type=simple
| #!/bin/bash | |
| # Sometimes you need to move your existing git repository | |
| # to a new remote repository (/new remote origin). | |
| # Here are a simple and quick steps that does exactly this. | |
| # | |
| # Let's assume we call "old repo" the repository you wish | |
| # to move, and "new repo" the one you wish to move to. | |
| # | |
| ### Step 1. Make sure you have a local copy of all "old repo" | |
| ### branches and tags. |
| <?php | |
| require_once("PHPExcel/PHPExcel.php"); | |
| $phpExcel = new PHPExcel(); | |
| $styleArray = array( | |
| 'font' => array( | |
| 'bold' => true, | |
| ) | |
| ); |
| cd ~ | |
| mv .zsh_history .zsh_history_bad | |
| strings -eS .zsh_history_bad > .zsh_history | |
| fc -R .zsh_history |
https://alvinsmith.gitbook.io/progressive-oscp/untitled/vulnversity-privilege-escalation
[Unit]
Description=roooooooooot
[Service]
Type=simple
| <?php | |
| $active_group = 'default'; | |
| $query_builder = TRUE; | |
| $db['default'] = array( | |
| 'dsn' => '', | |
| 'hostname' => '127.0.0.1', // better than localhost if mysqli.default_socket points to a unknown path | |
| 'username' => 'db_user', // As of MySQL v5.7, you can't use 'root' without sudo - you must use a different username and password - https://askubuntu.com/questions/763336/cannot-enter-phpmyadmin-as-root-mysql-5-7 | |
| 'password' => 'password', | |
| 'database' => 'dbname', |
| def write_json(): | |
| result = {} #some random json | |
| with open('data.json', 'w', encoding='utf-8') as f: | |
| json.dump(result, f, ensure_ascii=False, indent=4) |
| def dig(tree, path): | |
| for key in path.split("."): | |
| if isinstance(tree, dict) and tree.get(key): | |
| tree = tree[key] | |
| else: | |
| return None | |
| return tree | |
| #EXAMPLE | |
| # mydict = { |
| driver.get('chrome://settings/') | |
| driver.execute_script('chrome.settingsPrivate.setDefaultZoom(zoomValue);') |
| docker rm -f $(docker ps -a -q) |
| #!/usr/bin/env bash | |
| docker run --rm --ulimit nofile=65536:65536 --name esn01 -p 9200:9200 -v esdata01:/usr/share/elasticsearch/data --network elastic-network -e "node.name=esn01" -e "cluster.name=es-cluster" -e "cluster.initial_master_nodes=esn01" -e "bootstrap.memory_lock=true" --ulimit memlock=-1:-1 -e ES_JAVA_OPTS="-Xms2g -Xmx2g" docker.elastic.co/elasticsearch/elasticsearch:7.3.0 | |
| # Create the master node for our cluster | |
| # NB we increase max file descriptors to 65536 using the nofile argument | |
| # Expected Output should be similar to this |