Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
<?php
$server = $_SERVER;
ob_start();
echo "#!/bin/bash\n\n";
foreach ($server as $key => $value) {
if (strpos($key, '(') !== false) {
continue;
}
echo "
RESULTFOR$key=`$key=yolo php -r 'echo is_array(\$_SERVER[\"$key\"]) ? var_export(\$_SERVER[\"$key\"],true) : \$_SERVER[\"$key\"];'`
if [[ \${RESULTFOR$key} == \"yolo\" ]]; then
echo \"KO for key $key\"
else
echo \"Key $key is considered safe\"
fi
";
}
file_put_contents('test.bash', ob_get_clean());
pierstoval@PIERSTOVAL /mnt/e/dev/www/sandbox $ ./test.bash
KO for key ALLUSERSPROFILE
KO for key APPDATA
KO for key CLINK_DIR
KO for key CommonProgramFiles
KO for key CommonProgramW6432
KO for key COMPUTERNAME
KO for key ComSpec
KO for key FPS_BROWSER_APP_PROFILE_STRING
KO for key FPS_BROWSER_USER_PROFILE_STRING
KO for key GIT_LFS_PATH
KO for key GIT_SUBREPO_ROOT
KO for key GYP_MSVS_VERSION
KO for key HerokuPath
KO for key HOMEDRIVE
KO for key HOMEPATH
KO for key JAVA_HOME
KO for key LANG
KO for key LC_ALL
KO for key LOCALAPPDATA
KO for key LOGONSERVER
KO for key NUMBER_OF_PROCESSORS
KO for key OS
KO for key Path
KO for key PATHEXT
KO for key PROCESSOR_ARCHITECTURE
KO for key PROCESSOR_IDENTIFIER
KO for key PROCESSOR_LEVEL
KO for key PROCESSOR_REVISION
KO for key ProgramData
KO for key ProgramFiles
KO for key ProgramW6432
KO for key PSModulePath
KO for key PUBLIC
KO for key PYTHONPATH
KO for key SESSIONNAME
KO for key SYMFONY_PHPUNIT_DIR
KO for key SYMFONY_PHPUNIT_VERSION
KO for key SystemDrive
KO for key SystemRoot
KO for key TEMP
KO for key TMP
KO for key USERDOMAIN
KO for key USERDOMAIN_ROAMINGPROFILE
KO for key USERNAME
KO for key USERPROFILE
KO for key VS140COMNTOOLS
KO for key windir
Key PHP_SELF is considered safe
Key SCRIPT_NAME is considered safe
Key SCRIPT_FILENAME is considered safe
Key PATH_TRANSLATED is considered safe
Key DOCUMENT_ROOT is considered safe
Key REQUEST_TIME_FLOAT is considered safe
Key REQUEST_TIME is considered safe
Key argv is considered safe
Key argc is considered safe
#!/bin/bash
RESULTFORALLUSERSPROFILE=`ALLUSERSPROFILE=yolo php -r 'echo is_array($_SERVER["ALLUSERSPROFILE"]) ? var_export($_SERVER["ALLUSERSPROFILE"],true) : $_SERVER["ALLUSERSPROFILE"];'`
if [[ ${RESULTFORALLUSERSPROFILE} == "yolo" ]]; then
echo "KO for key ALLUSERSPROFILE"
else
echo "Key ALLUSERSPROFILE is considered safe"
fi
RESULTFORAPPDATA=`APPDATA=yolo php -r 'echo is_array($_SERVER["APPDATA"]) ? var_export($_SERVER["APPDATA"],true) : $_SERVER["APPDATA"];'`
if [[ ${RESULTFORAPPDATA} == "yolo" ]]; then
echo "KO for key APPDATA"
else
echo "Key APPDATA is considered safe"
fi
RESULTFORCLINK_DIR=`CLINK_DIR=yolo php -r 'echo is_array($_SERVER["CLINK_DIR"]) ? var_export($_SERVER["CLINK_DIR"],true) : $_SERVER["CLINK_DIR"];'`
if [[ ${RESULTFORCLINK_DIR} == "yolo" ]]; then
echo "KO for key CLINK_DIR"
else
echo "Key CLINK_DIR is considered safe"
fi
RESULTFORCommonProgramFiles=`CommonProgramFiles=yolo php -r 'echo is_array($_SERVER["CommonProgramFiles"]) ? var_export($_SERVER["CommonProgramFiles"],true) : $_SERVER["CommonProgramFiles"];'`
if [[ ${RESULTFORCommonProgramFiles} == "yolo" ]]; then
echo "KO for key CommonProgramFiles"
else
echo "Key CommonProgramFiles is considered safe"
fi
RESULTFORCommonProgramW6432=`CommonProgramW6432=yolo php -r 'echo is_array($_SERVER["CommonProgramW6432"]) ? var_export($_SERVER["CommonProgramW6432"],true) : $_SERVER["CommonProgramW6432"];'`
if [[ ${RESULTFORCommonProgramW6432} == "yolo" ]]; then
echo "KO for key CommonProgramW6432"
else
echo "Key CommonProgramW6432 is considered safe"
fi
RESULTFORCOMPUTERNAME=`COMPUTERNAME=yolo php -r 'echo is_array($_SERVER["COMPUTERNAME"]) ? var_export($_SERVER["COMPUTERNAME"],true) : $_SERVER["COMPUTERNAME"];'`
if [[ ${RESULTFORCOMPUTERNAME} == "yolo" ]]; then
echo "KO for key COMPUTERNAME"
else
echo "Key COMPUTERNAME is considered safe"
fi
RESULTFORComSpec=`ComSpec=yolo php -r 'echo is_array($_SERVER["ComSpec"]) ? var_export($_SERVER["ComSpec"],true) : $_SERVER["ComSpec"];'`
if [[ ${RESULTFORComSpec} == "yolo" ]]; then
echo "KO for key ComSpec"
else
echo "Key ComSpec is considered safe"
fi
RESULTFORFPS_BROWSER_APP_PROFILE_STRING=`FPS_BROWSER_APP_PROFILE_STRING=yolo php -r 'echo is_array($_SERVER["FPS_BROWSER_APP_PROFILE_STRING"]) ? var_export($_SERVER["FPS_BROWSER_APP_PROFILE_STRING"],true) : $_SERVER["FPS_BROWSER_APP_PROFILE_STRING"];'`
if [[ ${RESULTFORFPS_BROWSER_APP_PROFILE_STRING} == "yolo" ]]; then
echo "KO for key FPS_BROWSER_APP_PROFILE_STRING"
else
echo "Key FPS_BROWSER_APP_PROFILE_STRING is considered safe"
fi
RESULTFORFPS_BROWSER_USER_PROFILE_STRING=`FPS_BROWSER_USER_PROFILE_STRING=yolo php -r 'echo is_array($_SERVER["FPS_BROWSER_USER_PROFILE_STRING"]) ? var_export($_SERVER["FPS_BROWSER_USER_PROFILE_STRING"],true) : $_SERVER["FPS_BROWSER_USER_PROFILE_STRING"];'`
if [[ ${RESULTFORFPS_BROWSER_USER_PROFILE_STRING} == "yolo" ]]; then
echo "KO for key FPS_BROWSER_USER_PROFILE_STRING"
else
echo "Key FPS_BROWSER_USER_PROFILE_STRING is considered safe"
fi
RESULTFORGIT_LFS_PATH=`GIT_LFS_PATH=yolo php -r 'echo is_array($_SERVER["GIT_LFS_PATH"]) ? var_export($_SERVER["GIT_LFS_PATH"],true) : $_SERVER["GIT_LFS_PATH"];'`
if [[ ${RESULTFORGIT_LFS_PATH} == "yolo" ]]; then
echo "KO for key GIT_LFS_PATH"
else
echo "Key GIT_LFS_PATH is considered safe"
fi
RESULTFORGIT_SUBREPO_ROOT=`GIT_SUBREPO_ROOT=yolo php -r 'echo is_array($_SERVER["GIT_SUBREPO_ROOT"]) ? var_export($_SERVER["GIT_SUBREPO_ROOT"],true) : $_SERVER["GIT_SUBREPO_ROOT"];'`
if [[ ${RESULTFORGIT_SUBREPO_ROOT} == "yolo" ]]; then
echo "KO for key GIT_SUBREPO_ROOT"
else
echo "Key GIT_SUBREPO_ROOT is considered safe"
fi
RESULTFORGYP_MSVS_VERSION=`GYP_MSVS_VERSION=yolo php -r 'echo is_array($_SERVER["GYP_MSVS_VERSION"]) ? var_export($_SERVER["GYP_MSVS_VERSION"],true) : $_SERVER["GYP_MSVS_VERSION"];'`
if [[ ${RESULTFORGYP_MSVS_VERSION} == "yolo" ]]; then
echo "KO for key GYP_MSVS_VERSION"
else
echo "Key GYP_MSVS_VERSION is considered safe"
fi
RESULTFORHerokuPath=`HerokuPath=yolo php -r 'echo is_array($_SERVER["HerokuPath"]) ? var_export($_SERVER["HerokuPath"],true) : $_SERVER["HerokuPath"];'`
if [[ ${RESULTFORHerokuPath} == "yolo" ]]; then
echo "KO for key HerokuPath"
else
echo "Key HerokuPath is considered safe"
fi
RESULTFORHOMEDRIVE=`HOMEDRIVE=yolo php -r 'echo is_array($_SERVER["HOMEDRIVE"]) ? var_export($_SERVER["HOMEDRIVE"],true) : $_SERVER["HOMEDRIVE"];'`
if [[ ${RESULTFORHOMEDRIVE} == "yolo" ]]; then
echo "KO for key HOMEDRIVE"
else
echo "Key HOMEDRIVE is considered safe"
fi
RESULTFORHOMEPATH=`HOMEPATH=yolo php -r 'echo is_array($_SERVER["HOMEPATH"]) ? var_export($_SERVER["HOMEPATH"],true) : $_SERVER["HOMEPATH"];'`
if [[ ${RESULTFORHOMEPATH} == "yolo" ]]; then
echo "KO for key HOMEPATH"
else
echo "Key HOMEPATH is considered safe"
fi
RESULTFORJAVA_HOME=`JAVA_HOME=yolo php -r 'echo is_array($_SERVER["JAVA_HOME"]) ? var_export($_SERVER["JAVA_HOME"],true) : $_SERVER["JAVA_HOME"];'`
if [[ ${RESULTFORJAVA_HOME} == "yolo" ]]; then
echo "KO for key JAVA_HOME"
else
echo "Key JAVA_HOME is considered safe"
fi
RESULTFORLANG=`LANG=yolo php -r 'echo is_array($_SERVER["LANG"]) ? var_export($_SERVER["LANG"],true) : $_SERVER["LANG"];'`
if [[ ${RESULTFORLANG} == "yolo" ]]; then
echo "KO for key LANG"
else
echo "Key LANG is considered safe"
fi
RESULTFORLC_ALL=`LC_ALL=yolo php -r 'echo is_array($_SERVER["LC_ALL"]) ? var_export($_SERVER["LC_ALL"],true) : $_SERVER["LC_ALL"];'`
if [[ ${RESULTFORLC_ALL} == "yolo" ]]; then
echo "KO for key LC_ALL"
else
echo "Key LC_ALL is considered safe"
fi
RESULTFORLOCALAPPDATA=`LOCALAPPDATA=yolo php -r 'echo is_array($_SERVER["LOCALAPPDATA"]) ? var_export($_SERVER["LOCALAPPDATA"],true) : $_SERVER["LOCALAPPDATA"];'`
if [[ ${RESULTFORLOCALAPPDATA} == "yolo" ]]; then
echo "KO for key LOCALAPPDATA"
else
echo "Key LOCALAPPDATA is considered safe"
fi
RESULTFORLOGONSERVER=`LOGONSERVER=yolo php -r 'echo is_array($_SERVER["LOGONSERVER"]) ? var_export($_SERVER["LOGONSERVER"],true) : $_SERVER["LOGONSERVER"];'`
if [[ ${RESULTFORLOGONSERVER} == "yolo" ]]; then
echo "KO for key LOGONSERVER"
else
echo "Key LOGONSERVER is considered safe"
fi
RESULTFORNUMBER_OF_PROCESSORS=`NUMBER_OF_PROCESSORS=yolo php -r 'echo is_array($_SERVER["NUMBER_OF_PROCESSORS"]) ? var_export($_SERVER["NUMBER_OF_PROCESSORS"],true) : $_SERVER["NUMBER_OF_PROCESSORS"];'`
if [[ ${RESULTFORNUMBER_OF_PROCESSORS} == "yolo" ]]; then
echo "KO for key NUMBER_OF_PROCESSORS"
else
echo "Key NUMBER_OF_PROCESSORS is considered safe"
fi
RESULTFOROS=`OS=yolo php -r 'echo is_array($_SERVER["OS"]) ? var_export($_SERVER["OS"],true) : $_SERVER["OS"];'`
if [[ ${RESULTFOROS} == "yolo" ]]; then
echo "KO for key OS"
else
echo "Key OS is considered safe"
fi
RESULTFORPath=`Path=yolo php -r 'echo is_array($_SERVER["Path"]) ? var_export($_SERVER["Path"],true) : $_SERVER["Path"];'`
if [[ ${RESULTFORPath} == "yolo" ]]; then
echo "KO for key Path"
else
echo "Key Path is considered safe"
fi
RESULTFORPATHEXT=`PATHEXT=yolo php -r 'echo is_array($_SERVER["PATHEXT"]) ? var_export($_SERVER["PATHEXT"],true) : $_SERVER["PATHEXT"];'`
if [[ ${RESULTFORPATHEXT} == "yolo" ]]; then
echo "KO for key PATHEXT"
else
echo "Key PATHEXT is considered safe"
fi
RESULTFORPROCESSOR_ARCHITECTURE=`PROCESSOR_ARCHITECTURE=yolo php -r 'echo is_array($_SERVER["PROCESSOR_ARCHITECTURE"]) ? var_export($_SERVER["PROCESSOR_ARCHITECTURE"],true) : $_SERVER["PROCESSOR_ARCHITECTURE"];'`
if [[ ${RESULTFORPROCESSOR_ARCHITECTURE} == "yolo" ]]; then
echo "KO for key PROCESSOR_ARCHITECTURE"
else
echo "Key PROCESSOR_ARCHITECTURE is considered safe"
fi
RESULTFORPROCESSOR_IDENTIFIER=`PROCESSOR_IDENTIFIER=yolo php -r 'echo is_array($_SERVER["PROCESSOR_IDENTIFIER"]) ? var_export($_SERVER["PROCESSOR_IDENTIFIER"],true) : $_SERVER["PROCESSOR_IDENTIFIER"];'`
if [[ ${RESULTFORPROCESSOR_IDENTIFIER} == "yolo" ]]; then
echo "KO for key PROCESSOR_IDENTIFIER"
else
echo "Key PROCESSOR_IDENTIFIER is considered safe"
fi
RESULTFORPROCESSOR_LEVEL=`PROCESSOR_LEVEL=yolo php -r 'echo is_array($_SERVER["PROCESSOR_LEVEL"]) ? var_export($_SERVER["PROCESSOR_LEVEL"],true) : $_SERVER["PROCESSOR_LEVEL"];'`
if [[ ${RESULTFORPROCESSOR_LEVEL} == "yolo" ]]; then
echo "KO for key PROCESSOR_LEVEL"
else
echo "Key PROCESSOR_LEVEL is considered safe"
fi
RESULTFORPROCESSOR_REVISION=`PROCESSOR_REVISION=yolo php -r 'echo is_array($_SERVER["PROCESSOR_REVISION"]) ? var_export($_SERVER["PROCESSOR_REVISION"],true) : $_SERVER["PROCESSOR_REVISION"];'`
if [[ ${RESULTFORPROCESSOR_REVISION} == "yolo" ]]; then
echo "KO for key PROCESSOR_REVISION"
else
echo "Key PROCESSOR_REVISION is considered safe"
fi
RESULTFORProgramData=`ProgramData=yolo php -r 'echo is_array($_SERVER["ProgramData"]) ? var_export($_SERVER["ProgramData"],true) : $_SERVER["ProgramData"];'`
if [[ ${RESULTFORProgramData} == "yolo" ]]; then
echo "KO for key ProgramData"
else
echo "Key ProgramData is considered safe"
fi
RESULTFORProgramFiles=`ProgramFiles=yolo php -r 'echo is_array($_SERVER["ProgramFiles"]) ? var_export($_SERVER["ProgramFiles"],true) : $_SERVER["ProgramFiles"];'`
if [[ ${RESULTFORProgramFiles} == "yolo" ]]; then
echo "KO for key ProgramFiles"
else
echo "Key ProgramFiles is considered safe"
fi
RESULTFORProgramW6432=`ProgramW6432=yolo php -r 'echo is_array($_SERVER["ProgramW6432"]) ? var_export($_SERVER["ProgramW6432"],true) : $_SERVER["ProgramW6432"];'`
if [[ ${RESULTFORProgramW6432} == "yolo" ]]; then
echo "KO for key ProgramW6432"
else
echo "Key ProgramW6432 is considered safe"
fi
RESULTFORPSModulePath=`PSModulePath=yolo php -r 'echo is_array($_SERVER["PSModulePath"]) ? var_export($_SERVER["PSModulePath"],true) : $_SERVER["PSModulePath"];'`
if [[ ${RESULTFORPSModulePath} == "yolo" ]]; then
echo "KO for key PSModulePath"
else
echo "Key PSModulePath is considered safe"
fi
RESULTFORPUBLIC=`PUBLIC=yolo php -r 'echo is_array($_SERVER["PUBLIC"]) ? var_export($_SERVER["PUBLIC"],true) : $_SERVER["PUBLIC"];'`
if [[ ${RESULTFORPUBLIC} == "yolo" ]]; then
echo "KO for key PUBLIC"
else
echo "Key PUBLIC is considered safe"
fi
RESULTFORPYTHONPATH=`PYTHONPATH=yolo php -r 'echo is_array($_SERVER["PYTHONPATH"]) ? var_export($_SERVER["PYTHONPATH"],true) : $_SERVER["PYTHONPATH"];'`
if [[ ${RESULTFORPYTHONPATH} == "yolo" ]]; then
echo "KO for key PYTHONPATH"
else
echo "Key PYTHONPATH is considered safe"
fi
RESULTFORSESSIONNAME=`SESSIONNAME=yolo php -r 'echo is_array($_SERVER["SESSIONNAME"]) ? var_export($_SERVER["SESSIONNAME"],true) : $_SERVER["SESSIONNAME"];'`
if [[ ${RESULTFORSESSIONNAME} == "yolo" ]]; then
echo "KO for key SESSIONNAME"
else
echo "Key SESSIONNAME is considered safe"
fi
RESULTFORSYMFONY_PHPUNIT_DIR=`SYMFONY_PHPUNIT_DIR=yolo php -r 'echo is_array($_SERVER["SYMFONY_PHPUNIT_DIR"]) ? var_export($_SERVER["SYMFONY_PHPUNIT_DIR"],true) : $_SERVER["SYMFONY_PHPUNIT_DIR"];'`
if [[ ${RESULTFORSYMFONY_PHPUNIT_DIR} == "yolo" ]]; then
echo "KO for key SYMFONY_PHPUNIT_DIR"
else
echo "Key SYMFONY_PHPUNIT_DIR is considered safe"
fi
RESULTFORSYMFONY_PHPUNIT_VERSION=`SYMFONY_PHPUNIT_VERSION=yolo php -r 'echo is_array($_SERVER["SYMFONY_PHPUNIT_VERSION"]) ? var_export($_SERVER["SYMFONY_PHPUNIT_VERSION"],true) : $_SERVER["SYMFONY_PHPUNIT_VERSION"];'`
if [[ ${RESULTFORSYMFONY_PHPUNIT_VERSION} == "yolo" ]]; then
echo "KO for key SYMFONY_PHPUNIT_VERSION"
else
echo "Key SYMFONY_PHPUNIT_VERSION is considered safe"
fi
RESULTFORSystemDrive=`SystemDrive=yolo php -r 'echo is_array($_SERVER["SystemDrive"]) ? var_export($_SERVER["SystemDrive"],true) : $_SERVER["SystemDrive"];'`
if [[ ${RESULTFORSystemDrive} == "yolo" ]]; then
echo "KO for key SystemDrive"
else
echo "Key SystemDrive is considered safe"
fi
RESULTFORSystemRoot=`SystemRoot=yolo php -r 'echo is_array($_SERVER["SystemRoot"]) ? var_export($_SERVER["SystemRoot"],true) : $_SERVER["SystemRoot"];'`
if [[ ${RESULTFORSystemRoot} == "yolo" ]]; then
echo "KO for key SystemRoot"
else
echo "Key SystemRoot is considered safe"
fi
RESULTFORTEMP=`TEMP=yolo php -r 'echo is_array($_SERVER["TEMP"]) ? var_export($_SERVER["TEMP"],true) : $_SERVER["TEMP"];'`
if [[ ${RESULTFORTEMP} == "yolo" ]]; then
echo "KO for key TEMP"
else
echo "Key TEMP is considered safe"
fi
RESULTFORTMP=`TMP=yolo php -r 'echo is_array($_SERVER["TMP"]) ? var_export($_SERVER["TMP"],true) : $_SERVER["TMP"];'`
if [[ ${RESULTFORTMP} == "yolo" ]]; then
echo "KO for key TMP"
else
echo "Key TMP is considered safe"
fi
RESULTFORUSERDOMAIN=`USERDOMAIN=yolo php -r 'echo is_array($_SERVER["USERDOMAIN"]) ? var_export($_SERVER["USERDOMAIN"],true) : $_SERVER["USERDOMAIN"];'`
if [[ ${RESULTFORUSERDOMAIN} == "yolo" ]]; then
echo "KO for key USERDOMAIN"
else
echo "Key USERDOMAIN is considered safe"
fi
RESULTFORUSERDOMAIN_ROAMINGPROFILE=`USERDOMAIN_ROAMINGPROFILE=yolo php -r 'echo is_array($_SERVER["USERDOMAIN_ROAMINGPROFILE"]) ? var_export($_SERVER["USERDOMAIN_ROAMINGPROFILE"],true) : $_SERVER["USERDOMAIN_ROAMINGPROFILE"];'`
if [[ ${RESULTFORUSERDOMAIN_ROAMINGPROFILE} == "yolo" ]]; then
echo "KO for key USERDOMAIN_ROAMINGPROFILE"
else
echo "Key USERDOMAIN_ROAMINGPROFILE is considered safe"
fi
RESULTFORUSERNAME=`USERNAME=yolo php -r 'echo is_array($_SERVER["USERNAME"]) ? var_export($_SERVER["USERNAME"],true) : $_SERVER["USERNAME"];'`
if [[ ${RESULTFORUSERNAME} == "yolo" ]]; then
echo "KO for key USERNAME"
else
echo "Key USERNAME is considered safe"
fi
RESULTFORUSERPROFILE=`USERPROFILE=yolo php -r 'echo is_array($_SERVER["USERPROFILE"]) ? var_export($_SERVER["USERPROFILE"],true) : $_SERVER["USERPROFILE"];'`
if [[ ${RESULTFORUSERPROFILE} == "yolo" ]]; then
echo "KO for key USERPROFILE"
else
echo "Key USERPROFILE is considered safe"
fi
RESULTFORVS140COMNTOOLS=`VS140COMNTOOLS=yolo php -r 'echo is_array($_SERVER["VS140COMNTOOLS"]) ? var_export($_SERVER["VS140COMNTOOLS"],true) : $_SERVER["VS140COMNTOOLS"];'`
if [[ ${RESULTFORVS140COMNTOOLS} == "yolo" ]]; then
echo "KO for key VS140COMNTOOLS"
else
echo "Key VS140COMNTOOLS is considered safe"
fi
RESULTFORwindir=`windir=yolo php -r 'echo is_array($_SERVER["windir"]) ? var_export($_SERVER["windir"],true) : $_SERVER["windir"];'`
if [[ ${RESULTFORwindir} == "yolo" ]]; then
echo "KO for key windir"
else
echo "Key windir is considered safe"
fi
RESULTFORPHP_SELF=`PHP_SELF=yolo php -r 'echo is_array($_SERVER["PHP_SELF"]) ? var_export($_SERVER["PHP_SELF"],true) : $_SERVER["PHP_SELF"];'`
if [[ ${RESULTFORPHP_SELF} == "yolo" ]]; then
echo "KO for key PHP_SELF"
else
echo "Key PHP_SELF is considered safe"
fi
RESULTFORSCRIPT_NAME=`SCRIPT_NAME=yolo php -r 'echo is_array($_SERVER["SCRIPT_NAME"]) ? var_export($_SERVER["SCRIPT_NAME"],true) : $_SERVER["SCRIPT_NAME"];'`
if [[ ${RESULTFORSCRIPT_NAME} == "yolo" ]]; then
echo "KO for key SCRIPT_NAME"
else
echo "Key SCRIPT_NAME is considered safe"
fi
RESULTFORSCRIPT_FILENAME=`SCRIPT_FILENAME=yolo php -r 'echo is_array($_SERVER["SCRIPT_FILENAME"]) ? var_export($_SERVER["SCRIPT_FILENAME"],true) : $_SERVER["SCRIPT_FILENAME"];'`
if [[ ${RESULTFORSCRIPT_FILENAME} == "yolo" ]]; then
echo "KO for key SCRIPT_FILENAME"
else
echo "Key SCRIPT_FILENAME is considered safe"
fi
RESULTFORPATH_TRANSLATED=`PATH_TRANSLATED=yolo php -r 'echo is_array($_SERVER["PATH_TRANSLATED"]) ? var_export($_SERVER["PATH_TRANSLATED"],true) : $_SERVER["PATH_TRANSLATED"];'`
if [[ ${RESULTFORPATH_TRANSLATED} == "yolo" ]]; then
echo "KO for key PATH_TRANSLATED"
else
echo "Key PATH_TRANSLATED is considered safe"
fi
RESULTFORDOCUMENT_ROOT=`DOCUMENT_ROOT=yolo php -r 'echo is_array($_SERVER["DOCUMENT_ROOT"]) ? var_export($_SERVER["DOCUMENT_ROOT"],true) : $_SERVER["DOCUMENT_ROOT"];'`
if [[ ${RESULTFORDOCUMENT_ROOT} == "yolo" ]]; then
echo "KO for key DOCUMENT_ROOT"
else
echo "Key DOCUMENT_ROOT is considered safe"
fi
RESULTFORREQUEST_TIME_FLOAT=`REQUEST_TIME_FLOAT=yolo php -r 'echo is_array($_SERVER["REQUEST_TIME_FLOAT"]) ? var_export($_SERVER["REQUEST_TIME_FLOAT"],true) : $_SERVER["REQUEST_TIME_FLOAT"];'`
if [[ ${RESULTFORREQUEST_TIME_FLOAT} == "yolo" ]]; then
echo "KO for key REQUEST_TIME_FLOAT"
else
echo "Key REQUEST_TIME_FLOAT is considered safe"
fi
RESULTFORREQUEST_TIME=`REQUEST_TIME=yolo php -r 'echo is_array($_SERVER["REQUEST_TIME"]) ? var_export($_SERVER["REQUEST_TIME"],true) : $_SERVER["REQUEST_TIME"];'`
if [[ ${RESULTFORREQUEST_TIME} == "yolo" ]]; then
echo "KO for key REQUEST_TIME"
else
echo "Key REQUEST_TIME is considered safe"
fi
RESULTFORargv=`argv=yolo php -r 'echo is_array($_SERVER["argv"]) ? var_export($_SERVER["argv"],true) : $_SERVER["argv"];'`
if [[ ${RESULTFORargv} == "yolo" ]]; then
echo "KO for key argv"
else
echo "Key argv is considered safe"
fi
RESULTFORargc=`argc=yolo php -r 'echo is_array($_SERVER["argc"]) ? var_export($_SERVER["argc"],true) : $_SERVER["argc"];'`
if [[ ${RESULTFORargc} == "yolo" ]]; then
echo "KO for key argc"
else
echo "Key argc is considered safe"
fi
@ernestbuffington

This comment has been minimized.

Copy link

ernestbuffington commented Sep 5, 2017

nice

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.