[red sun Day12 CTF] SQL injection caused by htmlentities

Exercise notes Recurrence Code: index.php <?php require 'config.php'; if(isset($_REQUEST['username'])){ if(preg_match("/(?:\w*)\W*?[a-z].*(R|ELECT|OIN|NTO|HERE|NION)/i", $_REQUEST['username'])){ die("Attack detected!!!"); } } if(isset($_REQUEST['password'])){ if(preg_match( ...

Posted on Sun, 19 Jan 2020 09:50:36 -0500 by Kingskin

Generate word files from html code

Welcome to the original self-built blog:http://www.e-lionel.com/index.php/2019/02/28/102/ The requirement is that the front end passes css and body over, the back end splits the data into html strings through string splicing, and then converts the html string into a word doc file, which is downloaded b ...

Posted on Sat, 18 Jan 2020 21:00:10 -0500 by jnoun

Syntax comparison between Go and PHP

Go is a statically typed compiled language designed by Google. It's a bit like C, but it has more advantages, such as garbage collection, memory security, structure type and concurrency. Its concurrent mechanism enables multi-core and network machines to play the most role. This is one of the best selling points of GoLang. In addition, go is fa ...

Posted on Thu, 16 Jan 2020 12:48:57 -0500 by Plxply

php multiprocess programming

php multiprocess programming PHP's process control supports Unix mode process creation, program execution, signal processing and process interruption. Process control cannot be applied to the Web server environment, which may bring unexpected results when used in the Web service environment.   pcntl function pcntl_fork(): generates a branch ( ...

Posted on Thu, 16 Jan 2020 03:25:27 -0500 by Travist6983

PHP regular expression and form registration case

A regular expression is a string with a specific pattern to match text Preg match $pattern = '/php/'; $subject = "php It's the best programming language, php No one!"; $result = preg_match($pattern,$subject); if($result){ echo "<h1>Matching success</h1>"; }else{ echo "<h1>Match unsuccessful</h1>"; } Preg? Mat ...

Posted on Mon, 13 Jan 2020 23:25:54 -0500 by paladaxar

CentOS 7.6 build WordPress blog

Demand: Build WordPress blog website due to the business needs of the company's Promotion Department Introduction: WordPress is a blog platform developed in PHP language. Users can set up their own websites on servers supporting PHP and MySQL databases. You can also use WordPress as a content management system (CMS).WordPress is a personal ...

Posted on Sun, 12 Jan 2020 08:36:19 -0500 by lehara

How to catch PHP fatal errors

I can use set_error_handler() to catch most PHP errors, but it does not work with fatal (E_ERROR) errors, such as calling functions that do not exist.Is there another way to catch these errors? I'm trying to call mail() for all errors and I'm running PHP 5.2.3. #1st floor PHP has fatal errors that can be captured.They are defined as E ...

Posted on Sat, 11 Jan 2020 22:51:57 -0500 by charlieholder

One click signature image generation using Java's Webmagic crawler

One key generation of signature file using Webmagic crawler Realization principle The website is http://jiqie.zhenbi.com/c/ Then get the submitted data, submit address, and Post the data Parse the html tag to get the image address and output it to the console Self Baidu configuration without using Webmagic crawler framework This article mainly ...

Posted on Sat, 11 Jan 2020 09:31:57 -0500 by PrinceOfDragons

ACM winter holiday happy competition question solution

Competition website https://vjudge.net/contest/350953 First of all: due to the sudden death of cfcf, the experience is extremely poor. When cfcf survives, we can see the result of submission (who wants to know, yesterday was still alive) A.1228 Original question link: https://codeforces.com/probl ...

Posted on Sat, 11 Jan 2020 08:20:32 -0500 by spectsteve7

What to do if php fails to call python

What if php fails to call python? Solutions to PHP's failure in calling Python Suppose there is a file: php_test.php python_test.py To run Python in a php file: exec("python python_test.py", $array, $ret); If there is an error in running Python, it cannot be saved in array array, so you should redirect the standard error to a file. The abo ...

Posted on Fri, 10 Jan 2020 01:22:32 -0500 by jonnyw6969