... to toy with and run curl against it.
This is not advice on how to run anything in production. This is for development and experimenting.
An existing local HTTP/1.1 server that hosts files. Preferably also a few huge ones.
// set the site we are modifying | |
const site = 'www.nike.com'; | |
// do this on a fetch | |
addEventListener('fetch', event => { | |
const request = event.request | |
const url = new URL(request.url) | |
event.respondWith(handleRequest(request)) | |
}); |
addEventListener('fetch', event => { | |
event.respondWith(fetchAndApply(event.request)) | |
}) | |
async function fetchAndApply(request) { | |
let response = await fetch(request) | |
let referer = request.headers.get('Referer') | |
let contentType = response.headers.get('Content-Type') || '' | |
if (referer && contentType.startsWith('image/')) { |
import pandas as pd | |
import requests | |
import urllib | |
import time | |
import re | |
# Data Visualization | |
from plotly import tools | |
import chart_studio |
[package] | |
name = "rust_crawler" | |
version = "0.1.0" | |
authors = ["Roland Szabo <rolisz@gmail.com>"] | |
edition = "2018" | |
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html | |
[dependencies] | |
reqwest = { version = "0.10", features = ["json", "blocking"] } |
/** | |
* Steps to use: | |
* 1. Create CF Worker, copy and paste this in | |
* 2. (Optional) Update configuration defaults | |
* - If you want to manage in code, do so below under "Static Configuration" | |
* - If you want dynamic custom config: Create CFW KV namespace, link them, and add reference below | |
* | |
* - You can overwrite default path prefix for loading analytics.js (<yourdomain>/ajs) | |
* (corresponding KV entry: `script_path_prefix`) | |
* - You can overwrite default path prefix for handling first-party data collection (<yourdomain>/data) |
(10min demo at the performance.now() meetup, 20 November 2019, Amsterdam)
CrUX is the Chrome User Experience Report, a public dataset of performance and UX data from real Chrome users in the field.
Quick facts:
There are many ways to parse in variable into the nginx config file.
Some uses set_by_lua
which is offered by lua-nginx-module.
Some use envstubst
to populate varilabes into a template file.
Today I am going to show you how to do that with njs
the JS scripting engine for nginx.
## /etc/nginx/fetch_env.js
function fetch_upstream_host(r) {
return process.env.UPSTREAM_HOST;
I have done some preliminary research into this bug and so far it does not seem like a backdoor. Just some really weird logic when handling routes, and rendering templates. | |
As to why widgetConfig[code] executes via a POST request, it is because of the following code located in /includes/vb5/frontend/applicationlight.php | |
$serverData = array_merge($_GET, $_POST); | |
if (!empty($this->application['handler']) AND method_exists($this, $this->application['handler'])) | |
{ | |
$app = $this->application['handler']; |
#!/bin/bash | |
# Install Nano Editor (with syntax highlighting) on MacOS without using Homebrew | |
# You can get the latest version number from https://www.nano-editor.org | |
# Instructions: | |
# - First off, download this Bash script from the browser & make it executable: | |
# $ chmod +x install_nano_on_macos_without_homebrew.sh | |
# - If you have "wget" installed (you most likely do), just run the script with: | |
# $ ./install_nano_on_macos_without_homebrew.sh |