A Website built on with
Built with:
<?php | |
function getUserIP() { | |
if( array_key_exists('HTTP_X_FORWARDED_FOR', $_SERVER) && !empty($_SERVER['HTTP_X_FORWARDED_FOR']) ) { | |
if (strpos($_SERVER['HTTP_X_FORWARDED_FOR'], ',')>0) { | |
$addr = explode(",",$_SERVER['HTTP_X_FORWARDED_FOR']); | |
return trim($addr[0]); | |
} else { | |
return $_SERVER['HTTP_X_FORWARDED_FOR']; | |
} |
/** | |
* @description calculates the levenshtein distance between words | |
* @param {string} str a string | |
* @param {string} str2 another string | |
* @returns {object} with properties 'steps' and 'transitions' | |
*/ | |
function levenshtein(str, str2) { | |
if (typeof str !== 'string' || typeof str2 !== 'string') return; | |
let [shorter, longer] = [str, str2].sort((a, b) => a.length - b.length); |
#!/bin/bash | |
echo "hello" $USER "we're gonna find some infected files"; | |
echo "=====First: let's find .oti Injections====="; | |
grep --include=\*.php -Hnrwo -P '^(@include)+.+(\.ot(i|\\x69|c)\"\);)' . ; | |
find . -type f -name "*.oti"; | |
echo "=====Next: let's find PHP files with obfuscated code being evaluated====="; | |
echo " looking for the cookie/post files"; | |
grep --include=\*.php -Hwnro -P '(\$_COOKIE(,|;))+.+(\$_POST)' . ; | |
echo " looking for the die() files" | |
grep --include=\*.php -Hwnro -P "(die+)(?:.[^'\"\$\s_a-z0-1]+)(\);)" . ; |
const masculinePronouns = new RegExp('\b(she|(her(s(elf|\b)|\b))|s(on|a|u(a|\b))|el{1,2}(a|e)(-même|\b))\b((\W(m(i|e)sma)|\b))', 'gi'); | |
const femininePronouns = new RegExp('\b(she|(her(s(elf|\b)|\b))|s(on|a|u(a|\b))|el{1,2}(a|e)(-même|\b))\b((\W(m(i|e)sma)|\b))','gi'); | |
/* | |
English: she, her, hers, herself | |
French: elle, elle-même, son, sa | |
Spanish: ella, su, ella misma | |
Portuguese: ela, sua, ela mesma | |
class TableOfContents { | |
static listContainerClass = 'articleTOC__list'; | |
static listItemClass = 'articleTOC__item'; | |
static listLinkClass = 'articleTOC__link'; | |
static modifierSeparator = '--'; | |
/* | |
* @description Gets a list of all title elements having an ID in a given container | |
* @param {HTMLElement} container - An element containing title elements (h1, h2, h3) |
/** | |
* @class Locker | |
* @description who doesn't like Konami? | |
* @example const locker = new Locker(); locker.initialize(); | |
* | |
*/ | |
// I'm not going to use Babel for a tiny static site | |
// eslint-disable-next-line no-unused-vars | |
class Locker { | |
/** |
class ClientStorage { | |
/** | |
* Converts a string into a namespaced string | |
* @param {string} namespace the namespace | |
* @param {string} keyname keyname | |
* @returns {string} a string with namespace.keyname | |
*/ | |
static getNamespacedKeyName(namespace, keyname) { | |
let namespacedKeyName = ""; |
/* | |
where "title" is the full class name | |
/class=(.*[ "]title[ "].*)/g | |
*/ | |
const className = 'title'; | |
const regex = new RegExp(`/class=(.*[ "]${className}[ "].*)/g`); | |
/** | |
* Class for adding CSS with JavaScript that relies on the CSSOM | |
*/ | |
class JSCSS { | |
/** | |
* @param {string} cssText Text for a stylesheet. Rulesets, queries, and all | |
*/ | |
constructor(cssText = '') { | |
const sheet = JSCSS.addStyleSheet(); | |
this.stylesheet = JSCSS.getStyleSheet(sheet.title); |