2,836 karma · joined April 8, 2011
https://pstadler.dev
https://github.com/pstadler
https://twitter.com/pstadler
https://infosec.exchange/@ps
[ my public key: https://keybase.io/ps; my proof: https://keybase.io/ps/sigs/5fJvRJSJfeFNB0mGiAzfHVBuEv0TYYxMGMd4TWc-DZo ]> it's also written in PHP... which doesn't necessarily have to count against it, but makes me a little wary
why that?
Following is slightly off-topic but for searching inside files like
find . -name "*.css" -exec grep -l "#content" {} \;
try `ack` instead ack --css '#content'
Above command will recursively search for '#content' in all css files under the current directory. It is faster than grep and does automatically exclude your hidden version control folders. No need to mess with `--exclude`. I really stopped using grep at all.
ack can be found here: http://betterthangrep.com/Plus, you really get this feeling of activity while browsing projects and code on GitHub. Google Code and SourceForge seem so abandoned in comparison.
mysql_query("INSERT INTO table(field) VALUES('".$_POST['input']."')");
and not to forget, a truly classic one: include('pages/'.$_GET['page']);
When I started to learn PHP there was a contest between the students: Who brings hosts with vulnerable websites down faster. The trick was to recusrively include the same page (like index.php for example). The most funny thing though was to see the explosively rising load average by including /proc/uptime.After having some fun, we usually sent emails to the administrators just to not receive any answers and to find the hosts still vulnerable months later...
I remember one guy who was a PHP developer at the company for years. He was really good at it though. However during my apprenticeship I asked him about best practices querying databases and showed him my code. Looking at it he said: "Why the hell would someone escape those values? It's a database, not the Pentagon."