Summary of the invention
To solve the above problems, the purpose of the present invention is to provide the test method of a kind of server and client and being
System, user end to server send creation proxy requests;Server is according to the proxy requests received, by generating respective file
And this document is transmitted to specified machine, create proxy server;Proxy server information is sent to client by server, wherein
Proxy server information includes the IP address and the unappropriated port numbers of the machine of proxy server operation machine;Client
According to proxy server information, communication target is modified, establishes and communicates to connect with proxy server;Client passes through proxy server
It establishes both-way communication with server to connect, the communication packet of both proxy server interceptions is parsed, and parsing data are sent
Subsequent analysis is carried out to user.
On the one hand technical solution used by the present invention solves the problems, such as it is: a kind of test side of server and client
Method characterized by comprising S100, user end to server send creation proxy requests;S200, server are according to receiving
Proxy requests create proxy server by generating respective file and transmitting this document to specified machine;S300, server
Proxy server information is sent to client, wherein proxy server information includes the IP address of proxy server operation machine
And the unappropriated port numbers of the machine;S400, client modify communication target, with agency according to proxy server information
Server establishes communication connection;S500, client are established both-way communication with server by proxy server and are connect, agency service
The communication packet of both device interceptions is parsed, and parsing data are sent to user and carry out subsequent analysis.
Further, the S100 includes: S101, user end to server acquisition decoder module, is opened according to decoder module
Put corresponding decoding interface;S102, decoding file is generated according to the decoder module of acquisition, and send together with creation proxy requests
To server.
Further, the S200 includes: S201, server according to the creation proxy requests received, predefined
In machine list, a machine is extracted;S201, coding file is imported into the machine of extraction, and predetermined with docker load
Adopted mirror image;Predefined mirror image after S301, start-up loading, obtains proxy server.
Further, the S300 includes: S301, proxy server inspection local port occupancy situation, chooses one not
Occupied port is as the communication port with client communication;S302, the IP address for obtaining proxy server operation machine, will
Communication port numbers and IP address return to client.
Further, the S400 includes: the communication port numbers and IP address that S401, client are returned according to server,
Change the communications setting of client;S402, modification client connection IP and port be server return communication port numbers with
IP address, and start client, carry out conventional client operation.
Further, the S500 includes: that the communication packet of generation is sent to proxy server by S501, client, is acted on behalf of
Communication packet is transmitted to server by server, and communication packet is parsed by decoding interface, obtains binary data, and in plain text
Mode returns to user.
On the other hand technical solution used by the present invention solves the problems, such as it is: a kind of test system of server and client
System characterized by comprising client, for establishing the routine operation service for communicating to connect and executing client with server;
Server for establishing communication connection with client and providing corresponding with service, while calling proxy modules to generate agency
Server;Proxy modules, for creating proxy server;Communication module, for executing client and server, client
The communication connection at end and proxy server and proxy server and client;Detection module, for obtaining proxy server letter
Breath, wherein proxy server information includes IP address and the unappropriated port of the machine of proxy server operation machine
Number;Decoder module, the communication packet for intercepting client and proxy server are parsed, and parsing data are sent to user
Carry out subsequent analysis.
Further, the server includes: interface administration module, for being connect according to the open corresponding decoding of decoder module
Mouthful;Generation module for generating decoding file according to the decoder module of acquisition, and is sent to service together with creation proxy requests
Device;List block, for recording the machine information that can be used as proxy server.
Further, the proxy modules include: import unit, the machine for importeding into extraction for encoding file
In;Mirror image loading unit, for loading predefined mirror image according to coding file;Start unit, for predetermined after start-up loading
Adopted mirror image completes the creation of proxy server.
Further, the client includes: inspection module, for checking local port occupancy situation, chooses one not
Occupied port is as the communication port with client communication;Communication setting module, for modify client connection IP and
Port is the communication port numbers and IP address that server returns.
The beneficial effects of the present invention are: for the user, completely disengaging using threshold, can be used whenever and wherever possible, no longer
Need the help of developer that a series of tool environment etc. is installed, for developing connector, it is no longer necessary to concerned about network library
It is how to realize transfer, it is only necessary to upload the packing and unpacking method realized by project rule, use can be greatly reduced
Threshold, cost accelerate the testing progress of project.
Specific embodiment
It is carried out below with reference to technical effect of the embodiment and attached drawing to design of the invention, specific structure and generation clear
Chu, complete description, to be completely understood by the purpose of the present invention, scheme and effect.
It should be noted that unless otherwise specified, when a certain feature referred to as " fixation ", " connection " are in another feature,
It can directly fix, be connected to another feature, and can also fix, be connected to another feature indirectly.In addition, this
The descriptions such as the upper and lower, left and right used in open are only the mutual alignment pass relative to each component part of the disclosure in attached drawing
For system.The "an" of used singular, " described " and "the" are also intended to including most forms in the disclosure, are removed
Non- context clearly expresses other meaning.In addition, unless otherwise defined, all technical and scientific terms used herein
It is identical as the normally understood meaning of those skilled in the art.Term used in the description is intended merely to describe herein
Specific embodiment is not intended to be limiting of the invention.Term as used herein "and/or" includes one or more relevant
The arbitrary combination of listed item.
It will be appreciated that though various elements, but this may be described using term first, second, third, etc. in the disclosure
A little elements should not necessarily be limited by these terms.These terms are only used to for same type of element being distinguished from each other out.For example, not departing from
In the case where disclosure range, first element can also be referred to as second element, and similarly, second element can also be referred to as
One element.The use of provided in this article any and all example or exemplary language (" such as ", " such as ") is intended merely to more
Illustrate the embodiment of the present invention well, and unless the context requires otherwise, otherwise the scope of the present invention will not be applied and be limited.
It show the method flow schematic diagram of the preferred embodiment of the present invention referring to Fig.1,
It include: S100, user end to server transmission creation proxy requests;S200, server are according to the agency received
Request creates proxy server by generating respective file and transmitting this document to specified machine;S300, server will be acted on behalf of
Server info is sent to client, and wherein proxy server information includes the IP address of proxy server operation machine and is somebody's turn to do
The unappropriated port numbers of machine;S400, client modify communication target, with proxy server according to proxy server information
Establish communication connection;S500, client are established both-way communication with server by proxy server and are connect, proxy server interception
The communication packet of the two is parsed, and parsing data are sent to user and carry out subsequent analysis.
Further, the S100 includes: S101, user end to server acquisition decoder module, is opened according to decoder module
Put corresponding decoding interface;S102, decoding file is generated according to the decoder module of acquisition, and send together with creation proxy requests
To server.
S200 includes: S201, server according to the creation proxy requests received, in predefined machine list, is taken out
Take a machine;S201, coding file is imported into the machine of extraction, and predefined mirror image is loaded with docker;S301, it opens
Predefined mirror image after dynamic load, obtains proxy server.
S300 includes: S301, proxy server inspection local port occupancy situation, chooses a unappropriated port and makees
For the communication port with client communication;S302, the IP address for obtaining proxy server operation machine, by communication port numbers and IP
Address returns to client.
S400 includes: the communication port numbers and IP address that S401, client are returned according to server, changes the logical of client
Letter setting;S402, the connection IP of modification client and port are the communication port numbers and IP address that server returns, and start visitor
Family end carries out conventional client operation.
S500 includes: that the communication packet of generation is sent to proxy server by S501, client, and proxy server will communication packet
It is transmitted to server, and communication packet is parsed by decoding interface, obtains binary data, and use is returned to clear-text way
Family.
The system structure diagram of the preferred embodiment of the present invention is shown referring to Fig. 2,
It include: client, for establishing the routine operation service for communicating to connect and executing client with server;Service
Device for establishing communication connection with client and providing corresponding with service, while calling proxy modules to generate agency service
Device;Proxy modules, for creating proxy server;Communication module, for execute client and server, client with
The communication connection of proxy server and proxy server and client;Detection module, for obtaining proxy server information,
Middle proxy server information includes the IP address and the unappropriated port numbers of the machine of proxy server operation machine;Decoding
Module, the communication packet for intercepting client and proxy server are parsed, and will parsing data be sent to user carry out after
Continuous analysis.
Server includes: interface administration module, for according to the open corresponding decoding interface of decoder module;Generation module,
For generating decoding file according to the decoder module of acquisition, and server is sent to together with creation proxy requests;List block,
For recording the machine information that can be used as proxy server.
Proxy modules include: import unit, are imported into the machine of extraction for encoding file;Mirror image load is single
Member, for loading predefined mirror image according to coding file;Start unit completes generation for the predefined mirror image after start-up loading
Manage the creation of server.
Stating client includes: inspection module, for checking local port occupancy situation, chooses a unappropriated port
As the communication port with client communication;Communication setting module, connection IP and port for modifying client are server
The communication port numbers and IP address of return.
Techniqueflow is as follows:
Step 1: client is by realizing decoder interface, then from server-side there downloading decoder.py template
Decoder.py file is uploaded, the request (submitting button) of a creation agency is initiated to server-side.
Step 2: can randomly select a machine after server-side receives request in predefined machine list, be passed to
Then decoder.py file loads predefined mirror image with docker, (each to act on behalf of tool in order to guarantee under same machine
Environment is independent);Obtain the port that uses of the machine end at random, after start-up loading mirror image, general broker program then opens automatically
It is dynamic to finish, the port that end uses finally is got the ip for the machine being drawn into and at random returns to client.
Step 3: at this moment, setting game server IP and end that user is carried by the game client itself in mobile phone
Mouthful function or connection IP and port to modify game client outside satchel, in a manner of VPN etc., modification carry out the IP that second step returns
And random port carries out normal feature operation subsequently into game, if role is mobile, opens knapsack etc..
Step 4: because user modification after game server IP and port, client no longer directly with former game
Server-side is communicated, but client first passes through and acts on behalf of game server communication, and proxy server receives the logical of client
After news packet, it is forwarded on real game server that (similarly, proxy server receives the communication packet of game server, wraparound hair
Onto game client), so all data packets of game client can be all sent to when carrying out normal game feature operation
Server-side acts on behalf of tool with what docker was run, and all binary numbers can be decoded by acting on behalf of tool by decoder interface
According to returning to user (webpage) in a manner of plaintext json.
Step 5: user by operation game client, checks that the real time information of webpage refreshes, so that it may recognize each
The agreement prototype and data of function.
Step 6: finally, project team or exploitation by sharing the decoder.py file realized, allow the user for having demand
The details of Game Protocol can be very easily viewed, and for the decoded security consideration of decoder, user can be preparatory
Registered project (uploads decoder.py file), and selection detailed programs agency is only needed for other users, can use, cast aside
Decoder.py be how the risk to binary data solution at json clear data.
A specific implementation explanation is lifted,
The test development personnel of QQ driving game, I thinks quickly to check feature operation of the QQ driving at me (as opened back
Packet, request purchase article carry out QQ driving matching game etc.) game interaction agreement what is specifically
Step 1: since I is the test development of QQ driving game, so I can very easily obtain from project team there
The decipherment algorithm of Game Protocol is got, otherwise oneself is just needed and crack by some breaking techniques the algorithm of Game Protocol.
Step 2: then filling the decipherment algorithm to project Game Protocol by downloading decoder.py template, specifically showing
Example can refer to the example in decoder.py, then create the game of QQ driving by webpage, decoder.py file be submitted, in net
The game of QQ driving is selected in page, clicks starting monitoring, Agent IP and port at this moment can be seen in webpage.
Step 3: game client, by VPN or satchel external square type, modification game connects IP and port, is modified as two steps
The Agent IP and port that backing wire page is seen, then click to enter game, carry out opening knapsack, request shopping product, carry out QQ driving
A series of feature operations such as matching.
Step 4: this when, through webpage it can be seen that during your (user) operation, the detailed interaction of game
The supplemental characteristic of agreement and specific every agreement.
Step 5: certainly, you can also use for other testers, make in this way in such a way that sharing web page links
Pass through operating function with tester, it can see the protocol interaction detailed data of client and server, and can save sudden and violent
Reveal the safety issue of agreement decipherment algorithm.
It should be appreciated that the embodiment of the present invention can be by computer hardware, the combination of hardware and software or by depositing
The computer instruction in non-transitory computer-readable memory is stored up to be effected or carried out.Standard volume can be used in the method
Journey technology-includes that the non-transitory computer-readable storage media configured with computer program is realized in computer program,
In configured in this way storage medium computer is operated in a manner of specific and is predefined --- according in a particular embodiment
The method and attached drawing of description.Each program can with the programming language of level process or object-oriented come realize with department of computer science
System communication.However, if desired, the program can be realized with compilation or machine language.Under any circumstance, which can be volume
The language translated or explained.In addition, the program can be run on the specific integrated circuit of programming for this purpose.
In addition, the operation of process described herein can be performed in any suitable order, unless herein in addition instruction or
Otherwise significantly with contradicted by context.Process described herein (or modification and/or combination thereof) can be held being configured with
It executes, and is can be used as jointly on the one or more processors under the control of one or more computer systems of row instruction
The code (for example, executable instruction, one or more computer program or one or more application) of execution, by hardware or its group
It closes to realize.The computer program includes the multiple instruction that can be performed by one or more processors.
Further, the method can be realized in being operably coupled to suitable any kind of computing platform, wrap
Include but be not limited to PC, mini-computer, main frame, work station, network or distributed computing environment, individual or integrated
Computer platform or communicated with charged particle tool or other imaging devices etc..Each aspect of the present invention can be to deposit
The machine readable code on non-transitory storage medium or equipment is stored up to realize no matter be moveable or be integrated to calculating
Platform, such as hard disk, optical reading and/or write-in storage medium, RAM, ROM, so that it can be read by programmable calculator, when
Storage medium or equipment can be used for configuration and operation computer to execute process described herein when being read by computer.This
Outside, machine readable code, or part thereof can be transmitted by wired or wireless network.When such media include combining microprocessor
Or other data processors realize steps described above instruction or program when, invention as described herein including these and other not
The non-transitory computer-readable storage media of same type.When methods and techniques according to the present invention programming, the present invention
It further include computer itself.
Computer program can be applied to input data to execute function as described herein, to convert input data with life
At storing to the output data of nonvolatile memory.Output information can also be applied to one or more output equipments as shown
Device.In the preferred embodiment of the invention, the data of conversion indicate physics and tangible object, including the object generated on display
Reason and the particular visual of physical objects are described.
The above, only presently preferred embodiments of the present invention, the invention is not limited to above embodiment, as long as
It reaches technical effect of the invention with identical means, all within the spirits and principles of the present invention, any modification for being made,
Equivalent replacement, improvement etc., should be included within the scope of the present invention.Its technical solution within the scope of the present invention
And/or embodiment can have a variety of different modifications and variations.