Password security configuration test method, system, terminal and storage medium
By automating the acquisition and construction of password-related http request interface data, the problem of low password security configuration testing efficiency in the existing technology is solved, efficient password security verification is achieved, the testing process is simplified and the security of the system is improved.
Patent Information
- Application Number
- CN202210041411.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-01-14
- Publication Date
- 2024-09-17
- Estimated Expiration
- 2042-01-14
AI Technical Summary
In the existing technology, password-related automated testing requires manual combing of test scenarios and writing of test cases, resulting in cumbersome and time-consuming repetitive logic, low efficiency, and inability to efficiently verify password security in the system. In particular, weak password configuration issues are difficult to quickly detect.
By obtaining the network configuration information of the back-end and front-end, locating the password input box, randomly generating multiple password formats, constructing requests and recording server responses, and automatically generating test results, the efficiency and accuracy of password security configuration testing are improved.
It realizes the automated acquisition and construction of password-related http request interface data, improves the efficiency of manually organizing information and identifying test scenarios, simplifies the password security configuration test process, reduces the burden of manual coding, and enhances test efficiency and accuracy.
Smart Images

Figure CN114443477B
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of software testing, and in particular to a password security configuration testing method, system, terminal and storage medium. Background Art
[0002] With the prosperous development of the Internet, more and more software system development adopts CS architecture (server-client, i.e. Client-Server structure). There are front-end WebUI interactions and back-end system processing, so the http interface communication between the front and back ends is an important link. In the software development process, the testing of the interface is also crucial. At present, the http interface testing of software systems with WebUI interactions is gradually turning to automation. Software automation testing is a way to convert human-driven test behaviors into machine execution. In the prior art, the test personnel sort out the test scenarios, write the corresponding automated test codes one by one, and run the test codes to implement automated testing to obtain the corresponding test result files.
[0003] Currently, software systems that provide services to the outside world generally have user management modules. If there are security issues with the password configuration in the user management module, there may be users with weak passwords in the system. Weak passwords may lead to hacker attacks, resulting in serious risks such as server collapse and R&D data leakage. Under the basic requirements of IT system construction and operation and maintenance such as information security and customer information security, password security configuration needs to be tested in a focused manner to eliminate the biggest security risks in system operation. A weak password refers to a password that is easily guessed by others or cracked by cracking tools, such as a short string: 1w@2q, mixed uppercase and lowercase: SelfPwd, reverse consecutive numbers: 87654321, etc.
[0004] In order to verify the security of the system, it is necessary to test the password-related interfaces in the system. In order to facilitate multiple rounds of testing to discover and verify problems, it is necessary to convert password-related tests into automated tests. If the current test strategy process is used for password-related automated tests, it is necessary to manually comb through the test scenarios and then write corresponding test cases. Inevitably, there will be repeated test logic, such as repeatedly building passwords of different complexities. This makes the manual combing process cumbersome and time-consuming during test preparation; different test case codes have different test objects but the test logic is repeated, and the code writing efficiency is low. Summary of the invention
[0005] In view of the above-mentioned deficiencies in the prior art, the present invention provides a password security configuration testing method, system, terminal and storage medium to solve the above-mentioned technical problems.
[0006] In a first aspect, the present invention provides a password security configuration testing method, comprising:
[0007] Obtain back-end network configuration information and front-end web page network configuration data;
[0008] Locate the block elements of all password input boxes according to the network configuration information and the network configuration data, and read the description information and the operation-related function information from the block elements;
[0009] Generating multiple passwords randomly, and constructing the multiple passwords into multiple requests sent to the server according to the description information and the operation-related function information;
[0010] Record the request response information returned by the server, and generate test results based on the request response information.
[0011] Furthermore, the backend network configuration information and the front-end web page network configuration data are obtained, including:
[0012] Traverse all page source code configuration files on the backend to obtain backend network configuration information;
[0013] Crawl network configuration data of web pages on the front end.
[0014] Further, the block elements of all password input boxes are located according to the network configuration information and the network configuration data, and the description information and the operation-related function information are read from the block elements, including:
[0015] Traverse all input boxes of the network configuration data and find the password input box whose input type is password input;
[0016] Locate the block element of the password input box from the network configuration information, and read the description information except the password from the block element;
[0017] Find the function associated with the click event in the block element, and obtain the request address, request type, and request parameters of the function.
[0018] Furthermore, multiple passwords are randomly generated, and the multiple passwords are respectively constructed into multiple requests sent to the server according to the description information and the operation-related function information, including:
[0019] Use random functions to generate passwords in various formats, including random uppercase and lowercase numbers, special symbols, all uppercase English, all lowercase English, and all-digit formats;
[0020] Change the password length according to the set rules to obtain password groups of different lengths in the same format.
[0021] Furthermore, the request response information returned by the server is recorded, and the test results are generated according to the request response information, including:
[0022] The password format requirement of the password input box is parsed according to the password type and the corresponding request response information, wherein the request response information includes prompts of request approval, request failure, and format error.
[0023] In a second aspect, the present invention provides a password security configuration testing system, comprising:
[0024] Configuration parsing unit, used to obtain back-end network configuration information and network configuration data of front-end web pages;
[0025] An element parsing unit, used to locate the block elements of all password input boxes according to the network configuration information and the network configuration data, and read the description information and the operation-related function information from the block elements;
[0026] A password generation unit, used for randomly generating a plurality of passwords, and constructing the plurality of passwords into a plurality of requests sent to the server according to the description information and the operation-related function information;
[0027] The response parsing unit is used to record the request response information returned by the server and generate test results based on the request response information.
[0028] Furthermore, the configuration parsing unit includes:
[0029] The backend parsing module is used to traverse all page source code configuration files on the backend to obtain the backend network configuration information;
[0030] The front-end parsing module is used to crawl the network configuration data of the web page on the front-end.
[0031] Furthermore, the element parsing unit includes:
[0032] The data traversal module is used to traverse all input boxes of the network configuration data and find the password input box whose input type is password input;
[0033] An element locating module is used to locate the block element of the password input box from the network configuration information and read the description information except the password from the block element;
[0034] The function acquisition module is used to find the function associated with the click event in the block element and obtain the request address, request type and request parameters of the function.
[0035] In a third aspect, a terminal is provided, including:
[0036] processor, memory, wherein:
[0037] The memory is used to store computer programs.
[0038] The processor is used to call and run the computer program from the memory, so that the terminal executes the above-mentioned terminal method.
[0039] According to a fourth aspect, a computer storage medium is provided, wherein the computer-readable storage medium stores instructions, and when the instructions are executed on a computer, the computer executes the methods described in the above aspects.
[0040] The beneficial effect of the present invention is that the password security configuration test method, system, terminal and storage medium provided by the present invention can automatically obtain and construct password-related http request interface data to send request requests after obtaining the front-end and back-end account information of the test system, thereby improving the efficiency of manually organizing http request interface information and identifying test scenarios.
[0041] In addition, the invention has a reliable design principle, a simple structure and a very broad application prospect. BRIEF DESCRIPTION OF THE DRAWINGS
[0042] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0043] Figure 1 is a schematic flow chart of a method according to an embodiment of the present invention.
[0044] Figure 2 is another schematic flow chart of a method according to an embodiment of the present invention.
[0045] Figure 3 A schematic flow chart of a password complexity test of a method according to an embodiment of the present invention
[0046] Figure 4 The figure is a schematic flow chart of a maximum password length test of a method according to an embodiment of the present invention.
[0047] Figure 5 The figure is a schematic flow chart of a password minimum length test of a method according to an embodiment of the present invention.
[0048] Figure 6 A schematic flowchart of response information processing of a method according to an embodiment of the present invention.
[0049] Figure 7 is a schematic block diagram of a system according to an embodiment of the present invention.
[0050] Figure 8 A schematic diagram of the structure of a terminal provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0051] In order to enable those skilled in the art to better understand the technical solutions in the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.
[0052] Figure 1 is a schematic flow chart of a method according to an embodiment of the present invention. Figure 1 The execution entity may configure a test system for a cryptographically secure configuration.
[0053] like Figure 1 As shown, the method includes:
[0054] Step 110, obtaining backend network configuration information and frontend webpage network configuration data;
[0055] Step 120, locating the block elements of all password input boxes according to the network configuration information and the network configuration data, and reading the description information and the operation-related function information from the block elements;
[0056] Step 130, randomly generating multiple passwords, and constructing the multiple passwords into multiple requests sent to the server according to the description information and the operation-related function information;
[0057] Step 140, record the request response information returned by the server, and generate a test result according to the request response information.
[0058] To facilitate understanding of the present invention, the password security configuration testing method provided by the present invention is further described below based on the principle of the password security configuration testing method of the present invention and in combination with the process of managing the password security configuration testing in the embodiment.
[0059] For details, please refer to Figure 2 , the password security configuration testing method includes:
[0060] S1. Obtain backend network configuration information and frontend web page network configuration data.
[0061] On the system backend, traverse all page source HTML files to obtain HTML file information, crawl the web page HTML data on the frontend, traverse the input boxes in the HTML data, and match type:password to the password-related area.
[0062] S2. Locate the block elements of all password input boxes according to the network configuration information and the network configuration data, and read the description information and the operation-related function information from the block elements.
[0063] Locate the div block element where the password input box is located, and read the types / descriptions of other input boxes except the password in the div block element, such as username, email, phone number, etc.; find click buttons in the div block element, such as login, confirm, modify, reset, etc., read the associated JavaScript function through the onclick event corresponding to the button, and read the requested URL, request method type and request parameter name through the function.
[0064] S3. Generate multiple passwords randomly, and construct the multiple passwords into multiple requests sent to the server according to the description information and the operation-related function information.
[0065] Generate a test password according to the password generation rules, and construct parameter data according to the URL, request method, parameter name, and parameter description obtained in the above steps; enter the various types of passwords configured for test password security in the input box of type password. Use the Python development language request method to construct a request for each value and send it to the server to obtain a response.
[0066] Passwords that meet the password security configuration may also have security risks. Common common weak passwords include: simple number combinations, sequential character combinations, adjacent character combinations, etc. Store digital forward / reverse order combinations, letter uppercase and lowercase forward / reverse order combinations, keyboard adjacent number and letter forward / reverse order combinations, intercept the combination fragments respectively, and confuse the uppercase and lowercase letters, assemble them into a test password that meets the interface password length requirements for interface testing, and record the test data and response success results each time. If there are no problems with the routine record for 500 times, it is judged that this interface can protect common weak passwords. In the embodiment of the present invention, the password generation rules include test password complexity rules, test password maximum length rules and test password minimum length rules.
[0067] The process of generating a password according to the test password complexity rules is as follows Figure 3 As shown, including pure numbers, two-by-two combinations, and three-by-three combinations, the complexity requirements are tested in turn:
[0068] Randomly generate 8-bit characters from pure numbers, pure uppercase letters, pure lowercase letters, and special symbols as passwords to test whether the interface request is successful: if successful, interrupt the test and output the password complexity requirement test result; if unsuccessful, randomly generate 8-bit characters from pure numbers, pure uppercase letters, pure lowercase letters, and special symbols in pairs as passwords for testing, and continue to determine whether the test is successful: if successful, interrupt the test and output the password complexity requirement test result; if unsuccessful, randomly generate 8-bit characters from every three combinations of pure numbers, pure uppercase letters, pure lowercase letters, and special symbols as passwords for testing. Continue to determine whether the test is successful: if successful, interrupt the test and output the password complexity requirement test result; if unsuccessful, randomly combine four types of characters, pure numbers, pure uppercase letters, pure lowercase letters, and special symbols to generate 8-bit characters as passwords for testing.
[0069] The maximum password length test process is as follows Figure 4 As shown, including:
[0070] A password that meets the complexity requirements is randomly generated, and the length is truncated to 8 bits. Whether the interface request is successful: If so, the password length is doubled and tested again (if 16 bits pass the test, the password length is expanded to 32 bits until the response fails). If the response fails, take the median (1.5n) between the length before expansion (n) and the length after expansion by 2 times (2n), and set the password length to the median at this time to determine whether the interface request is successful. If successful, take the median between the maximum length and the median at this time; if unsuccessful, take the median between the minimum length and the median at this time; determine whether the median differs from the minimum / maximum value at this time by 1: if not, set the median as the current password length and obtain the response information, and repeat the previous length update operation until the judgment is successful; if so, take the median between the maximum length and the median at this time, and determine whether the interface request is successful: if so, the maximum password length of the interface is limited to the median at this time, if not, the maximum password length of the interface is limited to the minimum value at this time.
[0071] Test the minimum password length Figure 5 As shown, including:
[0072] A randomly generated password that meets the complexity requirements is truncated to 8 bits. It is determined whether the interface request under the password is successful. If so, the password length is reduced by 2 times, and it is determined whether the length is 1 at this time. If it is 1, the password length is set to empty and the request response is obtained. If the response information is a successful request, the minimum password length limit of this interface is 0, otherwise the minimum password length limit of this interface is 1. If the password length is not 1 after being reduced by 2 times, the request response of the password is obtained. If the response is still successful, the password length is reduced by 2 times again. If the password response of the current length fails, take the median (1.5n) between the length before reduction (2n) and the length after reduction by 2 times (n), set the password length to the median at this time and determine whether the interface request is successful: if successful, take the median between the minimum length and the median at this time; if failed, take the median between the maximum length and the median at this time; determine whether the current median differs from the minimum / maximum value at this time by 1: if not, set the median as the current password length and obtain the response information, repeat the previous length update operation until the judgment is successful; if so, take the median between the maximum length and the median at this time and determine whether the interface request is successful: if successful, the interface minimum password length limit is the median at this time; if failed, the interface minimum password length limit is the maximum value at this time.
[0073] S4. Record the request response information returned by the server, and generate test results based on the request response information.
[0074] Finally, all the password interface data obtained automatically, as well as the password complexity requirement test results, length range test results, and common weak password protection test results corresponding to each interface are summarized to generate the password security configuration of this system.
[0075] Response information processing method such as Figure 6 As shown, including:
[0076] Build the password security configuration of the request test interface, obtain all responses of the system after the request is sent, filter out interference responses that are different from the request type post / put, and obtain the HTTP status code and response content (json / text / html, etc.). Extract the response content from it. If the response content contains a password, add a security reminder to the test result. If the response content contains specific password requirements, explain it in the test result. Determine whether the HTTP status code is a 2xx series. If not, it is determined that the request is abnormal and the test result is fed back. If so, determine whether the response content contains an error / Error information prompt: if so, it is determined that the request failed and the test result is fed back; otherwise, it is determined that the request was successful and the test result is fed back.
[0077] like Figure 7 As shown, the system 700 includes:
[0078] Configuration parsing unit 710, used to obtain backend network configuration information and network configuration data of frontend webpage;
[0079] An element parsing unit 720, configured to locate the block elements of all password input boxes according to the network configuration information and the network configuration data, and read the description information and the operation-related function information from the block elements;
[0080] The password generating unit 730 is used to randomly generate multiple passwords, and construct the multiple passwords into multiple requests sent to the server according to the description information and the operation-related function information;
[0081] The response parsing unit 740 is used to record the request response information returned by the server and generate a test result according to the request response information.
[0082] Optionally, as an embodiment of the present invention, the configuration parsing unit includes:
[0083] The backend parsing module is used to traverse all page source code configuration files on the backend to obtain the backend network configuration information;
[0084] The front-end parsing module is used to crawl the network configuration data of the web page on the front-end.
[0085] Optionally, as an embodiment of the present invention, the element parsing unit includes:
[0086] The data traversal module is used to traverse all input boxes of the network configuration data and find the password input box whose input type is password input;
[0087] An element locating module is used to locate the block element of the password input box from the network configuration information and read the description information except the password from the block element;
[0088] The function acquisition module is used to find the function associated with the click event in the block element and obtain the request address, request type and request parameters of the function.
[0089] Figure 8 The present invention provides a schematic diagram of the structure of a terminal 800 provided in an embodiment of the present invention. The terminal 800 can be used to execute the password security configuration test method provided in an embodiment of the present invention.
[0090] The terminal 800 may include: a processor 810, a memory 820 and a communication unit 830. These components communicate via one or more buses. Those skilled in the art will appreciate that the server structure shown in the figure does not limit the present invention, and it may be a bus structure or a star structure, and may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently.
[0091] The memory 820 can be used to store the execution instructions of the processor 810. The memory 820 can be implemented by any type of volatile or non-volatile storage terminal or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk. When the execution instructions in the memory 820 are executed by the processor 810, the terminal 800 can perform some or all of the steps in the following method embodiments.
[0092] The processor 810 is the control center of the storage terminal, and uses various interfaces and lines to connect various parts of the entire electronic terminal. It executes various functions of the electronic terminal and / or processes data by running or executing software programs and / or modules stored in the memory 820, and calling data stored in the memory. The processor can be composed of an integrated circuit (IC), for example, it can be composed of a single packaged IC, or it can be composed of a plurality of packaged ICs with the same or different functions. For example, the processor 810 can include only a central processing unit (CPU). In an embodiment of the present invention, the CPU can be a single computing core or multiple computing cores.
[0093] The communication unit 830 is used to establish a communication channel so that the storage terminal can communicate with other terminals, receive user data sent by other terminals or send user data to other terminals.
[0094] The present invention also provides a computer storage medium, wherein the computer storage medium may store a program, and when the program is executed, the program may include some or all of the steps in each embodiment provided by the present invention. The storage medium may be a magnetic disk, an optical disk, a read-only memory (ROM) or a random access memory (RAM).
[0095] Therefore, after the present invention obtains the front-end and back-end account information of the test system, it can automatically obtain and construct password-related http request interface data to send a request, thereby improving the efficiency of manually organizing http request interface information and identifying test scenarios. The technical effects that can be achieved by this embodiment can be found in the description above and will not be repeated here.
[0096] Those skilled in the art can clearly understand that the technology in the embodiments of the present invention can be implemented by means of software plus a necessary general hardware platform. Based on this understanding, the technical solution in the embodiments of the present invention, in essence or in other words, the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a disk or an optical disk, and other media that can store program codes, including several instructions for enabling a computer terminal (which can be a personal computer, a server, or a second terminal, a network terminal, etc.) to perform all or part of the steps of the methods described in each embodiment of the present invention.
[0097] In this specification, the same or similar parts between the various embodiments can be referred to each other. In particular, for the terminal embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the description in the method embodiment.
[0098] In the several embodiments provided by the present invention, it should be understood that the disclosed systems and methods can be implemented in other ways. For example, the system embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of systems or units, which can be electrical, mechanical or other forms.
[0099] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0100] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
[0101] Although the present invention has been described in detail by referring to the accompanying drawings and in combination with the preferred embodiments, the present invention is not limited thereto. Without departing from the spirit and essence of the present invention, a person of ordinary skill in the art may make various equivalent modifications or substitutions to the embodiments of the present invention, and these modifications or substitutions shall be within the scope of the present invention. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed by the present invention, and all of these shall be within the scope of protection of the present invention. Therefore, the scope of protection of the present invention shall be subject to the scope of protection of the claims.
Claims
1. A password security configuration test method, characterized in that: include: Obtain back-end network configuration information and front-end web page network configuration data; Locate the block elements of all password input boxes according to the network configuration information and the network configuration data, and read the description information and the operation-related function information from the block elements; Generating multiple passwords randomly, and constructing the multiple passwords into multiple requests sent to the server according to the description information and the operation-related function information; Record the request response information returned by the server, and generate test results based on the request response information; Get the backend network configuration information and the frontend web page network configuration data, including: Traverse all page source HTML files on the system backend to obtain HTML file information, crawl the web page HTML data on the frontend, traverse the input boxes in the HTML data, and match type:password to the password-related area; Locate the block elements of all password input boxes according to the network configuration information and the network configuration data, and read the description information and the operation-related function information from the block elements, including: Locate the div block element where the password input box is located, and read the types and descriptions of other input boxes except the password in the div block element; find the click button in the div block element, the click buttons include login, confirm, modify, and reset, read the associated JavaScript function through the onclick event corresponding to the click button, and read the request URL, request method type, and request parameter name through the function; Methods for randomly generating multiple passwords include: Store the combination of numbers in order or reverse order, letters in order or reverse order, and numbers and letters adjacent to the keyboard in order or reverse order, respectively capture the combination fragments, confuse the upper and lower case letters, and assemble them into a test password that meets the interface password length requirements for interface testing, and record the test data and whether the response is successful each time; Randomly generate 8-bit characters from pure numbers, pure uppercase letters, pure lowercase letters, and special symbols as passwords for testing. Check whether the interface request is successful: if successful, interrupt the test and output the password complexity requirement test result; if unsuccessful, randomly generate 8-bit characters from pure numbers, pure uppercase letters, pure lowercase letters, and special symbols in pairs as passwords for testing. Continue to determine whether the test is successful: if successful, interrupt the test and output the password complexity requirement test result; if unsuccessful, randomly generate 8-bit characters from every three combinations of pure numbers, pure uppercase letters, pure lowercase letters, and special symbols as passwords for testing. Continue to determine whether the test is successful: if successful, interrupt the test and output the password complexity requirement test result; if unsuccessful, randomly combine four types of characters, pure numbers, pure uppercase letters, pure lowercase letters, and special symbols to generate 8-bit characters as passwords for testing. A password that meets the complexity requirements is randomly generated, and the length is truncated to 8 bits. Check whether the interface request is successful: if so, the password length is doubled and tested again. If 16 bits pass the test, the password length is further expanded to 32 bits until the response fails. If the response fails, the median 1.5n between the length n before expansion and the length 2n after 2 times expansion is taken, and the password length is set to the median at this time to determine whether the interface request is successful. If successful, the median between the maximum length and the median at this time is taken. If unsuccessful, the median between the minimum length and the median at this time is taken. Determine whether the median differs from the minimum or maximum value at this time by 1: if not, the median is set as the current password length and the response information is obtained, and the previous length update operation is repeated until the judgment is successful; if so, the median between the maximum length and the median at this time is taken, and determine whether the interface request is successful: if so, the maximum password length of the interface is limited to the median at this time, if not, the maximum password length of the interface is limited to the minimum value at this time; A randomly generated password that meets the complexity requirements is truncated to 8 bits. Determine whether the interface request under the password is successful. If so, reduce the password length by 2 times and determine whether the length is 1 at this time. If it is 1, set the password length to empty and obtain the request response. If the response information is a successful request, the minimum password length limit of this interface is 0, otherwise the minimum password length limit of this interface is 1; if the password length is not 1 after being reduced by 2 times, obtain the request response of the password. If the response is still successful, reduce the password length by 2 times again; if the password response of the current length fails, take the median 1.5n between the length before reduction 2n and the length after reduction 2 times, and convert it into The password length is set to the median at this time and it is determined whether the interface request is successful: if successful, the median between the minimum length and the median at this time is taken; if failed, the median between the maximum length and the median at this time is taken; determine whether the current median differs from the minimum or maximum value at this time by 1: if not, the median is set as the current password length and the response information is obtained, and the previous length update operation is repeated until the judgment is successful; if so, the median between the maximum length and the median at this time is taken and it is determined whether the interface request is successful: if successful, the interface minimum password length limit is the median at this time; if failed, the interface minimum password length limit is the maximum value at this time.
2. The method according to claim 1, characterized in that Record the request response information returned by the server, and generate test results based on the request response information, including: The password format requirement of the password input box is parsed according to the password type and the corresponding request response information, wherein the request response information includes prompts of request approval, request failure, and format error.
3. A password security configuration test system, characterized in that: include: Configuration parsing unit, used to obtain back-end network configuration information and network configuration data of front-end web pages; An element parsing unit, used to locate the block elements of all password input boxes according to the network configuration information and the network configuration data, and read the description information and the operation-related function information from the block elements; A password generation unit, used for randomly generating a plurality of passwords, and constructing the plurality of passwords into a plurality of requests sent to the server according to the description information and the operation-related function information; A response parsing unit is used to record the request response information returned by the server and generate test results based on the request response information; Get the backend network configuration information and the frontend web page network configuration data, including: Traverse all page source HTML files on the system backend to obtain HTML file information, crawl the web page HTML data on the frontend, traverse the input boxes in the HTML data, and match type:password to the password-related area; Locate the block elements of all password input boxes according to the network configuration information and the network configuration data, and read the description information and the operation-related function information from the block elements, including: Locate the div block element where the password input box is located, and read the types and descriptions of other input boxes except the password in the div block element; find the click button in the div block element, the click buttons include login, confirm, modify, and reset, read the associated JavaScript function through the onclick event corresponding to the click button, and read the request URL, request method type, and request parameter name through the function; Methods for randomly generating multiple passwords include: Store the combination of numbers in order or reverse order, letters in order or reverse order, and numbers and letters adjacent to the keyboard in order or reverse order, respectively capture the combination fragments, confuse the upper and lower case letters, and assemble them into a test password that meets the interface password length requirements for interface testing, and record the test data and whether the response is successful each time; Randomly generate 8-bit characters from pure numbers, pure uppercase letters, pure lowercase letters, and special symbols as passwords for testing. Check whether the interface request is successful: if successful, interrupt the test and output the password complexity requirement test result; if unsuccessful, randomly generate 8-bit characters from pure numbers, pure uppercase letters, pure lowercase letters, and special symbols in pairs as passwords for testing. Continue to determine whether the test is successful: if successful, interrupt the test and output the password complexity requirement test result; if unsuccessful, randomly generate 8-bit characters from every three combinations of pure numbers, pure uppercase letters, pure lowercase letters, and special symbols as passwords for testing. Continue to determine whether the test is successful: if successful, interrupt the test and output the password complexity requirement test result; if unsuccessful, randomly combine four types of characters, pure numbers, pure uppercase letters, pure lowercase letters, and special symbols to generate 8-bit characters as passwords for testing. A password that meets the complexity requirements is randomly generated, and the length is truncated to 8 bits. Check whether the interface request is successful: if so, the password length is doubled and tested again. If 16 bits pass the test, the password length is further expanded to 32 bits until the response fails. If the response fails, the median 1.5n between the length n before expansion and the length 2n after 2 times expansion is taken, and the password length is set to the median at this time to determine whether the interface request is successful. If successful, the median between the maximum length and the median at this time is taken. If unsuccessful, the median between the minimum length and the median at this time is taken. Determine whether the median differs from the minimum or maximum value at this time by 1: if not, the median is set as the current password length and the response information is obtained, and the previous length update operation is repeated until the judgment is successful; if so, the median between the maximum length and the median at this time is taken, and determine whether the interface request is successful: if so, the maximum password length of the interface is limited to the median at this time, if not, the maximum password length of the interface is limited to the minimum value at this time; A randomly generated password that meets the complexity requirements is truncated to 8 bits. Determine whether the interface request under the password is successful. If so, reduce the password length by 2 times and determine whether the length is 1 at this time. If it is 1, set the password length to empty and obtain the request response. If the response information is a successful request, the minimum password length limit of this interface is 0, otherwise the minimum password length limit of this interface is 1; if the password length is not 1 after being reduced by 2 times, obtain the request response of the password. If the response is still successful, reduce the password length by 2 times again; if the password response of the current length fails, take the median 1.5n between the length before reduction 2n and the length after reduction 2 times, and convert it into The password length is set to the median at this time and it is determined whether the interface request is successful: if successful, the median between the minimum length and the median at this time is taken; if failed, the median between the maximum length and the median at this time is taken; determine whether the current median differs from the minimum or maximum value at this time by 1: if not, the median is set as the current password length and the response information is obtained, and the previous length update operation is repeated until the judgment is successful; if so, the median between the maximum length and the median at this time is taken and it is determined whether the interface request is successful: if successful, the interface minimum password length limit is the median at this time; if failed, the interface minimum password length limit is the maximum value at this time.
4. A terminal, characterized in that: include: processor; A memory for storing execution instructions of the processor; The processor is configured to execute the method according to any one of claims 1 to 2.
5. A computer-readable storage medium storing a computer program, characterized in that: When the program is executed by a processor, the method according to any one of claims 1 to 2 is implemented.
