CN113315833B - File transfer mode processing method and device - Google Patents

File transfer mode processing method and device Download PDF

Info

Publication number
CN113315833B
CN113315833B CN202110580892.7A CN202110580892A CN113315833B CN 113315833 B CN113315833 B CN 113315833B CN 202110580892 A CN202110580892 A CN 202110580892A CN 113315833 B CN113315833 B CN 113315833B
Authority
CN
China
Prior art keywords
mode
response information
file transmission
ftp server
client
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202110580892.7A
Other languages
Chinese (zh)
Other versions
CN113315833A (en
Inventor
赵福仁
徐超
刘中砥
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Skyguard Network Security Technology Co ltd
Original Assignee
Beijing Skyguard Network Security Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Skyguard Network Security Technology Co ltd filed Critical Beijing Skyguard Network Security Technology Co ltd
Priority to CN202110580892.7A priority Critical patent/CN113315833B/en
Publication of CN113315833A publication Critical patent/CN113315833A/en
Application granted granted Critical
Publication of CN113315833B publication Critical patent/CN113315833B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/06Protocols specially adapted for file transfer, e.g. file transfer protocol [FTP]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/08Configuration management of networks or network elements
    • H04L41/0803Configuration setting
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/14Session management
    • H04L67/141Setup of application sessions

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Information Transfer Between Computers (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention discloses a file transfer mode processing method and device, and relates to the technical field of computers. One embodiment of the method comprises: identifying a port number included in a file transmission configuration page displayed by a client, and enabling the client to establish connection with a port corresponding to the port number; monitoring whether the client receives response information sent by the FTP server within a set time period; and processing the file transmission mode included by the file transmission configuration page according to the monitoring result. This embodiment enables an automated profile transfer mode.

Description

File transfer mode processing method and device
Technical Field
The present invention relates to the field of computer technologies, and in particular, to a method and an apparatus for processing a file transfer mode.
Background
The File Transfer Protocol (FTP) is a set of common standard protocols for File Transfer over a network. It can be used for file transmission between FTP server and FTP client (hereinafter referred to as client).
FTP-based file transfer generally requires client and FTP server protocol file transfer modes such as implicit encryption mode, explicit encryption mode, clear text mode, concurrent explicit encryption and clear text mode, etc. Each file transfer mode has a corresponding file transfer port, and at present, the file transfer mode is mainly identified by a default port number of the file transfer port (for example, the implicit encryption mode port number is 990, and the default port number of the explicit encryption mode or the plaintext mode is 21), for example, a client connected to the port with the port number of 990 can be directly configured as an implicit encryption mode terminal, and the like.
However, for the FTP server or the FTP proxy server built by the enterprise itself, the port numbers of the connection ports with the client terminal can be arbitrarily set by the enterprise itself, such as the port numbers 8899, 8888, etc., without default port numbers. Therefore, the client cannot judge whether the encryption mode is an explicit encryption mode or an implicit encryption mode or the like through the port number, and the file transmission mode can be selected only by manual trial and error, so that the configuration of the file transmission mode of the client cannot be automatically completed.
Disclosure of Invention
In view of this, embodiments of the present invention provide a method and an apparatus for processing a file transfer mode, which can implement an automatic configuration of a file transfer mode.
In order to achieve the above object, according to an aspect of an embodiment of the present invention, there is provided a file transfer mode processing method, including:
identifying a port number included in a file transfer configuration page displayed by a client, so that the client establishes connection with a port corresponding to the port number;
monitoring whether the client receives response information sent by an FTP server or not within a set time period;
and processing the file transmission mode included by the file transmission configuration page according to the monitoring result.
Preferably, the first and second electrodes are formed of a metal,
aiming at the condition that the monitoring result indicates that the client does not receive the response information sent by the FTP server,
the processing the file transmission mode included in the file transmission configuration page includes:
determining that the file transmission mode is an implicit encryption mode;
and configuring the implicit encryption mode on the file transmission configuration page.
Preferably, the first and second electrodes are formed of a metal,
aiming at the condition that the monitoring result indicates that the client receives the response information sent by the FTP server,
the file transfer mode processing method further comprises: judging whether the response information comprises a first specific field indicating success, if so, sending an auth command to the FTP server through the port;
receiving second response information returned by the FTP server aiming at the auth command, and analyzing the second response information;
the processing of the file transmission mode included in the file transmission configuration page includes:
determining the file transmission mode to be an explicit encryption mode or a plaintext mode according to the analysis result;
and configuring the explicit encryption mode or the plaintext mode in the file transmission configuration page.
Preferably, the determining that the file transmission mode is an explicit encryption mode or a plaintext mode includes:
determining that the file transmission mode is an explicit encryption mode if the parsed result indicates that the second response information includes a second specific field;
and if the analyzed result indicates that the second response information comprises a third specific field, determining that the file transmission mode is a plaintext mode.
Preferably, the processing the file transmission mode included in the file transmission configuration page includes:
and providing and displaying prompt information for indicating an implicit encryption mode or an explicit encryption mode or a plaintext mode so that a user inputs a file transmission mode matched with the prompt information in the file transmission configuration page.
Preferably, the first and second electrodes are formed of a metal,
and the set time period is not less than the time length of the round trip delay existing between the client and the FTP server.
In a second aspect, an embodiment of the present invention provides a file transfer mode processing apparatus, including: a port management unit, a monitoring unit, and a mode processing unit, wherein,
the port management unit is used for identifying a port number included in a file transmission configuration page displayed by a client, so that the client establishes connection with a port corresponding to the port number;
the monitoring unit is used for monitoring whether the client receives response information sent by the FTP server in a set time period;
and the mode processing unit is used for processing the file transmission mode included by the file transmission configuration page according to the monitoring result.
Preferably, the first and second electrodes are formed of a metal,
the mode processing unit is used for determining that the file transfer mode is an implicit encryption mode according to the condition that the monitoring result indicates that the client does not receive the response information sent by the FTP server; and configuring the implicit encryption mode on the file transmission configuration page.
Preferably, the first and second electrodes are formed of a metal,
the mode processing unit is further configured to, in response to a situation that the monitoring result indicates that the client receives response information sent by the FTP server, determine whether the response information includes a first specific field indicating success, and if so, send an auth command to the FTP server through the port; receiving second response information returned by the FTP server aiming at the auth command, and analyzing the second response information; determining the file transmission mode to be an explicit encryption mode or a plaintext mode according to the analysis result; and configuring the explicit encryption mode or the plaintext mode in the file transmission configuration page.
One embodiment of the above invention has the following advantages or benefits: the method comprises the steps that connection is established through a port corresponding to a port number, whether a client receives response information sent by an FTP server or not is monitored, the interaction condition between the client and the FTP server through the port can be monitored, a file transmission mode such as an implicit encryption mode, an explicit encryption mode or a plaintext mode can be identified according to a monitoring result, the file transmission mode included in a file transmission configuration page can be processed according to the identified file transmission mode such as the implicit encryption mode, the explicit encryption mode or the plaintext mode, the file transmission mode can be obtained in the whole process without manual trial and error, and therefore the automatic configuration file transmission mode is achieved.
Further effects of the above-mentioned non-conventional alternatives will be described below in connection with the embodiments.
Drawings
The drawings are included to provide a better understanding of the invention and are not to be construed as unduly limiting the invention. Wherein:
fig. 1 is a schematic view of a main flow of a file transfer mode processing method according to an embodiment of the present invention;
fig. 2 is a schematic view of a main flow of a file transfer mode processing method according to an embodiment of the present invention;
FIG. 3 is a diagram illustrating a configuration page structure for a file transfer mode according to an embodiment of the present invention;
FIG. 4 is a schematic diagram of the main units of a file transfer mode processing apparatus according to an embodiment of the present invention;
FIG. 5 is an exemplary system architecture diagram in which embodiments of the present invention may be employed;
FIG. 6 is a block diagram of a computer system suitable for use with a terminal device implementing an embodiment of the invention.
Detailed Description
Exemplary embodiments of the present invention are described below with reference to the accompanying drawings, in which various details of embodiments of the invention are included to assist understanding, and which are to be considered as merely exemplary. Accordingly, those of ordinary skill in the art will recognize that various changes and modifications of the embodiments described herein can be made without departing from the scope and spirit of the invention. Also, descriptions of well-known functions and constructions are omitted in the following description for clarity and conciseness.
There are three encryption modes of the File Transfer Protocol (FTP): explicit encryption mode, implicit encryption mode, and clear text mode. Under the existing port naming specifications, the clear text mode by default requires listening for the connection of the command channel at the port of port number 21. Explicit encryption mode requires by default that the port at port number 21 listens for a connection to the command channel, and implicit encryption requires listening for a connection to the command channel at the port at port number 990. Under the existing port naming specification, a user can distinguish which port is in an explicit encryption mode or a plaintext mode and which port is in an implicit encryption mode through a port number.
In the plaintext mode, FTP transmission does not need to establish an encrypted channel on a tcp channel, and in this case, the FTP server returns response information beginning with 2, such as 220 or 2xx, after establishing tcp handshake with the client.
The implicit encryption mode is that after tcp connection is established, tls encryption channel is established first, and then the FTP server returns response information beginning with 2, such as 220 or 2 xx.
The explicit encryption mode is that after tcp connection is established, the FTP server returns response information beginning with 2, and then the client negotiates the encryption mode used by the FTP server through an auth command. The FTP server returns response information beginning with 2 such as 234 or 2xx if it supports the client request (e.g., the request includes explicit encryption mode or plaintext mode) and starts to prepare encrypted channels. If the FTP server does not support the request, reject information beginning with 5 is returned for the client, such as 500 or 5 xx.
However, an FTP server built by a person or an enterprise can set an arbitrary port number by itself for the security of access without using a default port number, so that a user cannot judge whether the FTP server is in an explicit encryption mode, a plaintext mode or an implicit encryption mode through the port number, and can know the FTP server mainly through manual trial and error at present. It is difficult for the client to configure the encryption mode according to the port number when using the non-default port numbers (21 and 990).
Based on the difference of response information of the FTP server for different file transfer modes (an explicit encryption mode, a plaintext mode and an implicit encryption mode), the embodiment of the invention provides a mode capable of automatically identifying the file transfer mode, so that the file transfer mode of the client is automatically processed, and manual trial and error are avoided.
Fig. 1 is a file transfer mode processing method according to an embodiment of the present invention, and as shown in fig. 1, the file transfer mode processing method may include the following steps:
step S101: identifying a port number included in a file transmission configuration page displayed by a client, so that the client establishes connection with a port corresponding to the port number;
the port is configured for the FTP server by a user, and a corresponding port number can be set according to the requirement of the user so as to ensure the concealment and the safety of the port.
In this step, in order to be able to establish a connection between the client and the port corresponding to the port number, the IP address can be recognized in addition to the port number.
Step S102: monitoring whether the client receives response information sent by the FTP server within a set time period;
the FTP server is used for carrying out file transmission with the client through a file transmission protocol.
If the port needs the implicit encryption mode, a file transfer channel of the implicit encryption mode needs to be specially established, the FTP server does not send response information, except the implicit encryption mode, the FTP server sends response information, and whether the port is in the implicit encryption mode can be distinguished through the response information.
In this step, the set time period is not less than the duration of the round trip delay existing between the client and the FTP server. The long wait can be avoided and the loop can be prevented from entering the dead loop. In addition, the set time period is not less than the time length of the round trip delay existing between the client and the FTP server, so that misjudgment caused by too short time can be effectively avoided.
Step S103: and processing the file transmission mode included by the file transmission configuration page according to the monitoring result.
In the embodiment shown in fig. 1, a connection is established through a port corresponding to a port number, whether a client receives response information sent by an FTP server is monitored, that is, an interaction situation between the client and the FTP server through the port can be monitored, a file transfer mode such as an implicit encryption mode, an explicit encryption mode or a plaintext mode can be identified according to a monitoring result, a file transfer mode included in a file transfer configuration page can be processed according to the identified file transfer mode such as the implicit encryption mode, the explicit encryption mode or the plaintext mode, the file transfer mode can be obtained without manual trial and error in the whole process, and thus, the automatic configuration file transfer mode is realized.
In the embodiment of the invention, different processing can be performed on the file transmission mode according to different information indicated by the monitoring result.
The specific implementation manner of processing the file transfer mode included in the file transfer configuration page may include, in response to a monitoring result indicating that the client does not receive the response information sent by the FTP server: determining that a file transmission mode is an implicit encryption mode; and configuring an implicit encryption mode in a file transfer configuration page.
As for the situation that the monitoring result indicates that the client receives the response information sent by the FTP server, as shown in fig. 2, the processing of the file transfer mode may specifically include the following steps:
step S201: judging whether the response information comprises a first specific field indicating success, if so, executing the step S202; otherwise, go to step S206;
the first specific field indicating success can be set accordingly at the FTP server according to user requirements, such as fields beginning with 2 such as 220,200, etc. It is stated that the interface may perform file transfer via either explicit encryption mode or plaintext encryption mode.
Step S202: sending an auth command to the FTP server through the port;
the auth command is either an auth tls command or an auth ssl command because explicit encryption requires that the encryption mode (ssl/tls) be negotiated first. If the FTP server returns second response information for auth tls or auth ssl.
Step S203: receiving second response information returned by the FTP server aiming at the auth command, and analyzing the second response information;
the process of parsing the second response message is mainly to obtain specific fields, such as fields beginning with 2, e.g., 234, and fields beginning with 5, e.g., 500, 5x, and the like.
Step S204: determining that the file transmission mode is an explicit encryption mode or a plaintext mode according to the analysis result;
in this step, if the result of the parsing indicates that the second response information includes the second specific field, it is determined that the file transmission mode is the explicit encryption mode or the plaintext mode; and if the parsed result indicates that the second response information includes the third specific field, determining that the file transmission mode is a plain text mode.
For example, if the second specific field is a field starting with 2, such as 234, the file transfer mode is the explicit encryption mode or the plaintext mode, and the third specific field is a field starting with 5, such as 500, the file transfer mode is determined to be the plaintext mode.
If the result of the analysis indicates that the second response information includes the second specific field, the file can be transmitted by displaying the encryption mode, and if the transmission is successful, the file transmission mode is determined to be the explicit encryption mode; and if the transmission fails, determining that the file transmission mode is a plaintext mode.
Step S205: configuring an explicit encryption mode or a plaintext mode on a file transmission configuration page, and ending the current process;
the structure of the file transfer configuration page can be shown in fig. 3, and it can be seen from fig. 3 that the structure of the file transfer configuration page mainly includes: the protocol type, the host address (host in fig. 3), the port number, the file transmission mode and the like can be automatically filled through interaction between the client and the server, so that manual trial and error are avoided.
Step S206: and prompting a communication error.
In this embodiment of the present invention, when it is determined that the file transmission mode is an implicit encryption mode, an explicit encryption mode, or a plaintext mode in the process of processing the file transmission mode included in the file transmission configuration page, the processing the file transmission mode included in the file transmission configuration page may further include: prompt information indicating an implicit encryption mode or an explicit encryption mode or a plaintext mode is provided and displayed so that a user inputs a file transfer mode matching the prompt information at a file transfer configuration page. The process further realizes the automatic identification of the file transmission mode.
As shown in fig. 4, an embodiment of the present invention provides a file transfer mode processing apparatus 400, where the file transfer mode processing apparatus 400 includes: a port management unit 401, a monitoring unit 402, and a mode processing unit 403, wherein,
a port management unit 401, configured to identify a port number included in a file transfer configuration page displayed by a client, so that the client establishes a connection with a port corresponding to the port number;
a monitoring unit 402, configured to monitor whether the client receives response information sent by the FTP server within a set time period;
a mode processing unit 403, configured to process, according to the monitoring result, a file transmission mode included in the file transmission configuration page.
In addition, the port management unit 401 can recognize an IP address in addition to the port number so as to establish a connection between the client and the port corresponding to the port number.
In this embodiment of the present invention, the mode processing unit 403 is further configured to determine that the file transfer mode is an implicit encryption mode, in response to a monitoring result indicating that the client does not receive a response message sent by the FTP server; and configuring the implicit encryption mode on a file transfer configuration page.
In this embodiment of the present invention, the mode processing unit 403 is further configured to, in response to a monitoring result indicating that the client receives a response message sent by the FTP server, determine whether the response message includes a first specific field indicating success, and if so, send an auth command to the FTP server through the port; receiving second response information returned by the FTP server aiming at the auth command, and analyzing the second response information; determining that the file transmission mode is an explicit encryption mode or a plaintext mode according to the analysis result; and configuring an explicit encryption mode or a plaintext mode in the file transmission configuration page.
In this embodiment of the present invention, the mode processing unit 403 is further configured to determine that the file transmission mode is an explicit encryption mode if the result of the parsing indicates that the second response information includes the second specific field; and if the parsed result indicates that the second response information includes the third specific field, determining that the file transmission mode is a plaintext mode.
In this embodiment of the present invention, the mode processing unit 403 is further configured to provide and display hint information indicating an implicit encryption mode, an explicit encryption mode, or a plaintext mode, so that a user inputs a file transmission mode matching the hint information on a file transmission configuration page.
In the embodiment of the invention, the set time period is not less than the time length of the round trip delay existing between the client and the FTP server.
Fig. 5 shows an exemplary system architecture 500 of a file transfer mode processing method or a file transfer mode processing apparatus to which an embodiment of the present invention can be applied.
As shown in fig. 5, the system architecture 500 may include terminal devices 501, 502, 503, a network 504, and a server 505. The network 504 serves to provide a medium for communication links between the terminal devices 501, 502, 503 and the server 505. Network 504 may include various connection types, such as wired, wireless communication links, or fiber optic cables, to name a few.
A user may use terminal devices 501, 502, 503 to interact with a server 505 over a network 504 to receive or send messages, etc. The terminal devices 501, 502, 503 can perform file transmission with the server through a file transmission protocol.
The terminal devices 501, 502, 503 may be various electronic devices having a display screen and supporting web browsing, including but not limited to smart phones, tablet computers, laptop portable computers, desktop computers, and the like.
The server 505 may be a server that provides various services, for example, storing a file transferred based on a file transfer protocol in response to information related to the file transfer protocol, such as information for establishing a communication connection, transmitted by a user using the terminal apparatuses 501, 502, 503.
It should be noted that the file transfer mode processing method provided by the embodiment of the present invention is generally executed by the terminal devices 501, 502, and 503, and accordingly, the file transfer mode processing apparatus is generally disposed in the terminal devices 501, 502, and 503.
It should be understood that the number of terminal devices, networks, and servers in fig. 5 is merely illustrative. There may be any number of terminal devices, networks, and servers, as desired for an implementation.
Referring now to FIG. 6, a block diagram of a computer system 600 suitable for use with a terminal device implementing an embodiment of the invention is shown. The terminal device shown in fig. 6 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present invention.
As shown in fig. 6, the computer system 600 includes a Central Processing Unit (CPU)601 that can perform various appropriate actions and processes according to a program stored in a Read Only Memory (ROM)602 or a program loaded from a storage section 608 into a Random Access Memory (RAM) 603. In the RAM 603, various programs and data necessary for the operation of the system 600 are also stored. The CPU 601, ROM 602, and RAM 603 are connected to each other via a bus 604. An input/output (I/O) interface 605 is also connected to bus 604.
The following components are connected to the I/O interface 605: an input portion 606 including a keyboard, a mouse, and the like; an output portion 607 including a display such as a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and the like, and a speaker; a storage section 608 including a hard disk and the like; and a communication section 609 including a network interface card such as a LAN card, a modem, or the like. The communication section 609 performs communication processing via a network such as the internet. The driver 610 is also connected to the I/O interface 605 as needed. A removable medium 611 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is mounted on the drive 610 as necessary, so that a computer program read out therefrom is mounted in the storage section 608 as necessary.
In particular, according to the embodiments of the present disclosure, the processes described above with reference to the flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program embodied on a computer readable medium, the computer program comprising program code for performing the method illustrated in the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network through the communication section 609, and/or installed from the removable medium 611. The computer program performs the above-described functions defined in the system of the present invention when executed by the Central Processing Unit (CPU) 601.
It should be noted that the computer readable medium shown in the present invention can be a computer readable signal medium or a computer readable storage medium or any combination of the two. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples of the computer readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the present invention, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In the present invention, however, a computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, fiber optic cable, RF, etc., or any suitable combination of the foregoing.
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present invention. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams or flowchart illustration, and combinations of blocks in the block diagrams or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The units described in the embodiments of the present invention may be implemented by software or hardware. The described units may also be provided in a processor, and may be described as: a processor includes a port management unit, a monitoring unit, and a mode processing unit. Here, names of these units do not constitute a limitation on the unit itself in some cases, and for example, the port management unit may also be described as "a unit that identifies a port number included in a file transfer configuration page displayed by the client and establishes a connection between the client and a port corresponding to the port number".
As another aspect, the present invention also provides a computer-readable medium, which may be contained in the apparatus described in the above embodiments; or may be separate and not incorporated into the device. The computer readable medium carries one or more programs which, when executed by a device, cause the device to comprise: identifying a port number included in a file transmission configuration page displayed by a client, and establishing connection between the client and a port corresponding to the port number; monitoring whether the client receives response information sent by the FTP server within a set time period; and processing the file transmission mode included by the file transmission configuration page according to the monitoring result.
According to the technical scheme of the embodiment of the invention, the connection is established through the port corresponding to the port number, whether the client receives the response information sent by the FTP server or not is monitored, namely the interaction condition between the client and the FTP server through the port is monitored, the file transmission mode such as an implicit encryption mode, an explicit encryption mode or a plaintext mode can be identified according to the monitoring result, the file transmission mode included in the file transmission configuration page can be processed according to the identified file transmission mode such as the implicit encryption mode, the explicit encryption mode or the plaintext mode, the file transmission mode can be obtained in the whole process without manual trial and error, and therefore, the automatic configuration file transmission mode is realized.
The above-described embodiments should not be construed as limiting the scope of the invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions may occur depending on design requirements and other factors. Any modification, equivalent replacement, and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims (9)

1. A file transfer mode processing method is characterized by comprising the following steps:
identifying a port number included in a file transfer configuration page displayed by a client, so that the client establishes connection with a port corresponding to the port number;
monitoring whether the client receives response information sent by an FTP server or not within a set time period;
processing the file transmission mode included in the file transmission configuration page according to the monitoring result;
aiming at the condition that the monitoring result indicates that the client does not receive the response information sent by the FTP server,
the processing of the file transmission mode included in the file transmission configuration page includes: determining that the file transmission mode is an implicit encryption mode; configuring the implicit encryption mode on the file transmission configuration page;
in case that the client is indicated to receive response information sent by the FTP server according to the monitoring result, and the response information comprises a first specific field indicating success,
the method further comprises the following steps: receiving second response information returned by the FTP server aiming at the auth command sent by the port, and analyzing the second response information;
the processing the file transmission mode included in the file transmission configuration page further includes:
determining the file transmission mode to be an explicit encryption mode or a plaintext mode according to the analysis result;
and configuring the explicit encryption mode or the plaintext mode in the file transmission configuration page.
2. The file transfer mode processing method according to claim 1,
aiming at the condition that the monitoring result indicates that the client receives the response information sent by the FTP server,
the file transfer mode processing method further includes: judging whether the response information comprises a first specific field indicating success, if so, sending an auth command to the FTP server through the port;
and receiving second response information returned by the FTP server aiming at the auth command, and analyzing the second response information.
3. The method according to claim 1, wherein the determining that the file transfer mode is an explicit encryption mode or a plaintext mode includes:
determining that the file transmission mode is an explicit encryption mode if the parsed result indicates that the second response information includes a second specific field;
and if the analyzed result indicates that the second response information comprises a third specific field, determining that the file transmission mode is a plaintext mode.
4. The method according to claim 1, wherein the processing of the file transfer mode included in the file transfer configuration page includes:
providing and displaying prompt information for indicating an implicit encryption mode or an explicit encryption mode or a plaintext mode, so that a user inputs a file transmission mode matched with the prompt information in the file transmission configuration page.
5. The file transfer mode processing method according to any one of claims 1 to 4,
and the set time period is not less than the time length of the round trip delay existing between the client and the FTP server.
6. A file transfer mode processing apparatus, comprising: a port management unit, a monitoring unit, and a mode processing unit, wherein,
the port management unit is used for identifying a port number included in a file transmission configuration page displayed by a client, so that the client establishes connection with a port corresponding to the port number;
the monitoring unit is used for monitoring whether the client receives response information sent by the FTP server in a set time period;
the mode processing unit is used for determining that the file transfer mode is an implicit encryption mode according to the condition that the monitoring result indicates that the client does not receive the response information sent by the FTP server; configuring the implicit encryption mode on the file transmission configuration page; the client is indicated to receive response information sent by an FTP server according to a monitoring result, and under the condition that the response information comprises a first specific field indicating success, second response information returned by the FTP server aiming at an auth command sent by the port is received, and the second response information is analyzed; determining the file transmission mode to be an explicit encryption mode or a plaintext mode according to the analysis result; and configuring the explicit encryption mode or the plaintext mode in the file transmission configuration page.
7. The file transfer mode processing apparatus according to claim 6,
the mode processing unit is further configured to, in response to a condition that the monitoring result indicates that the client receives a response message sent by the FTP server, determine whether the response message includes a first specific field indicating success, and if so, send an auth command to the FTP server through the port; and receiving second response information returned by the FTP server aiming at the auth command, and analyzing the second response information.
8. An electronic device, comprising:
one or more processors;
a storage device for storing one or more programs,
when executed by the one or more processors, cause the one or more processors to implement the method of any one of claims 1-5.
9. A computer-readable medium, on which a computer program is stored, which, when being executed by a processor, carries out the method according to any one of claims 1-5.
CN202110580892.7A 2021-05-26 2021-05-26 File transfer mode processing method and device Active CN113315833B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110580892.7A CN113315833B (en) 2021-05-26 2021-05-26 File transfer mode processing method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110580892.7A CN113315833B (en) 2021-05-26 2021-05-26 File transfer mode processing method and device

Publications (2)

Publication Number Publication Date
CN113315833A CN113315833A (en) 2021-08-27
CN113315833B true CN113315833B (en) 2022-09-13

Family

ID=77375314

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110580892.7A Active CN113315833B (en) 2021-05-26 2021-05-26 File transfer mode processing method and device

Country Status (1)

Country Link
CN (1) CN113315833B (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102420858A (en) * 2011-11-22 2012-04-18 杭州华三通信技术有限公司 FTP (File Transfer Protocol) mode configuration method, data transmission method and device
EP2773081A1 (en) * 2013-02-28 2014-09-03 Siemens Aktiengesellschaft Communication device for an industrial communication network and a method for providing data, in particular files, in an industrial communication network using file transfer protocol
CN111225015A (en) * 2018-11-27 2020-06-02 大唐移动通信设备有限公司 Method and device for realizing remote FTP transmission

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN100476822C (en) * 2006-04-30 2009-04-08 中国工商银行股份有限公司 File transmission method and system

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102420858A (en) * 2011-11-22 2012-04-18 杭州华三通信技术有限公司 FTP (File Transfer Protocol) mode configuration method, data transmission method and device
EP2773081A1 (en) * 2013-02-28 2014-09-03 Siemens Aktiengesellschaft Communication device for an industrial communication network and a method for providing data, in particular files, in an industrial communication network using file transfer protocol
CN111225015A (en) * 2018-11-27 2020-06-02 大唐移动通信设备有限公司 Method and device for realizing remote FTP transmission

Also Published As

Publication number Publication date
CN113315833A (en) 2021-08-27

Similar Documents

Publication Publication Date Title
CN107844324B (en) Client page jump processing method and device
CN107342083B (en) Method and apparatus for providing voice service
CN110580244A (en) file processing method and device, server and storage medium
CN110377440B (en) Information processing method and device
CN111930709B (en) Data storage method, apparatus, electronic device, and computer readable medium
WO2019015272A1 (en) Information processing method and device
CN113364795B (en) Data transmission method and proxy server
CN111510466B (en) Data updating method and device for client, electronic equipment and readable medium
CN112596920A (en) Message processing method and device, electronic equipment and storage medium
CN113328877B (en) Method and device for determining port protocol
CN113438256B (en) Data transmission method, system and proxy server based on double-layer SSL
CN117131516B (en) Operation and maintenance method and device
CN111600787B (en) Information processing method, information processing apparatus, electronic device, and medium
CN113315833B (en) File transfer mode processing method and device
CN112948138A (en) Method and device for processing message
CN111787041A (en) Method and apparatus for processing data
CN114417318A (en) Third-party page jumping method and device and electronic equipment
CN111460020B (en) Method, device, electronic equipment and medium for resolving message
CN113132480B (en) Data transmission method, device and system
CN113676482B (en) Data transmission system and method and data transmission system and method based on double-layer SSL
CN115309612B (en) Method and device for monitoring data
CN116996373A (en) Dynamic updating method and device for security proxy service
CN114791898A (en) File processing method and device
CN113268406A (en) Method, device, equipment and computer readable medium for testing software
CN118138255A (en) Cross-domain login state processing method and device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant