#!/bin/bash
DOCUMENT_ROOT=/var/www/html/
RANDOM_NAME=$(head /dev/urandom | tr -dc A-Za-z0-9 | head -c 13)
echo "1. Put file to ${DOCUMENT_ROOT}${RANDOM_NAME}.php"
echo "<?php var_dump(opcache_reset()); ?>" > ${DOCUMENT_ROOT}${RANDOM_NAME}.php
echo "2. HTTP Request to https://example.com/${RANDOM_NAME}.php"
curl https://example.com/${RANDOM_NAME}.php
echo "3. Remove file from ${DOCUMENT_ROOT}${RANDOM_NAME}.php"
rm ${DOCUMENT_ROOT}${RANDOM_NAME}.php
Register as a new user and use Qiita more conveniently
- You get articles that match your needs
- You can efficiently read back useful information
- You can use dark theme