Skip to content

Instantly share code, notes, and snippets.

View alexandernst's full-sized avatar

Alexander Nestorov alexandernst

View GitHub Profile
@alexandernst
alexandernst / detect.php
Created March 21, 2014 09:09
Detect eval calls using PHP's parser
<?php
//Usage: php detect.php /path/to/file.php
$data = file_get_contents($argv[1]);
$tokens = token_get_all($data);
foreach($tokens as $token){
if($token[0]==T_EVAL){
echo "Eval found in file " . $argv[1] . " on line: " . $token[2] . "\n";
}

CSS Layout Debbuger

A tweet-sized debugger for visualizing your CSS layouts. Outlines every DOM element on your page a random (valid) CSS hex color.

One-line version to paste in your DevTools

Use $$ if your browser aliases it:

~ 108 byte version

→ base64 -i trace.log.gpg
decrypt with `[email protected]` private key
hQEMA9X0O2Qy6nfzAQf/R3esSzbODtS6hccMvjGWYT4GRLEtu/wxqXKdN4YhXRZ7JSdL3ZeSr76fv4V1En21Mf2WSDH3TbnzzSruUWPN/NaLpuZrrtin2fWwbl75Z9eYaUnhC7+GGSnP+viZPZneYUDjL25ItlXVAWckor4egNgEjcuvceayiKMddGvkeOnP53sVAcQVQBUweiI/Uanawj46aWNA8HVkEuqnXlcHMz3SlHROw8J1cYeyDAcdWUniumKUZkqfWdoIVK15ab3jk8MTB0Lm8X8ihPNUwBXbfgscwM6iwKVEXD5ajjT26HS/rhPz1ds4cdDAXMknrjNDsCwolDM8NAxPjLSeIirGUNLtASsk0V+ip/evt633vulaF7uaH4potvL7zYDHtZs4acqubkf/nxXDJPRCuehumHPK+tjdBZE9ViSQXrO7yveQkgNxj2oX0gbJZbJoMn2VVxu+WVVWVwl7WMSYbQxElV5RjwRhRpXdKdZru/zklYBkXfN1MG/3MB6mFFRf4dw1XXKxchGqK7Qd9DNUn7c8R5imnNzx4lIUycUDYQoB2qmJ0qNPof9BjVSaWhA0UYRf0deSHGuIjKzbn71M2RsriAnX9/3VKwQoS6utzDtyAqCAi/yKvxfXTsUXVUKLkGFY8J7TwU3IMr16dDm9xOS/F5XKtuGTnJ21VYpim0H+DQoKKDgsZQLQifkrmt3fsruiiH7ryqO59yfwEExldwLQ//SWvcLugU/HbPONPLAKgSg96xtPWgNkvr3uUbwvifb2WwT1kmEpXBd4BbiFZVN/EVck9nBHMQdmvIw96OSEcc2Q8cnxp+Dkz7kFYy80ZejDJF34FP86jLZ8328ZoPHmuDKOaXn3WkJ/vJokZo04I4qB5PWH51exrSz9k9iOHyocJFXbygOFhhnLf5lQ8aHTe02f6TTe5a
import datetime
from telethon import TelegramClient
api_id = 123456789
api_hash = 'abcdef123456789'
client = TelegramClient('session_name', api_id, api_hash)
client.session.report_errors = True
client.start()