Skip to content

Instantly share code, notes, and snippets.

View Omegatcu's full-sized avatar
🏠
Working from home

Michael Klein Omegatcu

🏠
Working from home
View GitHub Profile
@Omegatcu
Omegatcu / German-Zip-Codes.csv
Created February 21, 2019 22:55 — forked from jbspeakr/German-Zip-Codes.csv
list of German zip codes (Postleitzahl), including dialing code, name of the city and federal state.
We can't make this file beautiful and searchable because it's too large.
Ort;Zusatz;Plz;Vorwahl;Bundesland
Aach;b Trier;54298;0651;Rheinland-Pfalz
Aach;, Hegau;78267;07774;Baden-Württemberg
Aachen;;52062;0241;Nordrhein-Westfalen
Aachen;;52064;0241;Nordrhein-Westfalen
Aachen;;52066;0241;Nordrhein-Westfalen
Aachen;;52068;0241;Nordrhein-Westfalen
Aachen;;52070;0241;Nordrhein-Westfalen
Aachen;;52072;0241;Nordrhein-Westfalen
Aachen;;52074;0241;Nordrhein-Westfalen

Keybase proof

I hereby claim:

  • I am omegatcu on github.
  • I am omegatcu (https://keybase.io/omegatcu) on keybase.
  • I have a public key ASD7sZu9zPkixgPPTfI877LUWbX8koCR_ZP9jPN1SFPstAo

To claim this, I am signing this object:

@Omegatcu
Omegatcu / sqlishield.md
Created October 24, 2015 15:12
SQLiShield

The idea behind the SQLiShield feature in Admin Tools is checking each POST and GET variable against a regular expression. The regular expression only matches SQL code typically found in SQL injections. Considering that it's a bad practice sending raw SQL commands over an HTTP request this works very well without throwing false positives. The only false positives we are aware of is someone posting an article or a support ticket which includes a raw SQL command.

The regular expression we use (version 5 of the regex) is the following:

#(union([\s]{1,}|/\*(.*)\*/){1,}(all([\s]{1,}|/\*(.*)\*/){1,})?select|select(([\s]{1,}|/\*(.*)\*/|`){1,}([\w]|_|-|\.|\*){1,}([\s]{1,}|/\*(.*)\*/|`){1,}(,){0,})*from([\s]{1,}|/\*(.*)\//){1,}[a-z0-9]{1,}_|select([\s]{1,}|/\*(.*)\*/|\(){1,}(COUNT|MID|FLOOR|LIMIT|RAND|SLEEP|ELT)|select([\s]{1,}|/\*(.*)\*/|`){1,}.*from([\s]{1,}|/\*(.*)\//){1,}INFORMATION_SCHEMA\.|EXTRACTVALUE([\s]{1,}|\(){1,}|(insert|replace)(([\s]{1,}|/\*(.*)\*/){1,})((low_priority|delayed|high_priority|ignore)(

Awesome PHP Libraries

A list of amazingly awesome PHP libraries that you should consider using (and some other shiny extras).