CN115859333A - File transmission encryption method, device, equipment and readable storage medium - Google Patents

File transmission encryption method, device, equipment and readable storage medium Download PDF

Info

Publication number
CN115859333A
CN115859333A CN202211690750.7A CN202211690750A CN115859333A CN 115859333 A CN115859333 A CN 115859333A CN 202211690750 A CN202211690750 A CN 202211690750A CN 115859333 A CN115859333 A CN 115859333A
Authority
CN
China
Prior art keywords
file
browser
title
path
cache
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.)
Pending
Application number
CN202211690750.7A
Other languages
Chinese (zh)
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 Wondersoft Technology Co Ltd
Original Assignee
Beijing Wondersoft 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 Wondersoft Technology Co Ltd filed Critical Beijing Wondersoft Technology Co Ltd
Priority to CN202211690750.7A priority Critical patent/CN115859333A/en
Publication of CN115859333A publication Critical patent/CN115859333A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Information Transfer Between Computers (AREA)

Abstract

The application discloses a file transmission encryption method, a file transmission encryption device, file transmission encryption equipment and a readable storage medium, and belongs to the technical field of computers. The method comprises the following steps: under the condition that the browser is detected to be started, storing the cache title into the shared memory; under the condition that the browser uploads a first file is detected, acquiring a current active window title and a path of the first file; under the condition that the cache title of the shared memory comprises the active window title, storing a second file in a first directory through a hook function, and encrypting the second file, wherein the second file is obtained by copying the first file; replacing the path of the first file with the path of the second file, and returning the replaced path of the first file to the browser; and the browser uploads the file of the path of the first file to a target server.

Description

