Using phar to implement PHP anti serialization command execution (test environment replication)

The process of testing the environment is roughly as follows: compose the phar file and modify it to upload any suffix to the server. By controlling the file operation function parameters in index.php, setting the parameters to phar://upload the file name can lead to command execution. index.phpThe code is as follows <?php class foo { var $ha = 'echo "ok";'; function __destruct() { eval($this->ha); } } $ka = $_GET['file']; file_exists($ka); It can be seen that foo is a dangerous class, and when the dangerous object is de serialized, it will cause the command to...

Pyhton3 framework Flask blueprint Blueprint

        BlueprintFlask framework is one of the way to write multi-module applications, using the flask framework for writing projects, there may be many modules, such as the front and back-end mobile version… If all modules are written in a.Py file, the file will be veryThe bloated, very difficult to maintain, but also not beautiful. So the flask framework introduces the concept of Blueprint (blueprint). A.Py file can be separated into multiple modules.       After the module is separated, the structure is         In this file structure, manage.py is the entry file, the pack...

The password behind a complete Java Web project

Preface Recently I have done several Java Web projects myself, including a company business project and a personal fun project. Write a note summarizing the gains and listing the skills and knowledge needed to do the whole process of doing the project, bringing to you the skills and knowledge that have not really touched the full Java Web.Students of the project have a more complete perspective, providing a so-called “overall situation view”, so that students can learn more targeted. Of course, the example items used here are very elementary and simple, so the gods don’t hav...

Products from design to on-line finishing (Reprint)

It was late at night, and only the lamp in the room was yellowing, and the input cursor in the notebook was blinking. Work, the project has been completed, but also on the line, this is the second project I was responsible for in the company (product), by their own planning and design of the product, now on the line, although the future operation is also a difficult road, but to go online without a little bit of joy is also false. In retrospect, there are still a lot of things to think about and improve in the whole process. To sum up, it is just right to sort out the details of knowledge poi...

1081 Rational Sum (20 points)

Given N rational numbers in the form numerator/denominator, you are supposed to calculate their sum. Input Specification: Each input file contains one test case. Each case starts with a positive integer N (≤), followed in the next line N rational numbers a1/b1 a2/b2 ... where all the numerators and denominators are in the range of long int. If there is a negative number, then the sign must appear in front of the numerator. Output Specification: For each test case, output the sum in the simplest form integer numerator/denominator where integer is the integer part of the sum, n...

Evolution of service-oriented

Distributed application architecture has a strong demand for complex logic. Upper-level businesses want to build more and richer applications quickly with their own incremental services, reduce the cost of manpower and time to carry out new services, quickly meet the changing market demand, and public services are distinguished to form a common business.Used services, which maximize code and logic reuse and avoid duplication of construction, are also called SOAs. SOA(Service-Oriented Architecture)Service-oriented architecture is a component model that links different functional units of an ap...

leetcode 1.Two Sum

In the process of preparing for Internet recruitment, leetcode and sword-finger offer are standard. Although I have written 200 questions so far, I have forgotten a lot of ideas or couldn’t pass the free bug once when I wrote the code. So I summarized them slowly from the beginning.If you have any questions, I hope you can communicate under the comments, and I’d be happy to communicate with you, to learn together, to take the BAT ATM. Maybe some people would say that there are enough solutions now, but this blog is part of a record of personal growth, and it’s the one that y...