Skip to content

Instantly share code, notes, and snippets.

View IonBazan's full-sized avatar

Ion Bazan IonBazan

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
@IonBazan
IonBazan / tinder-liked.js
Last active October 31, 2020 10:18
Tinder liked photos
// Copy-paste this code into the Developer Console (F12 or Cmd+Option+I on Mac) on Tinder Web. Please remember to allow for popups.
fetch('https://api.gotinder.com/v2/fast-match/teasers', {
headers: {
'x-auth-token': localStorage.getItem('TinderWeb/APIToken'),
}
})
.then(r => r.json())
.then(data => data.data.results.map(result => result.user.photos.map(photo => window.open(photo.url))))
@IonBazan
IonBazan / vat-check.php
Created April 17, 2018 22:19
Sprawdzanie statusu płatnika VAT
<?php
$nip = '7740001454';
$client = new SoapClient('https://sprawdz-status-vat.mf.gov.pl/?wsdl');
$result = $client->SprawdzNIP($nip);
var_dump($result);
// Result:
// object(stdClass)#2 (2) {
// ["Kod"]=>
<!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>