File transmission encryption method, device, equipment and readable storage medium
Technical Field
The application belongs to the technical field of computers, and particularly relates to a file transmission encryption method, device, equipment and a readable storage medium.
Background
With the continuous development of internet technology, various websites are increasing, and more users log in various websites to upload or download files. Users are more and more concerned about the security and confidentiality of file data in the file transmission process.
In the related technology, a file data packet sent to a target server by a browser is acquired through a redirection driver, file data is encrypted, and file transmission is performed after a file abstract and a file size are replaced.
However, when the data volume of the file is large, the above-mentioned technique may cause a large processing delay, and the file has various formats, each format needs additional packet capturing analysis, and the operation is complex.
Disclosure of Invention
The embodiments of the present application provide a file transmission encryption method, device, apparatus, and readable storage medium, which can solve the problems that a large processing delay is caused by replacing a file digest and a file size with a related file transmission encryption technology and then performing file transmission, and that packet capture analysis needs to be additionally performed for each uploading format, which is complicated to operate.
In a first aspect, an embodiment of the present application provides a file transmission encryption method, where the method includes:
under the condition that the browser is detected to be started, storing the cache title into the shared memory;
under the condition that the browser uploads a first file is detected, acquiring a current active window title and a path of the first file;
under the condition that the cache title of the shared memory comprises the active window title, storing a second file in a first directory through a hook function, and encrypting the second file, wherein the second file is obtained by copying the first file;
replacing the path of the first file with the path of the second file, and returning the replaced path of the first file to the browser;
and the browser uploads the file of the path of the first file to a target server.
In a second aspect, an embodiment of the present application provides a file transmission encryption apparatus, where the apparatus includes:
the storage module is used for storing the cache title into the shared memory under the condition that the browser is detected to be started;
the acquisition module is used for acquiring a current active window title and a path of a first file under the condition that the browser is detected to upload the first file;
the encryption module is used for storing a second file in a first directory through a hook function under the condition that the cache title of the shared memory comprises the active window title, and encrypting the second file, wherein the second file is obtained by copying the first file;
the replacing module is used for replacing the path of the first file with the path of the second file and returning the replaced path of the first file to the browser;
and the uploading module is used for uploading the file of the path of the first file to a target server by the browser.
In a third aspect, embodiments of the present application provide an electronic device, which includes a processor and a memory, where the memory stores a program or instructions executable on the processor, and the program or instructions, when executed by the processor, implement the steps of the method according to the first aspect.
In a fourth aspect, embodiments of the present application provide a readable storage medium, on which a program or instructions are stored, which when executed by a processor implement the steps of the method according to the first aspect.
In the embodiment of the application, the method comprises the steps of storing a cache title into a shared memory under the condition that the starting of a browser is detected; under the condition that the browser uploads a first file is detected, acquiring a current active window title and a path of the first file; under the condition that the cache title of the shared memory comprises the active window title, storing a second file in a first directory through a hook function, and encrypting the second file, wherein the second file is obtained by copying the first file; replacing the path of the first file with the path of the second file, and returning the replaced path of the first file to the browser; the browser uploads the file of the path of the first file to the target server, so that the problems of large processing delay caused by file transmission after the file abstract and the file size are replaced by related file transmission encryption technology, and complex operation caused by the need of additionally performing packet capturing analysis for each uploading format are solved.
Drawings
Fig. 1 is a flowchart illustrating steps of a file transmission encryption method according to an embodiment of the present application;
FIG. 2 is a logic diagram of a file transfer encryption method according to an embodiment of the present application;
fig. 3 is a block diagram of a file transmission encryption apparatus according to an embodiment of the present application;
fig. 4 is an electronic device provided in an embodiment of the present application;
fig. 5 is a schematic diagram of a hardware structure of an electronic device according to an embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be described clearly below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are some, but not all, embodiments of the present application. All other embodiments that can be derived by one of ordinary skill in the art from the embodiments given herein are intended to be within the scope of the present disclosure.
The terms first, second and the like in the description and in the claims of the present application are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It will be appreciated that the data so used may be interchanged under appropriate circumstances such that embodiments of the application may be practiced in sequences other than those illustrated or described herein, and the terms "first," "second," and the like are generally used herein in a generic sense and do not limit the number of terms, e.g., the first term can be one or at least two. In addition, "and/or" in the specification and claims means at least one of connected objects, a character "/" generally means that a preceding and succeeding related objects are in an "or" relationship.
The file transmission encryption method provided by the embodiment of the present application is described in detail below with reference to the accompanying drawings through specific embodiments and application scenarios thereof.
The following description will be made of terms related to the embodiments of the present disclosure:
TCP (Transmission control protocol): TCP is a connection-oriented, reliable, byte-stream based transport-layer communication protocol. TCP can provide reliable communication services for paired processes in host computers connected to different but interconnected computer communication networks.
HTTP (Hyper Text Transfer Protocol): HTTP is a request-response protocol, which is a TCP-based application-layer transport protocol. HTTP specifies the rules for data transmission between the client and the server, such as: HTTP specifies what messages the client might send to the server and what responses get.
Hook (Hook): hook is a special message handling mechanism that can monitor various event messages in a system or process, intercept messages destined for a target window and process them. Hooks can be divided into thread hooks, which can monitor event messages for a given thread, and system hooks, which monitor event messages for all threads in the system. Because system hooks affect all applications in the system, the hook functions must be placed in a separate Dynamic Link Library (DLL).
HTML (Hyper Text Markup Language): HTML is a markup language that is used specifically to design and edit web pages. The system comprises a series of tags, and the document format on the network can be unified through the tags, so that the scattered internet resources are connected into a logic whole. HTML text is descriptive text consisting of HTML commands, and each web page is an HTML document.
Mounting: mount refers to a process by which the operating system makes computer files and directories on a storage device available to a user for access through the computer's file system.
Referring to fig. 1, fig. 1 shows a flowchart of steps of a file transmission encryption method provided in an embodiment of the present application, and as shown in fig. 1, the method specifically includes the following steps:
step 101, storing the cache title into the shared memory when detecting that the browser is started.
Shared memory refers to a large capacity memory that can be accessed by different Central Processing Units (CPUs) in a multiprocessor computer system, and can be used as a communication method between multiple processes. The shared memory may be used for communication between multiple processes of one program or for information transfer between multiple programs. All processes in the computer system can access the address in the shared memory, and if one process writes data to the shared memory, the change can be immediately seen by other processes accessing the same shared memory.
In the embodiment of the present application, the cache title may be a title field in an HTML file of a web page requiring encrypted uploaded files, generally reflecting related content of a current web page, and is a title displayed in a search engine result. For example, the following is an example of a cache title provided in an embodiment of the present application, which shows a part of content in an HTML document of a web page:
......
<meta name="UID"content="NS:psapi._MODULEINFO">
<meta name="updated_at"content="2022-10-05 09:53AM">
<meta name="word_count"content="221">
<meta name="cmProducts"content="https://authoring-docs-microsoft.poolparty.biz/devrel/caec7b7f-4941-4578-b79f-c63b1c1f5af4"data-source="generated">
<meta name="cmProducts"content="https://authoring-docs-microsoft.poolparty.biz/devrel/bcbcbad5-4208-4783-8035-8481272c98b8"data-source="generated">
<meta name="scope"content="Windows,Desktop">
<meta name="github_feedback_content_git_url"content="https://github.com/Mi crosoftDocs/sdk-api/blob/docs/sdk-api-src/content/psapi/ns-psapi-moduleinfo.md">
<1inkhref="https://1earn.microsoft.com/zh-cn/windows/win32/api/psapi/ns-psapi-moduleinfo"re1="canonica1">
<title>MODULEINFO(psapi.h)-win32apps|Microsoft Learn</title>
<1ink re1="stylesheet"href="/themes/docs.theme/master/zh-cn/themesstyles/8f869e87.site-1tr.css">
<script id="msdocs-script">...</script>
......
generally, the title field of a web page is located between < title > and </title >, and it can be seen that if the web page is a web page requiring encrypted upload of a file, the cache title of the web page is "MODULEINFO (psapi. H) -win32 apps | Microsoft Learn" located between < title > and </title >.
When the browser is detected to be started, the user logs in a webpage, the possibility of file uploading of the user exists, a cache title of the webpage needing to be encrypted and uploaded is required to be stored in a shared memory as mark information in advance and used as a judgment basis for judging whether the subsequent uploaded file needs to be encrypted and transmitted, and reading of each process is facilitated. When the webpage of the file uploaded by the user belongs to the webpage of the file to be encrypted, the file needs to be encrypted, otherwise, the file is directly uploaded.
Optionally, step 101 includes:
in sub-step 1011, the browser sends an HTTP request and receives an HTTP return packet.
The HTTP request refers to a request message sent from a client to a server, and in this embodiment, is a message sent by a browser to the server, and generally includes a request body, a request header, a request method, and the like. The HTTP return packet is a response message returned by the server after receiving and processing the HTTP request sent by the client, and generally includes a response text and a response header, where the response text includes an HTML page returned by the server. When a user wants to open a webpage, the browser is required to send an HTTP request to the server, then an HTML document of the webpage is obtained through an HTTP return packet returned by the server, and finally resource information in the document is analyzed to obtain the webpage.
Sub-step 1012, obtaining the HTTP return packet by redirection, and extracting the cache header in the HTTP return packet.
Redirection refers to the operation of redirecting various network requests to other locations through various methods. The server may redirect by returning a redirect response. Firstly, the server sends a redirection response to trigger redirection, wherein the redirection response has a Location header field and contains a Location to be redirected, and after receiving the redirection response, the browser loads the Location specified in the Location. In the embodiment of the application, the Location header field of the redirection response is set as a preset local IP address, and the HTTP return packet returned by the server is directed to the local port, so that the system can monitor the data content of the HTTP return packet in real time, and then extract the cache title between the < title > and the </title > in the HTML document data in the HTTP return packet.
And substep 1013, storing the cache title into a shared memory.
In order for all processes in the computer system to obtain the cache titles, the cache titles may be stored in the shared memory. And Hook can obtain the cache title in the shared memory.
Step 102, acquiring a current active window title and a path of a first file under the condition that the browser is detected to upload the first file.
The active window is the process window that the user is operating, and the active window title is the title of the webpage where the active window is located. For example, the user is browsing web page a using a browser, and in this case, the active window title is the title of web page a. Specifically, the method for acquiring the title of the active window is similar to the method for acquiring the title of the cache, and all the method is to acquire the field between the title and the title in the HTML document of the webpage.
The first file is the file that the user is uploading on the web page of the browser. And detecting that the user uploads a file C on the webpage B, wherein the title of the active window is the title of the webpage B, and the first file is C. Acquiring an active window title for judging whether the current webpage is a webpage needing to be encrypted and uploaded, and if the current webpage is the webpage needing to be encrypted and uploaded, performing subsequent file encryption; and if the current webpage is not the webpage needing encrypted uploading, directly uploading the first file.
Optionally, step 102 includes:
and a substep 1021, in case that it is detected that the browser calls a file dialog interface or a file dragging interface, the browser calls the hook function.
When a user clicks a webpage to upload a file, the browser calls a file dialog box interface or a file dragging interface of the system. Therefore, when the browser is detected to call the file dialog interface or the file dragging interface, the file is uploaded by the user.
After a Hook event has occurred for a particular event, the program will be notified to the system by the Hook program of the event, which will then respond to the event at the first time. In the embodiment of the application, a file dialog box interface or a file dragging interface called by a browser is taken as a specific event in advance, and the fact that the file dialog box interface or the file dragging interface called by the browser is detected to indicate that a user uploads a file is detected, so that the system calls Hook firstly.
And a substep 1022 of obtaining the title of the current active window and the path of the first file through the hook function.
The method for obtaining the title of the active window is similar to the method for obtaining the title of the cache, and all the method is used for obtaining the field between the title and the title in the HTML document of the webpage.
Through a remote injection technology, a browser process loads a Hook dynamic library, and the Hook dynamic library is loaded, so that after a user selects a local file through the browser, the file path selected by the user, namely the path of the first file, can be acquired through the Hook.
Optionally, before step 102, the method further includes:
and 106, mounting the hook function into the process of the browser under the condition that the browser is detected to be started.
The hook function is actually a segment of the program that handles messages and is hooked into the system through a system call. Whenever a specific event occurs, a specific message is sent out, and the hook function program captures the message first, that is, the hook function obtains control. At this time, the hook function may process the message, may continue to transfer the message without processing, or may forcibly end the transfer of the message. In the embodiment of the application, the hook function is firstly mounted in the process of the browser, and different operations are performed according to different conditions. For example, when it is detected that the browser calls a file dialog interface or a file dragging interface, the system calls a hook function first, and acquires a current active window title and a path of a first file through the hook function.
Step 103, storing a second file in a first directory through a hook function and encrypting the second file under the condition that the cache header of the shared memory includes the active window header, wherein the second file is obtained by copying the first file.
The cache title of the shared memory comprises an active window title, which indicates that the current webpage operated by the user is a webpage needing to be encrypted and then uploaded with the file, and the first file needs to be encrypted and uploaded. The second file is a temporary file obtained by copying the first file, and the first file and the second file are consistent in content. The first directory is a local temporary directory.
The second file is encrypted, and for a specific encryption manner, this embodiment does not excessively limit.
And 104, replacing the path of the first file with the path of the second file, and returning the replaced path of the first file to the browser.
And replacing the path of the first file with the path of a second file which is obtained by copying and encrypted, namely the path of the first directory. And returning the path of the first directory to the browser.
And 105, uploading the file of the path of the first file to a target server by the browser.
At this time, the file of the path of the first file is the encrypted second file, and the encrypted second file is uploaded to complete the encrypted uploading of the file. The method is used for encrypting the local file opened by the browser, and does not relate to analyzing http messages, and does not need to replace the file abstract and the file size corresponding to the uploaded file data with the file abstract and the file size corresponding to the encrypted file data, or replace the file abstract and the file size in the data returned by the server with the abstract and the file size before encryption. The method does not need to carry out packet capturing analysis aiming at different HTTP uploading formats, so that the encryption transmission of the file is more convenient and faster.
Fig. 2 is a logic diagram of a file transmission encryption method according to an embodiment of the present application, and referring to fig. 2, the method is explained by a specific example of encrypted uploading in a certain mailbox: :
1) And starting a browser by a user, remotely injecting the browser into a Hook dynamic library, and opening a file dialog box interface and a file dragging interface by Hook.
2) When the user accesses the mailbox by using the browser, the cache title is extracted from the webpage information data returned from the mailbox by redirection, and the webpage information data is put into the shared memory. While returning the data to the browser.
3) The browser displays a webpage, when a user clicks a file uploading button in the webpage, the browser calls a file dialog box interface or a file dragging interface of the system, and when the user finishes file selection, the Hook interface in 2) is called by the system.
4) When an interface of the Hook is called, firstly, a cache title stored by redirection in a shared memory is inquired, and if data containing an active window title where a current user is located exists, the file needs to be encrypted is judged.
5) And the Hook module copies the first file uploaded by the user to obtain a second file, stores the second file in the first directory, encrypts the second file, replaces the path of the first file with the path of the second file, and returns the path of the first file to the browser.
6) And uploading the file of the first file path to a target server by the browser.
To sum up, the file transmission encryption method provided by the embodiment of the present application includes storing a cache title in a shared memory when a browser is detected to be started; under the condition that the browser uploads a first file is detected, acquiring a current active window title and a path of the first file; under the condition that the cache titles of the shared memory comprise the active window titles, storing a second file in a first directory through a hook function, and encrypting the second file, wherein the second file is obtained by copying the first file; replacing the path of the first file with the path of the second file, and returning the replaced path of the first file to the browser; the browser uploads the file of the path of the first file to the target server, so that the problems of large processing delay caused by file transmission after the file abstract and the file size are replaced by related file transmission encryption technology, and complex operation caused by the need of additionally performing packet capturing analysis for each uploading format are solved.
According to the file transmission encryption method provided by the embodiment of the application, the execution main body can be a file transmission encryption device. In the embodiment of the present application, a file transmission encryption device executes a file transmission encryption method as an example, and the file transmission encryption device provided in the embodiment of the present application is described.
Referring to fig. 3, fig. 3 is a block diagram of a file transmission encryption apparatus according to an embodiment of the present application, and as shown in fig. 3, the file transmission encryption apparatus includes:
the storage module 201 is configured to store the cache title in the shared memory when the browser is detected to be started.
An obtaining module 202, configured to obtain a current active window title and a path of a first file when it is detected that the browser uploads the first file.
An encrypting module 203, configured to store a second file in a first directory through a hook function and encrypt the second file when the cache header of the shared memory includes the active window header, where the second file is obtained by copying the first file.
A replacing module 204, configured to replace the path of the first file with the path of the second file, and return the replaced path of the first file to the browser.
An uploading module 205, configured to upload, by the browser, a file of the path of the first file to a target server.
Optionally, before the obtaining module 202, the method further includes:
and the mounting module 206 is configured to mount the hook function to a process of the browser when the browser is detected to be started.
Optionally, the storage module 201 includes:
the response sub-module 2011 is configured to send an HTTP request and receive an HTTP return packet.
The extracting sub-module 2012 is configured to obtain the HTTP return packet by redirection, and extract the cache header in the HTTP return packet.
The first storage submodule 2013 is configured to store the cache title in the shared memory.
Optionally, the obtaining module 202 includes:
the invoking sub-module 2021 is configured to, when it is detected that the browser invokes a file dialog interface or a file drag interface, invoke the hook function by the browser.
The first obtaining sub-module 2022 is configured to obtain, through the hook function, a current active window title and a path of the first file.
To sum up, the file transmission encryption device provided by the embodiment of the present application includes storing a cache title in a shared memory when a browser is detected to be started; under the condition that the browser uploads a first file is detected, acquiring a current active window title and a path of the first file; under the condition that the cache title of the shared memory comprises the active window title, storing a second file in a first directory through a hook function, and encrypting the second file, wherein the second file is obtained by copying the first file; replacing the path of the first file with the path of the second file, and returning the replaced path of the first file to the browser; the browser uploads the file of the path of the first file to the target server, so that the problems of large processing delay caused by file transmission after the file abstract and the file size are replaced by related file transmission encryption technology, and complex operation caused by the need of additionally performing packet capturing analysis for each uploading format are solved.
The file transmission encryption device in the embodiment of the present application may be an electronic device, and may also be a component in the electronic device, such as an integrated circuit or a chip. The electronic device may be a terminal, or may be a device other than a terminal. The electronic Device may be, for example, a Mobile phone, a tablet computer, a notebook computer, a palm top computer, a vehicle-mounted electronic Device, a Mobile Internet Device (MID), an Augmented Reality (AR)/Virtual Reality (VR) Device, a robot, a wearable Device, an ultra-Mobile personal computer (UMPC), a netbook or a Personal Digital Assistant (PDA), and the like, and may also be a server, a Network Attached Storage (Network Attached Storage, NAS), a personal computer (NAS), a Television (TV), a teller machine, a self-service machine, and the like, and the embodiments of the present application are not limited in particular.
The file transfer encryption device in the embodiment of the present application may be a device having an operating system. The operating system may be an Android (Android) operating system, an ios operating system, or other possible operating systems, and embodiments of the present application are not limited specifically.
The file transmission encryption device provided in the embodiment of the present application can implement each process implemented by the method embodiments of fig. 1 to fig. 2, and is not described here again to avoid repetition.
Optionally, as shown in fig. 4, an electronic device 300 is further provided in this embodiment of the present application, and includes a processor 301 and a memory 302, where the memory 302 stores a program or an instruction that can be executed on the processor 301, and when the program or the instruction is executed by the processor 301, the steps of the above-mentioned file transmission encryption method embodiment are implemented, and the same technical effects can be achieved, and are not described again here to avoid repetition.
It should be noted that the electronic device in the embodiment of the present application includes the mobile electronic device and the non-mobile electronic device described above.
Fig. 5 is a schematic diagram of a hardware structure of an electronic device implementing the embodiment of the present application.
The electronic device 1000 includes, but is not limited to: a radio frequency unit 1001, a network module 1002, an audio output unit 1003, an input unit 1004, a sensor 1005, a display unit 1006, a user input unit 1007, an interface unit 1008, a memory 1009, and a processor 1010.
Those skilled in the art will appreciate that the electronic device 1000 may further comprise a power source (e.g., a battery) for supplying power to various components, and the power source may be logically connected to the processor 1010 through a power management system, so as to implement functions of managing charging, discharging, and power consumption through the power management system. The electronic device structure shown in fig. 5 does not constitute a limitation of the electronic device, and the electronic device may include more or less components than those shown, or combine some components, or arrange different components, and thus, the description is omitted here.
The processor 1010 is configured to store the cache title in the shared memory when the browser is detected to be started; under the condition that a browser uploads a first file is detected, acquiring a current active window title and a path of the first file; under the condition that a cache title of a shared memory comprises an active window title, storing a second file in a first directory through a hook function, and encrypting the second file, wherein the second file is obtained by copying the first file; replacing the path of the first file with the path of the second file, and returning the replaced path of the first file to the browser; and the browser uploads the file of the path of the first file to a target server.
It should be understood that in the embodiment of the present application, the input Unit 1004 may include a Graphics Processing Unit (GPU) 10041 and a microphone 10042, and the Graphics Processing Unit 10041 processes image data of still pictures or videos obtained by an image capturing device (such as a camera) in a video capturing mode or an image capturing mode. The display unit 1006 may include a display panel 10061, and the display panel 10061 may be configured in the form of a liquid crystal display, an organic light emitting diode, or the like. The user input unit 1007 includes at least one of a touch panel 10071 and other input devices 10072. The touch panel 10071 is also referred to as a touch screen. The touch panel 10071 may include two parts, a touch detection device and a touch controller. Other input devices 10072 may include, but are not limited to, a physical keyboard, function keys (e.g., volume control keys, switch keys, etc.), a trackball, a mouse, and a joystick, which are not described in detail herein.
The memory 1009 may be used to store software programs as well as various data. The memory 1009 may mainly include a first storage area storing a program or an instruction and a second storage area storing data, wherein the first storage area may store an operating system, an application program or an instruction (such as a sound playing function, an image playing function, and the like) required for at least one function, and the like. Further, the memory 1009 may include volatile memory or non-volatile memory, or the memory 1009 may include both volatile and non-volatile memory. The non-volatile Memory may be a Read-Only Memory (ROM), a Programmable ROM (PROM), an Erasable PROM (EPROM), an Electrically Erasable PROM (EEPROM), or a flash Memory. The volatile Memory may be a Random Access Memory (RAM), a Static Random Access Memory (Static RAM, SRAM), a Dynamic Random Access Memory (Dynamic RAM, DRAM), a Synchronous Dynamic Random Access Memory (Synchronous DRAM, SDRAM), a Double Data Rate Synchronous Dynamic Random Access Memory (Double Data Rate SDRAM, ddr SDRAM), an Enhanced Synchronous SDRAM (ESDRAM), a Synchronous Link DRAM (SLDRAM), and a Direct Memory bus RAM (DRRAM). The memory 1009 in the embodiments of the subject application includes, but is not limited to, these and any other suitable types of memory.
Processor 1010 may include one or at least two processing units; optionally, the processor 1010 integrates an application processor, which primarily handles operations related to the operating system, user interface, and applications, and a modem processor, which primarily handles wireless communication signals, such as a baseband processor. It will be appreciated that the modem processor described above may not be integrated into processor 1010.
The embodiments of the present application further provide a readable storage medium, where a program or an instruction is stored, and when the program or the instruction is executed by a processor, the program or the instruction implements each process of the above-mentioned file transmission encryption method embodiment, and can achieve the same technical effect, and in order to avoid repetition, details are not repeated here.
The processor is the processor in the electronic device described in the above embodiment. The readable storage medium includes a computer readable storage medium, such as a computer read only memory ROM, a random access memory RAM, a magnetic or optical disk, and the like.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrases "comprising a component of' 8230; \8230;" does not exclude the presence of another like element in a process, method, article, or apparatus that comprises the element. Further, it should be noted that the scope of the methods and apparatus of the embodiments of the present application is not limited to performing the functions in the order illustrated or discussed, but may include performing the functions in a substantially simultaneous manner or in a reverse order based on the functions involved, e.g., the methods described may be performed in an order different than that described, and various steps may be added, omitted, or combined. In addition, features described with reference to certain examples may be combined in other examples.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner. Based on such understanding, the technical solutions of the present application may be embodied in the form of a computer software product, which is stored in a storage medium (such as ROM/RAM, magnetic disk, optical disk) and includes instructions for enabling a terminal (such as a mobile phone, a computer, a server, or a network device) to execute the method according to the embodiments of the present application.
While the present embodiments have been described with reference to the accompanying drawings, it is to be understood that the invention is not limited to the precise embodiments described above, which are meant to be illustrative and not restrictive, and that various changes may be made therein by those skilled in the art without departing from the spirit and scope of the invention as defined by the appended claims.

