Skip to main content

Posts

Showing posts from September, 2019

Simulate Fail2ban on Apache request spam with mod_evasive limitipconn ...

https://en.wikipedia.org/wiki/Manchu_alphabet https://en.wikipedia.org/wiki/Sweet_potato https://en.wikipedia.org/wiki/New_World_crops https://www.mdpi.com/journal/energies http://www.cired.net/publications/cired2007/pdfs/CIRED2007_0342_paper.pdf https://www.davidpashley.com/articles/writing-robust-shell-scripts/ trap command https://en.wikipedia.org/wiki/Race_condition https://unix.stackexchange.com/questions/172541/why-does-exit-1-not-exit-the-script exit 1 not work it seem { } brace bound fixed it. cat access_log | cut -d ' ' -f 1 > ip1 sort -n -t. -k1,1 -k2,2 -k3,3 -k4,4 | uniq -c | sort -n -r -s https://unix.stackexchange.com/questions/246104/unix-count-unique-ip-addresses-sort-them-by-most-frequent-and-also-sort-them https://stackoverflow.com/questions/20164696/how-to-block-spam-and-spam-bots-for-good-with-htaccess  Code: ------------------------------------------------------------------- #Block Spam Bots and Spam on your website #Block proxies...

Notes on LAMP/LAPP Sept 19

https://en.wikipedia.org/wiki/B%C3%A9zier_curve https://www.quora.com/Can-virus-and-bacteria-survive-in-salt-water https://blog.goodaudience.com/bitcoin-vs-banks-78b7410fbe9 borrow metaphor from progmng language => are there some "reserve words" (keyword) in some language ? So master these will maximum (or at least optimum) to usage Sometime the different between prod and dev env reveal some interesting case study. ie. situation when prod sold table only have few records vs dev (not cleaned ?) have about half millions records. So query that designed to overcome bottleneck on join/not in ... on DEV env become not necessary and vice verse. On the other hand, we should keep DEV env implementation in case Live data not cleaned or sometime/somehow become larger, so the already logic could handled situation. Implement that prevent future table size is cool. We often ignore this when first work proposal.In the often used App/FW like WP we can easily grab best practice ...

PHP CSV pagination (chunk), Postgresql

https://github.com/symfony/http-foundation/blob/master/File/File.php https://stackoverflow.com/questions/39972653/laravel-chunk-method-using-eloquent ./src/Illuminate/Database/Concerns/BuildsQueries.php@chunk() https://medium.com/@barryvdh/streaming-large-csv-files-with-laravel-chunked-queries-4158e484a5a2 https://stackoverflow.com/questions/3705318/simple-php-pagination-script Use virtual mc as old version system config to figure out what feature worth, case study: multi threaded in psql 9.6+ Kl idea on build some computing powerhouse lab. For example running multiple server with software both old and new to experiment and performance compare... Scale up to a lab for education & training is cool. https://en.wikipedia.org/wiki/Kunming%E2%80%93Singapore_railway https://stackoverflow.com/jobs/293378/devops-engineer-automate-and-scale-securityscorecard Job description The Opportunity SecurityScorecard is hiring an Ops Engineer to bridge the gap between our global deve...

FTP FTPS SFTP Concept, install, config and usage with certificate file

Proftpd  32 # To cause every FTP user to be "jailed" (chrooted) into their home  33 # directory, uncomment this line.  34 #DefaultRoot ~ https://en.wikipedia.org/wiki/SSH_File_Transfer_Protocol Compared to the SCP protocol, which only allows file transfers, the SFTP protocol allows for a range of operations on remote files which make it more like a remote file system protocol. An SFTP client's extra capabilities include resuming interrupted transfers, directory listings, and remote file removal. SFTP is not FTP run over SSH, but rather a new protocol designed from the ground up by the IETF SECSH working group. https://tools.ietf.org/html/draft-ietf-secsh-filexfer-13 https://en.wikipedia.org/wiki/Internet_Engineering_Task_Force https://en.wikipedia.org/wiki/Syslog-ng https://en.wikipedia.org/wiki/File_Transfer_Protocol 2yz – Success reply 4yz or 5yz – Failure reply 1yz or 3yz – Error or Incomplete reply The second digit defines...

PHP smarty UTF-8 German ẞẞẞ

https://www.php.net/manual/en/function.file.php It return an array contain each lines. a hah https://www.owasp.org/index.php/Testing_for_Local_File_Inclusion https://qiita.com/nito128/items/b78d44c414fbb918ec10 Strauß pflücken können, wie er ihm gefällt Wir müssen wissen — wir werden wissen 欄で日本 Strauß pflücken können, wie er ihm gefällt 欄で日本 jürgen elmsheuser Wir müssen wissen — wir werden wissen 欄で日本文字化けしてしまう ä ö ü ß Ö Ä Ü ẞ ẞ ẞ ẞ ẞ ẞ ẞ 欄で日 éàèùâêîôûëïüÿçœæÉÀÈÙÂÊÎÔÛËÏܟnjƠ https://stackoverflow.com/questions/7764176/how-to-copy-from-current-position-to-the-end-of-line-in-vi https://en.wikipedia.org/wiki/Hindi exploit some oop from Smarty.class.php to see how an class constructed. https://superuser.com/questions/333856/ftp-authentication-with-public-key |replace:"\xe1\xba\x9e":"\xc3\x9f"