The script relies on two dependencies:
- Python Requests
- BeautifulSoup4
Install the dependencies by running:
pip3 install requests
pip3 install bs4| """ | |
| A very tiny Python script to dump all databases for a user as .sql files. | |
| """ | |
| DB_USER='' | |
| DB_PASS='' | |
| import os | |
| import mysql.connector | |
| conn = mysql.connector.connect(user=DB_USER, password=DB_PASS) |
| openapi: "3.0.0" | |
| info: | |
| version: 2.0.0 | |
| title: iScraper API | |
| license: | |
| name: MIT | |
| servers: | |
| - url: https://api.iscraper.io/api/v2 | |
| paths: | |
| /profile-data/: |
| echo """#!/bin/bash | |
| theUrl=$1 | |
| theFileName=$2 | |
| theDirectoryName=$3 | |
| if [ -z "$theUrl" ]; then | |
| echo "Please provide a URL" | |
| else | |
| echo "Processing $theUrl" | |
| if curl --output /dev/null --silent --head --fail "$theUrl"; then |
| var localContext = { | |
| "window":{ | |
| location:{ | |
| href: "https://www.excise.gos.pk/vehicle/vehicle_search" | |
| } | |
| } | |
| } | |
| /* PLEASE DO NOT COPY AND PASTE THIS CODE. */(function(){var w=window,C='___grecaptcha_cfg',cfg=w[C]=w[C]||{},N='grecaptcha';var gr=w[N]=w[N]||{};gr.ready=gr.ready||function(f){(cfg['fns']=cfg['fns']||[]).push(f);};w['__recaptcha_api']='https://www.google.com/recaptcha/api2/';(cfg['render']=cfg['render']||[]).push('onload');w['__google_recaptcha_client']=true;var d=document,po=d.createElement('script');po.type='text/javascript';po.async=true;po.src='https://www.gstatic.com/recaptcha/releases/sG0iO6gHcGdWJzjJjW9AY49S/recaptcha__en.js';po.crossOrigin='anonymous';po.integrity='sha384-+xoUonkPGEYHjXNbLWoTq/M+o6pSjtw4HyuOyq5yVumYnwysETdYuyFwwYTB7S35';var e=d.querySelector('script[nonce]'),n=e&&(e['nonce']||e.getAttribute('nonce'));if(n){po.setAttribute('nonce',n);}var s=d.getElementsByTagName('script')[0];s.parentNode.insertBefore(po, s);})(); |
| docker swarm init | |
| docker service create --mode global --publish target=8000,published=80 serpsbot/flask-test | |
| # Get join token for workers | |
| docker swarm join-token worker | |
| ## Will return | |
| docker swarm join --token xyz ip-address:port | |
| ## Execute this command on all worker nodes. We have deployed the service in global mode, so every worker that joins the cluser will |
| # Become root | |
| sudo su | |
| # Update apt package cache | |
| apt update | |
| # Install NGINX | |
| apt install nginx | |
| # Creae a non-sudo user |
| server { | |
| listen 80; | |
| server_name example.com; | |
| root /home/user/sites/example; | |
| index index.php index.html; | |
| location / { | |
| try_files $uri $uri/ /index.php$is_args$args; | |
| } |
| iptables -I DOCKER-USER -i eth0 -j DROP | |
| iptables -I DOCKER-USER -m state --state RELATED,ESTABLISHED -j ACCEPT |
| import requests | |
| headers = { | |
| 'sec-ch-ua': '"Google Chrome";v="93", " Not;A Brand";v="99", "Chromium";v="93"', | |
| 'user-agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/93.0.4577.63 Safari/537.36', | |
| 'accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', | |
| } | |
| response = requests.get('https://www.dnb.com/business-directory/company-profiles.pfizer_inc.140f48fa0b37556f925afcaec7b5c566.html', headers=headers) |