Claims (10)

1. A method for encrypting a file transfer, the method comprising:
under the condition that the browser is detected to be started, storing the cache title into the shared memory;
under the condition that the browser uploads a first file is detected, acquiring a current active window title and a path of the first file;
under the condition that the cache title of the shared memory comprises the active window title, storing a second file in a first directory through a hook function, and encrypting the second file, wherein the second file is obtained by copying the first file;
replacing the path of the first file with the path of the second file, and returning the replaced path of the first file to the browser;
and the browser uploads the file of the path of the first file to a target server.
2. The method according to claim 1, wherein before the obtaining a currently active window title and a path of the first file in a case that the browser is detected to upload the first file, further comprising:
and mounting a hook function into the process of the browser under the condition that the browser is detected to be started.
3. The method of claim 1, wherein storing the cache title in the shared memory upon detecting a browser launch comprises:
the browser sends an HTTP request and receives an HTTP return packet;
acquiring the HTTP return packet through redirection, and extracting a cache header in the HTTP return packet;
and storing the cache title into a shared memory.
4. The method according to claim 1, wherein the obtaining a currently active window title and a path of the first file in a case that it is detected that the browser uploads the first file comprises:
under the condition that the browser calls a file dialog box interface or a file dragging interface is detected, the browser calls the hook function;
and acquiring the title of the current active window and the path of the first file through the hook function.
5. An apparatus for encrypting a file transfer, the apparatus comprising:
the storage module is used for storing the cache title into the shared memory under the condition that the browser is detected to be started;
the acquisition module is used for acquiring a current active window title and a path of a first file under the condition that the browser is detected to upload the first file;
the encryption module is used for storing a second file in a first directory through a hook function under the condition that the cache title of the shared memory comprises the active window title, and encrypting the second file, wherein the second file is obtained by copying the first file;
the replacing module is used for replacing the path of the first file with the path of the second file and returning the replaced path of the first file to the browser;
and the uploading module is used for uploading the file of the path of the first file to a target server by the browser.
6. The apparatus of claim 5, wherein the obtaining module further comprises, before:
and the mounting module is used for mounting the hook function into the process of the browser under the condition of detecting the starting of the browser.
7. The apparatus of claim 5, wherein the storage module comprises:
the response submodule is used for the browser to send an HTTP request and receive an HTTP return packet;
the extraction submodule is used for acquiring the HTTP return packet through redirection and extracting a cache title in the HTTP return packet;
and the first storage submodule is used for storing the cache title into the shared memory.
8. The apparatus of claim 5, wherein the obtaining module comprises:
the calling submodule is used for calling the hook function by the browser under the condition that the browser calls a file dialog box interface or a file dragging interface is detected;
and the first obtaining submodule is used for obtaining the title of the current active window and the path of the first file through the hook function.
9. An electronic device, comprising a processor and a memory, the memory storing a program or instructions executable on the processor, the program or instructions when executed by the processor implementing the file transfer encryption method of any one of claims 1 to 4.
10. A readable storage medium, characterized in that a program or instructions are stored thereon, which when executed by a processor, implement the file transfer encryption method of any one of claims 1 to 4.
CN202211690750.7A 2022-12-27 2022-12-27 File transmission encryption method, device, equipment and readable storage medium Pending CN115859333A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211690750.7A CN115859333A (en) 2022-12-27 2022-12-27 File transmission encryption method, device, equipment and readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211690750.7A CN115859333A (en) 2022-12-27 2022-12-27 File transmission encryption method, device, equipment and readable storage medium

