Skip to content

Instantly share code, notes, and snippets.

View IonBazan's full-sized avatar
:shipit:

Ion Bazan IonBazan

:shipit:
View GitHub Profile
@IonBazan
IonBazan / flag.php
Created October 22, 2021 09:27
Country code to country flag Emoji (PL -> 🇵🇱)
<?php
/**
* Converts country code (ISO 3166-1) to its emoji flag representation (PL -> 🇵🇱).
*
* This solution supports both lowercase and uppercase codes using modulo 32 .
* Since it doesn't perform any validation, you should make sure the code is a valid country code first.
*
* 0x1F1E5 is a code of character right before "REGIONAL INDICATOR SYMBOL LETTER A" (🇦).
*
-- Replace INNODB_FOREIGN with INNODB_SYS_FOREIGN and INNODB_FOREIGN_COLS with INNODB_SYS_FOREIGN_COLS for older MySQL versions
SELECT
columns.table_name, engine, columns.column_name
FROM
information_schema.columns
INNER JOIN
information_schema.tables ON tables.table_name = columns.table_name
AND table_type = 'BASE TABLE'
WHERE
NOT EXISTS( SELECT
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Bruteforce!</title>
</head>
<!-- http://www.tp-link.com/resources/simulator/TL-WR750N_V5.0/localiztion/str_menu.js -->
<body onload="detectFirefox()">
<h1>Bruteforcing TP-Link routers with JavaScript</h1>