Publications (1)

Publication Number Publication Date
CN115859333A true CN115859333A (en) 2023-03-28

Family

ID=85655222

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211690750.7A Pending CN115859333A (en) 2022-12-27 2022-12-27 File transmission encryption method, device, equipment and readable storage medium

Country Status (1)

Country Link
CN (1) CN115859333A (en)

Similar Documents

Publication Publication Date Title
US11799984B2 (en) Installable web applications
US11907642B2 (en) Enhanced links in curation and collaboration applications
US10102306B2 (en) Patching base document object model (DOM) with DOM-differentials to generate high fidelity replay of webpage user interactions
US7941609B2 (en) HTTP acceleration by prediction and pre-fetching
US8935798B1 (en) Automatically enabling private browsing of a web page, and applications thereof
WO2016173200A1 (en) Malicious website detection method and system
US11070648B2 (en) Offline client replay and sync
EP3525105B1 (en) Method and apparatus for opening a file
US10515142B2 (en) Method and apparatus for extracting webpage information
US20080229427A1 (en) Method and apparatus for secure web browsing
US9342329B2 (en) Method and system for cross-operating systems execution of software applications
WO2014139300A1 (en) Method and device for loading a plug-in
CN102473171A (en) Communicating information about a local machine to a browser application
CN112637361B (en) Page proxy method, device, electronic equipment and storage medium
US8631236B2 (en) Auto file locker
EP2959402B1 (en) Architecture for remote access to content state
CN111431767A (en) Multi-browser resource synchronization method and device, computer equipment and storage medium
US9998559B2 (en) Preemptive caching of data
CN107943921B (en) Page sharing information generation method and device, computer equipment and storage medium
CN115859333A (en) File transmission encryption method, device, equipment and readable storage medium
US20170199634A1 (en) Methods and systems for managing media content of a webpage
US9098228B2 (en) Determining content rendering capabilities for web browser optimization
CN112948727B (en) WebView-based data injection method, device, equipment and storage medium
US20220253320A1 (en) Method and system for operating a web application on a device
CN117591309A (en) Processing method, processing device, electronic equipment and readable storage medium

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