CN109240871B - Information acquisition method and device and computer readable storage medium - Google Patents

Information acquisition method and device and computer readable storage medium Download PDF

Info

Publication number
CN109240871B
CN109240871B CN201811117352.XA CN201811117352A CN109240871B CN 109240871 B CN109240871 B CN 109240871B CN 201811117352 A CN201811117352 A CN 201811117352A CN 109240871 B CN109240871 B CN 109240871B
Authority
CN
China
Prior art keywords
target
node server
command
target node
name
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
CN201811117352.XA
Other languages
Chinese (zh)
Other versions
CN109240871A (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.)
Zhengzhou Yunhai Information Technology Co Ltd
Original Assignee
Zhengzhou Yunhai Information 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 Zhengzhou Yunhai Information Technology Co Ltd filed Critical Zhengzhou Yunhai Information Technology Co Ltd
Priority to CN201811117352.XA priority Critical patent/CN109240871B/en
Publication of CN109240871A publication Critical patent/CN109240871A/en
Application granted granted Critical
Publication of CN109240871B publication Critical patent/CN109240871B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/22Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing
    • G06F11/2289Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing by configuration test
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/22Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing
    • G06F11/2294Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing by remote test

Landscapes

  • Engineering & Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)
  • Computer And Data Communications (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The embodiment of the invention discloses an information acquisition method, an information acquisition device and a storage medium, wherein the information acquisition method comprises the following steps: the node server acquires a target Internet Protocol (IP) of a target node server and a target information acquisition command for the target node server; acquiring an encryption method of a target node server according to the target IP address; acquiring the model of a target node server according to the encryption method, the target IP address and a preset user name and password; acquiring mapping command names corresponding to the acquired model and the name of the target information acquisition command from the corresponding relation among the pre-established model, the original command name and the mapping command name; and acquiring target information according to the target mapping command corresponding to the obtained mapping command name, the encryption algorithm, the target IP address, the user name and the password. According to the technical scheme provided by the embodiment of the invention, the acquisition of hardware information of all servers is realized on one server, so that the acquisition process of the hardware information is simplified.

Description

Information acquisition method and device and computer readable storage medium
Technical Field
The embodiment of the invention relates to the technical field of computers, in particular to an information acquisition method, an information acquisition device and a computer-readable storage medium.
Background
With the wider application range of the server, the purchase quantity of the server by the enterprise is obviously increased. Before a server is purchased and put into use, related personnel often need to acquire and record server hardware information through a Baseboard Management Controller (BMC) interface, so that the hardware information of all servers can be comprehensively known, the purpose of the server is determined according to the server hardware information in subsequent applications, and the server is specifically deployed.
In the related art, the server hardware information is obtained mainly by the following operations: and inputting a user name and a password in a server to obtain the hardware information to log in the server, and then obtaining the hardware information of the server in a command mode.
However, this method can only obtain the hardware information of the server to which the operation belongs, but cannot obtain the hardware information of the servers other than the server to which the operation belongs, so that the hardware information of all the servers needs to be obtained, and the hardware information obtaining operation needs to be performed on each server to which the hardware information needs to be obtained in sequence, so that the whole operation process is very complicated.
Disclosure of Invention
In order to solve the foregoing technical problems, embodiments of the present invention provide an information obtaining method, an information obtaining apparatus, and a computer-readable storage medium, which can obtain hardware information of all servers on one server, thereby simplifying an operation process.
To achieve the object of the embodiments of the present invention, an embodiment of the present invention provides an information acquisition method, including:
the method comprises the steps that a node server acquires an Internet Protocol (IP) address of a target node server as a target IP address, and acquires a target information acquisition command aiming at the target node server;
the node server acquires an encryption method for encrypting the user name and the password by the target node server according to the target IP address;
the node server acquires the model of the target node server according to the acquired encryption method, the target IP address and a pre-configured user name and password of the target node server;
the node server acquires mapping command names corresponding to the model of the target node server and the name of the target information acquisition command from the pre-established corresponding relation among the model of the node server, the original command name and the mapping command name;
and the node server acquires the target information of the target node server according to the target mapping command corresponding to the acquired mapping command name, the acquired encryption algorithm, the target IP address and the user name and the password of the target node server.
After the node server obtains the target information of the target node server according to the target mapping command corresponding to the obtained mapping command name, the obtained encryption algorithm, the target IP address and the user name and the password of the target node server, the method further comprises the following steps:
and the node server analyzes the obtained data of the target information into data in a table format.
The node server obtains an encryption method of an encrypted user name and a password of the target node server according to the target IP address, and the encryption method comprises the following steps:
the node server acquires a source code of a login webpage of a Preboot eXecution Environment (PXE) system of the target node server according to the target IP address;
and the node server acquires the encryption user name and the encryption method of the password of the target node server from the acquired source code of the login webpage.
The node server obtains the model of the target node server according to the obtained encryption method, the target IP address and the user name and the password of the target node server, which are configured in advance, and the method comprises the following steps:
the node server encrypts the user name and the password of the target node server according to the obtained encryption method to obtain encryption information;
the node server sends a login request carrying the obtained encryption information to the target node server according to the target IP address information;
the node server receives login reply information sent by the target node server to realize login of the target node server;
and the node server acquires the model of the target node server.
The node server obtains the mapping command name corresponding to the model of the target node server and the name of the target information obtaining command from the pre-established corresponding relation among the model of the node server, the original command name and the mapping command name, and the method comprises the following steps:
the node server searches a series of original command names and mapping command names corresponding to the model of the target node server in the corresponding relation;
the node server searches the name of the target information acquisition command in a series of obtained original command names and mapping command names;
and the node server acquires a mapping command name corresponding to the name of the searched target information acquisition command as the mapping command name corresponding to the model of the acquired target node server and the name of the information acquisition command.
The node server obtains the target information of the target node server according to the target mapping command corresponding to the obtained mapping command name, the obtained encryption algorithm, the target IP address and the user name and the password of the target node server, and the method comprises the following steps:
the node server fills the target IP address, the user name and the password of the target node server into the target mapping command as parameter information;
and the node server acquires the target information of the target node server according to the target mapping command after the parameter information is filled in and the acquired encryption method.
The node server obtains the target information of the target node server according to the target mapping command after the parameter information is filled in and the obtained encryption method, and the method comprises the following steps:
the node server encrypts the user name and the password of the target node server in the target mapping command according to the obtained encryption method to obtain encryption information;
the node server sends a login request carrying the obtained encryption information to the target node server according to the target IP address information in the target mapping command;
the node server receives login reply information sent by the target node server to realize login of the target node server;
and the node server acquires the target information of the target node server according to the target mapping command.
An embodiment of the present invention further provides a node server, including:
the system comprises an acquisition module, a processing module and a processing module, wherein the acquisition module is used for a node server to acquire an IP address of a target node server as a target IP address and acquire a target information acquisition command aiming at the target node server;
the acquisition module is further used for acquiring an encryption method of the encrypted user name and the encrypted password of the target node server according to the target IP address;
the obtaining module is further configured to obtain a model of the target node server according to the obtained encryption method, the target IP address, and a pre-configured user name and password of the target node server;
the acquisition module is further configured to acquire mapping command names corresponding to the model of the target node server and the name of the target information acquisition command from a pre-established correspondence between the model of the node server, the original command name, and the mapping command name;
the obtaining module is further configured to obtain target information of the target node server according to a target mapping command corresponding to the obtained mapping command name, the obtained encryption algorithm, the target IP address, and the user name and the password of the target node server.
An embodiment of the present invention further provides an information acquiring apparatus, including: a processor and a memory, wherein the memory has stored therein the following commands executable by the processor:
acquiring an IP address of a target node server as a target IP address, and acquiring a target information acquisition command for the target node server;
acquiring an encryption method for encrypting the user name and the password by the target node server according to the target IP address;
acquiring the model of the target node server according to the acquired encryption method, the target IP address and a pre-configured user name and password of the target node server;
acquiring mapping command names corresponding to the model of the target node server and the name of the target information acquisition command from the pre-established corresponding relation among the model of the node server, the original command name and the mapping command name;
and acquiring target information of the target node server according to the target mapping command corresponding to the obtained mapping command name, the obtained encryption algorithm, the target IP address, and the user name and the password of the target node server.
The embodiment of the invention also provides a computer-readable storage medium, wherein a computer executable command is stored on the storage medium, and the computer executable command is used for executing the following steps:
acquiring an IP address of a target node server as a target IP address, and acquiring a target information acquisition command for the target node server;
acquiring an encryption method for encrypting the user name and the password by the target node server according to the target IP address;
acquiring the model of the target node server according to the acquired encryption method, the target IP address and a pre-configured user name and password of the target node server;
acquiring mapping command names corresponding to the model of the target node server and the name of the target information acquisition command from the pre-established corresponding relation among the model of the node server, the original command name and the mapping command name;
and acquiring target information of the target node server according to the target mapping command corresponding to the obtained mapping command name, the obtained encryption algorithm, the target IP address, and the user name and the password of the target node server.
Compared with the prior art, the embodiment of the invention at least comprises the following steps: the node server acquires an IP address of a target node server as a target IP address and acquires a target information acquisition command for the target node server; acquiring an encryption method for encrypting a user name and a password by a target node server according to a target IP address; acquiring the model of the target node server according to the acquired encryption method, the target IP address and a user name and a password of the target node server which are configured in advance; acquiring mapping command names corresponding to the model of the target node server and the name of the target information acquisition command from the pre-established corresponding relation among the model of the node server, the original command name and the mapping command name; and acquiring target information of the target node server according to the target mapping command corresponding to the obtained mapping command name, the obtained encryption algorithm, the target IP address and the user name and the password of the target node server. According to the technical scheme provided by the embodiment of the invention, the acquisition of hardware information of all servers is realized on one server, so that the operation process of acquiring the hardware information is greatly simplified.
Additional features and advantages of embodiments of the invention will be set forth in the description which follows, and in part will be obvious from the description, or may be learned by practice of embodiments of the invention. The objectives and other advantages of the embodiments of the invention will be realized and attained by the structure particularly pointed out in the written description and claims hereof as well as the appended drawings.
Drawings
The accompanying drawings are included to provide a further understanding of the embodiments of the invention and are incorporated in and constitute a part of this specification, illustrate embodiments of the invention and together with the examples of the application do not constitute a limitation of the embodiments of the invention.
Fig. 1 is a schematic flowchart of an information obtaining method according to an embodiment of the present invention;
fig. 2 is a schematic structural diagram of a node server according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention more apparent, the embodiments of the present invention will be described in detail below with reference to the accompanying drawings. It should be noted that the embodiments and features of the embodiments in the present application may be arbitrarily combined with each other without conflict.
An embodiment of the present invention provides an information obtaining method, as shown in fig. 1, the method including:
step 101, the node server acquires an IP address of a target node server as a target IP address, and acquires a target information acquisition command for the target node server.
It should be noted that, assuming that there are N servers (N is a positive integer) for acquiring the hardware information, first, IP addresses are respectively configured on the N servers, and then a local area network can be formed according to the N servers, so that each server can be referred to as a node server.
Specifically, the IP address of the target node server and the target information acquisition command for the target node server may be input to the node server by the user in the form of a command line.
And step 102, the node server acquires an encryption user name and a password encryption method of the target node server according to the target IP address.
It should be noted that the node server needs to log in the target node server, but the target node server is not provided with the login page of the PXE system, and cannot perform authentication, so the node server "imitates" the authentication process.
And 103, the node server acquires the model of the target node server according to the acquired encryption method, the target IP address and the user name and the password of the target node server which are configured in advance.
And step 104, the node server acquires the mapping command names corresponding to the model of the target node server and the name of the target information acquisition command from the pre-established corresponding relation among the model of the node server, the original command name and the mapping command name.
Specifically, the original command in the information acquisition method provided by the embodiment of the present invention is a command written in an operation manual provided by a server manufacturer, and therefore, the name of the original command is a name naming the command in the operation manual. The mapping command in the information acquisition method provided by the embodiment of the invention is a command which is rewritten according to different input parameters with the aim of realizing the same function of the original command, so that the name of the mapping command is a name for naming the newly written command. For example, assuming that the model of the server includes a model a of a manufacturer a, a model B of the manufacturer a, and a model C of the manufacturer B, the information acquisition command includes: a mainboard information acquisition command, a CPU information acquisition command and a hard disk information acquisition command. The operation manual of the type a server of the manufacturer a is named as the main board information acquisition command: a1, naming the CPU information acquisition command as: a2, naming the hard disk information acquisition command as: a3; the information acquisition method provided by the embodiment of the invention rewrites the mainboard information acquisition command in advance according to the difference of the input parameters and names the rewritten command as: a1, rewriting the CPU information acquisition command and naming the rewritten command as: a2, rewriting hard disk information acquisition and naming the rewritten command as: a3. the operation manual of the B-model server of the first manufacturer is named as: b1, naming the CPU information acquisition command as: b2, naming the hard disk information acquisition command as: b3; the information acquisition method provided by the embodiment of the invention rewrites the mainboard information acquisition command in advance according to the difference of the input parameters and names the rewritten command as: b1, rewriting the CPU information acquisition command and naming the rewritten command as: b2, rewriting hard disk information acquisition and naming the rewritten command as: b3. the operation manual of the C-type server of the second manufacturer is named as the main board information acquisition command: c1, naming the CPU information acquisition command as: c2, naming the hard disk information acquisition command as: c3; the information acquisition method provided by the embodiment of the invention rewrites the mainboard information acquisition command in advance according to the difference of the input parameters and names the rewritten command as: c1, rewriting the CPU information acquisition command and naming the rewritten command as: c2, rewriting hard disk information acquisition and naming the rewritten command as: c3. therefore, the correspondence between the model of the node server, the original command name and the mapping command name can be established as shown in table 1:
Figure BDA0001810945270000071
Figure BDA0001810945270000081
TABLE 1
And 105, the node server acquires the target information of the target node server according to the target mapping command corresponding to the acquired mapping command name, the acquired encryption algorithm, the target IP address and the user name and the password of the target node server.
In a local area network including a plurality of servers, both the node server and the target node server may be any one of the plurality of servers, that is, hardware information of any one server may be acquired on any one server.
It should be noted that, in the prior art, there is also a method for acquiring server hardware information, and the method is applied on the premise that each node server is required to be installed with an operating system and a browser for displaying hardware information, when hardware information needs to be acquired, a specified node server is logged in through an IP address, then a display page of the hardware information is skipped to, and then manual click-searching of one button after another is required until the hardware information to be acquired is found, so the operation process is also very troublesome. The information acquisition method provided by the invention abandons the hardware information acquisition method on the display page, and directly acquires the hardware information by using a command line mode, so that an operating system and a browser do not need to be installed on the node server.
In the information acquisition method provided by the embodiment of the invention, the node server acquires the IP address of the target node server as the target IP address and acquires a target information acquisition command for the target node server; acquiring an encryption method for encrypting a user name and a password by a target node server according to a target IP address; acquiring the model of the target node server according to the acquired encryption method, the target IP address and a user name and a password of the target node server which are configured in advance; acquiring mapping command names corresponding to the model of the target node server and the name of the target information acquisition command from the pre-established corresponding relation among the model of the node server, the original command name and the mapping command name; and acquiring target information of the target node server according to the target mapping command corresponding to the obtained mapping command name, the obtained encryption algorithm, the target IP address and the user name and the password of the target node server. According to the technical scheme provided by the embodiment of the invention, the acquisition of hardware information of all servers is realized on one server, so that the operation process of acquiring the hardware information is greatly simplified.
Optionally, after the node server obtains the target information of the target node server according to the target mapping command corresponding to the obtained mapping command name, the obtained encryption algorithm, the target IP address, and the user name and the password of the target node server, the method further includes:
and 106, the node server analyzes the obtained data of the target information into data in a table format.
Specifically, the data format of the target information is a non-tabular format, and thus is inconvenient to read. The table format data may be JavaScript Object Notation (JSON) data.
Optionally, the node server obtains an encryption method for encrypting the user name and the password by the target node server according to the target IP address, including:
step 102a, the node server obtains the source code of the login webpage of the PXE system of the target node server according to the target IP address.
And 102b, the node server acquires an encryption user name and an encryption method of a password of the target node server from the acquired source code of the login webpage.
Optionally, the obtaining, by the node server, the model of the target node server according to the obtained encryption method, the target IP address, and the pre-configured user name and password of the target node server includes:
and 103a, the node server encrypts the user name and the password of the target node server according to the obtained encryption method to obtain encryption information.
And step 103b, the node server sends the login request carrying the obtained encryption information to the target node server according to the target IP address information.
And step 103c, the node server receives the login reply information sent by the target node server so as to realize the login of the target node server.
And step 103d, the node server acquires the model of the target node server.
Optionally, the step of the node server obtaining, from the pre-established correspondence between the model of the node server, the original command name, and the mapping command name, the mapping command name corresponding to both the model of the target node server and the name of the target information obtaining command includes:
and 104a, the node server searches a series of original command names and mapping command names corresponding to the model of the target node server in the corresponding relation.
And step 104b, the node server searches the name of the target information acquisition command in the obtained series of original command names and mapping command names.
And step 104c, the node server acquires the mapping command name corresponding to the name of the searched target information acquisition command as the mapping command name corresponding to the obtained model of the target node server and the name of the information acquisition command.
Optionally, the node server obtains target information of the target node server according to the target mapping command corresponding to the obtained mapping command name, the obtained encryption algorithm, the target IP address, and the user name and the password of the target node server, and includes:
and 105a, the node server fills the target IP address, the user name and the password of the target node server as parameter information into the target mapping command.
And 105b, the node server acquires the target information of the target node server according to the target mapping command after the parameter information is filled in and the acquired encryption method.
Optionally, the acquiring, by the node server, the target information of the target node server according to the target mapping command after the parameter information is completely filled and the obtained encryption method includes:
and step 105b1, the node server encrypts the user name and the password of the target node server in the target mapping command according to the obtained encryption method to obtain encryption information.
And step 105b2, the node server sends the login request carrying the obtained encryption information to the target node server according to the target IP address information in the target mapping command.
And step 105b3, the node server receives the login reply information sent by the target node server to realize the login of the target node server.
And step 105b4, the node server acquires the target information of the target node server according to the target mapping command.
An embodiment of the present invention further provides a node server, as shown in fig. 2, where the node server 2 includes:
the obtaining module 21 is configured to obtain, by the node server, an IP address of the target node server as a target IP address, and obtain a target information obtaining command for the target node server.
The obtaining module 21 is further configured to obtain an encryption method for the target node server to encrypt the user name and the password according to the target IP address.
The obtaining module 21 is further configured to obtain a model of the target node server according to the obtained encryption method, the target IP address, and a user name and a password of the target node server configured in advance.
The obtaining module 21 is further configured to obtain, from the pre-established correspondence relationship between the model of the node server, the original command name, and the mapping command name, the mapping command name corresponding to both the model of the target node server and the name of the target information obtaining command.
The obtaining module 21 is further configured to obtain target information of the target node server according to the target mapping command corresponding to the obtained mapping command name, the obtained encryption algorithm, the target IP address, and the user name and the password of the target node server.
Optionally, the node server 2 further includes:
and the processing module 22 is configured to parse the obtained data of the target information into data in a table format.
Optionally, the obtaining module 21 is specifically configured to:
and acquiring the source code of the login webpage of the PXE system of the target node server according to the target IP address.
And acquiring an encryption user name and a password encrypted by the target node server from the obtained source code of the login webpage.
Optionally, the obtaining module 21 is specifically configured to:
and encrypting the user name and the password of the target node server according to the obtained encryption method to obtain encryption information.
And sending the login request carrying the obtained encryption information to a target node server according to the target IP address information.
And receiving login reply information sent by the target node server to realize the login of the target node server.
And obtaining the model of the target node server.
Optionally, the obtaining module 21 is specifically configured to:
and searching a series of original command names and mapping command names corresponding to the model of the target node server in the corresponding relation.
And searching the name of the target information acquisition command in the obtained series of original command names and mapping command names.
And acquiring a mapping command name corresponding to the name of the searched target information acquisition command as a mapping command name corresponding to the obtained model of the target node server and the name of the information acquisition command.
Optionally, the obtaining module 21 is specifically configured to:
and filling the target IP address, the user name and the password of the target node server as parameter information into the target mapping command.
And acquiring the target information of the target node server according to the target mapping command after the parameter information is filled in and the acquired encryption method.
Optionally, the obtaining module 21 is further specifically configured to:
and encrypting the user name and the password of the target node server in the target mapping command according to the obtained encryption method to obtain encryption information.
And sending the login request carrying the obtained encryption information to a target node server according to the target IP address information in the target mapping command.
And receiving login reply information sent by the target node server to realize the login of the target node server.
And acquiring target information of the target node server according to the target mapping command.
The node server provided by the embodiment of the invention acquires the IP address of the target node server as the target IP address and acquires the target information acquisition command aiming at the target node server; acquiring an encryption method for encrypting a user name and a password by a target node server according to a target IP address; acquiring the model of the target node server according to the acquired encryption method, the target IP address and a user name and a password of the target node server which are configured in advance; acquiring mapping command names corresponding to the model of the target node server and the name of the target information acquisition command from the pre-established corresponding relation among the model of the node server, the original command name and the mapping command name; and acquiring target information of the target node server according to the target mapping command corresponding to the obtained mapping command name, the obtained encryption algorithm, the target IP address and the user name and the password of the target node server. According to the technical scheme provided by the embodiment of the invention, the acquisition of hardware information of all servers is realized on one server, so that the operation process of acquiring the hardware information is greatly simplified.
In practical applications, the obtaining module 21 and the Processing module 22 can be implemented by a Central Processing Unit (CPU), a microprocessor Unit (MPU), a Digital Signal Processor (DSP), a Field Programmable Gate Array (FPGA), or the like, which are located in the node server.
The embodiment of the invention also provides an information acquisition device, which comprises a memory and a processor, wherein the memory stores the following commands which can be executed by the processor:
and acquiring the IP address of the target node server as a target IP address, and acquiring a target information acquisition command aiming at the target node server.
And acquiring an encryption method for encrypting the user name and the password by the target node server according to the target IP address.
And obtaining the model of the target node server according to the obtained encryption method, the target IP address and the user name and the password of the target node server which are configured in advance.
And acquiring the mapping command names corresponding to the model of the target node server and the name of the target information acquisition command from the pre-established corresponding relation among the model of the node server, the original command name and the mapping command name.
And acquiring target information of the target node server according to the target mapping command corresponding to the obtained mapping command name, the obtained encryption algorithm, the target IP address and the user name and the password of the target node server.
Optionally, the memory further stores the following commands executable by the processor:
and analyzing the obtained data of the target information into data in a table format.
Optionally, the memory has stored therein the following commands executable by the processor:
and acquiring the source code of the login webpage of the PXE system of the target node server according to the target IP address.
And acquiring an encryption user name and a password encrypted by the target node server from the obtained source code of the login webpage.
Optionally, the memory further stores the following commands executable by the processor:
and encrypting the user name and the password of the target node server according to the obtained encryption method to obtain encryption information.
And sending the login request carrying the obtained encryption information to a target node server according to the target IP address information.
And receiving login reply information sent by the target node server to realize the login of the target node server.
And obtaining the model of the target node server.
Optionally, the memory has stored therein the following commands executable by the processor:
and searching a series of original command names and mapping command names corresponding to the model of the target node server in the corresponding relation.
And searching the name of the target information acquisition command in the obtained series of original command names and mapping command names.
And acquiring a mapping command name corresponding to the name of the searched target information acquisition command as a mapping command name corresponding to the obtained model of the target node server and the name of the information acquisition command.
Optionally, the memory has stored therein the following commands executable by the processor:
and filling the target IP address, the user name and the password of the target node server as parameter information into the target mapping command.
And acquiring the target information of the target node server according to the target mapping command after the parameter information is filled in and the acquired encryption method.
Optionally, the memory further stores the following commands executable by the processor:
and encrypting the user name and the password of the target node server in the target mapping command according to the obtained encryption method to obtain encryption information.
And sending the login request carrying the obtained encryption information to a target node server according to the target IP address information in the target mapping command.
And receiving login reply information sent by the target node server to realize the login of the target node server.
And acquiring target information of the target node server according to the target mapping command.
The embodiment of the invention also provides a computer-readable storage medium, wherein the storage medium is stored with a computer-executable command, and the computer-executable command is used for executing the following steps:
and acquiring the IP address of the target node server as a target IP address, and acquiring a target information acquisition command aiming at the target node server.
And acquiring an encryption method for encrypting the user name and the password by the target node server according to the target IP address.
And obtaining the model of the target node server according to the obtained encryption method, the target IP address and the user name and the password of the target node server which are configured in advance.
And acquiring the mapping command names corresponding to the model of the target node server and the name of the target information acquisition command from the pre-established corresponding relation among the model of the node server, the original command name and the mapping command name.
And acquiring target information of the target node server according to the target mapping command corresponding to the obtained mapping command name, the obtained encryption algorithm, the target IP address and the user name and the password of the target node server.
Optionally, the computer executable commands are further for performing the steps of:
and analyzing the obtained data of the target information into data in a table format.
Optionally, the computer-executable command is specifically configured to perform the following steps:
and acquiring the source code of the login webpage of the PXE system of the target node server according to the target IP address.
And acquiring an encryption user name and a password encrypted by the target node server from the obtained source code of the login webpage.
Optionally, the computer-executable command is specifically configured to perform the following steps:
and encrypting the user name and the password of the target node server according to the obtained encryption method to obtain encryption information.
And sending the login request carrying the obtained encryption information to a target node server according to the target IP address information.
And receiving login reply information sent by the target node server to realize the login of the target node server.
And obtaining the model of the target node server.
Optionally, the computer-executable command is specifically configured to perform the following steps:
and searching a series of original command names and mapping command names corresponding to the model of the target node server in the corresponding relation.
And searching the name of the target information acquisition command in the obtained series of original command names and mapping command names.
And acquiring a mapping command name corresponding to the name of the searched target information acquisition command as a mapping command name corresponding to the obtained model of the target node server and the name of the information acquisition command.
Optionally, the computer-executable command is specifically configured to perform the following steps:
and filling the target IP address, the user name and the password of the target node server as parameter information into the target mapping command.
And acquiring the target information of the target node server according to the target mapping command after the parameter information is filled in and the acquired encryption method.
Optionally, the computer-executable commands are further specifically configured to perform the following steps:
and encrypting the user name and the password of the target node server in the target mapping command according to the obtained encryption method to obtain encryption information.
And sending the login request carrying the obtained encryption information to a target node server according to the target IP address information in the target mapping command.
And receiving login reply information sent by the target node server to realize the login of the target node server.
And acquiring target information of the target node server according to the target mapping command.
Although the embodiments of the present invention have been described above, the descriptions are only used for understanding the embodiments of the present invention, and are not intended to limit the embodiments of the present invention. It will be understood by those skilled in the art that various changes in form and details may be made therein without departing from the spirit and scope of the embodiments of the invention as defined by the appended claims.

Claims (8)

1. An information acquisition method, comprising:
the node server acquires an Internet Protocol (IP) address of a target node server as a target IP address and acquires a target information acquisition command aiming at the target node server;
the node server acquires an encryption method for encrypting the user name and the password by the target node server according to the target IP address;
the node server acquires the model of the target node server according to the acquired encryption method, the target IP address and a pre-configured user name and password of the target node server;
the node server acquires mapping command names corresponding to the model of the target node server and the name of the target information acquisition command from the pre-established corresponding relation among the model of the node server, the original command name and the mapping command name;
the node server fills the target IP address, the user name and the password of the target node server as parameter information into a target mapping command corresponding to the obtained mapping command name;
the node server encrypts the user name and the password of the target node server in the target mapping command according to the obtained encryption method to obtain encryption information;
the node server sends a login request carrying the obtained encryption information to the target node server according to the target IP address information in the target mapping command;
the node server receives login reply information sent by the target node server to realize login of the target node server;
and the node server acquires the target information of the target node server according to the target mapping command.
2. The information acquisition method according to claim 1, wherein after the node server acquires the target information of the target node server based on the target mapping command corresponding to the acquired mapping command name, the acquired encryption algorithm, the target IP address, and the user name and password of the target node server, the method further comprises:
and the node server analyzes the obtained data of the target information into data in a table format.
3. The information acquisition method according to claim 1, wherein the node server acquires an encryption method for encrypting the user name and the password of the target node server based on the target IP address, and the method comprises:
the node server acquires a source code of a login webpage of a pre-starting execution environment PXE system of the target node server according to the target IP address;
and the node server acquires the encryption user name and the encryption method of the password of the target node server from the acquired source code of the login webpage.
4. The information acquisition method according to claim 1, wherein the node server acquires the model of the target node server based on the acquired encryption method, the target IP address, and a pre-configured user name and password of the target node server, and includes:
the node server encrypts the user name and the password of the target node server according to the obtained encryption method to obtain encryption information;
the node server sends a login request carrying the obtained encryption information to the target node server according to the target IP address information;
the node server receives login reply information sent by the target node server to realize login of the target node server;
and the node server acquires the model of the target node server.
5. The information acquisition method according to claim 1, wherein the node server acquires, from the correspondence among the model of the node server, the original command name, and the mapping command name, mapping command names corresponding to both the model of the target node server and the name of the target information acquisition command, including:
the node server searches a series of original command names and mapping command names corresponding to the model of the target node server in the corresponding relation;
the node server searches the name of the target information acquisition command in a series of obtained original command names and mapping command names;
and the node server acquires a mapping command name corresponding to the name of the searched target information acquisition command as a mapping command name corresponding to the model of the acquired target node server and the name of the information acquisition command.
6. A node server, comprising:
the system comprises an acquisition module, a processing module and a processing module, wherein the acquisition module is used for a node server to acquire an IP address of a target node server as a target IP address and acquire a target information acquisition command aiming at the target node server;
the acquisition module is further used for acquiring an encryption method of the encrypted user name and the encrypted password of the target node server according to the target IP address;
the obtaining module is further configured to obtain a model of the target node server according to the obtained encryption method, the target IP address, and a pre-configured user name and password of the target node server;
the acquisition module is further configured to acquire mapping command names corresponding to the model of the target node server and the name of the target information acquisition command from a pre-established correspondence between the model of the node server, the original command name, and the mapping command name;
the acquisition module is further configured to fill the target IP address, the user name and the password of the target node server as parameter information into a target mapping command corresponding to the obtained mapping command name; encrypting the user name and the password of the target node server in the target mapping command according to the obtained encryption method to obtain encryption information; sending a login request carrying the obtained encryption information to the target node server according to the target IP address information in the target mapping command; receiving login reply information sent by the target node server to realize login of the target node server; and acquiring the target information of the target node server according to the target mapping command.
7. An information acquisition apparatus characterized by comprising: a processor and a memory, wherein the memory has stored therein the following commands executable by the processor:
acquiring an IP address of a target node server as a target IP address, and acquiring a target information acquisition command for the target node server;
acquiring an encryption method for encrypting the user name and the password by the target node server according to the target IP address;
acquiring the model of the target node server according to the acquired encryption method, the target IP address and a pre-configured user name and password of the target node server;
acquiring mapping command names corresponding to the model of the target node server and the name of the target information acquisition command from the pre-established corresponding relation among the model of the node server, the original command name and the mapping command name;
filling the target IP address, the user name and the password of the target node server as parameter information into a target mapping command corresponding to the obtained mapping command name;
encrypting the user name and the password of the target node server in the target mapping command according to the obtained encryption method to obtain encryption information;
sending a login request carrying the obtained encryption information to the target node server according to the target IP address information in the target mapping command;
receiving login reply information sent by the target node server to realize login of the target node server;
and acquiring the target information of the target node server according to the target mapping command.
8. A computer-readable storage medium having computer-executable instructions stored thereon for performing the steps of:
acquiring an IP address of a target node server as a target IP address, and acquiring a target information acquisition command for the target node server;
acquiring an encryption method for encrypting the user name and the password by the target node server according to the target IP address;
acquiring the model of the target node server according to the acquired encryption method, the target IP address and a pre-configured user name and password of the target node server;
acquiring mapping command names corresponding to the model of the target node server and the name of the target information acquisition command from the pre-established corresponding relation among the model of the node server, the original command name and the mapping command name;
filling the target IP address, the user name and the password of the target node server as parameter information into a target mapping command corresponding to the obtained mapping command name;
encrypting the user name and the password of the target node server in the target mapping command according to the obtained encryption method to obtain encryption information;
sending a login request carrying the obtained encryption information to the target node server according to the target IP address information in the target mapping command;
receiving login reply information sent by the target node server to realize login of the target node server;
and acquiring the target information of the target node server according to the target mapping command.
CN201811117352.XA 2018-09-26 2018-09-26 Information acquisition method and device and computer readable storage medium Active CN109240871B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811117352.XA CN109240871B (en) 2018-09-26 2018-09-26 Information acquisition method and device and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811117352.XA CN109240871B (en) 2018-09-26 2018-09-26 Information acquisition method and device and computer readable storage medium

Publications (2)

Publication Number Publication Date
CN109240871A CN109240871A (en) 2019-01-18
CN109240871B true CN109240871B (en) 2021-10-01

Family

ID=65056641

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811117352.XA Active CN109240871B (en) 2018-09-26 2018-09-26 Information acquisition method and device and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN109240871B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102123042A (en) * 2010-12-30 2011-07-13 中国民航信息网络股份有限公司 System configuration intelligent management system and management method thereof
US8737304B2 (en) * 2011-03-01 2014-05-27 Tekelec, Inc. Methods, systems, and computer readable media for hybrid session based diameter routing
CN107329769A (en) * 2017-07-07 2017-11-07 郑州云海信息技术有限公司 A kind of method and apparatus for configuring bare machine server
CN107888696A (en) * 2017-11-24 2018-04-06 郑州云海信息技术有限公司 One kind storage laboratory equipment information acquisition method, system and relevant apparatus
CN108234164A (en) * 2016-12-14 2018-06-29 杭州海康威视数字技术股份有限公司 Clustered deploy(ment) method and device

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102123042A (en) * 2010-12-30 2011-07-13 中国民航信息网络股份有限公司 System configuration intelligent management system and management method thereof
US8737304B2 (en) * 2011-03-01 2014-05-27 Tekelec, Inc. Methods, systems, and computer readable media for hybrid session based diameter routing
CN108234164A (en) * 2016-12-14 2018-06-29 杭州海康威视数字技术股份有限公司 Clustered deploy(ment) method and device
CN107329769A (en) * 2017-07-07 2017-11-07 郑州云海信息技术有限公司 A kind of method and apparatus for configuring bare machine server
CN107888696A (en) * 2017-11-24 2018-04-06 郑州云海信息技术有限公司 One kind storage laboratory equipment information acquisition method, system and relevant apparatus

Also Published As

Publication number Publication date
CN109240871A (en) 2019-01-18

Similar Documents

Publication Publication Date Title
US10812566B2 (en) Distributed steam processing
WO2017114205A1 (en) Short link processing method, device and server
BR112017000863B1 (en) WEBSITE SYSTEM, APPLIANCE AND METHOD FOR ACCESSING THE WEBSITE
US20190130190A1 (en) Media authentication using distributed ledger
RU2754720C1 (en) Method and device for displaying interface
US9614833B1 (en) Automated certificate management for a website associated with multiple certificates
US10673811B2 (en) Updating address mapping for local and network resources
TW201616382A (en) Account login method and device
CN109542862B (en) Method, device and system for controlling mounting of file system
US8843915B2 (en) Signature-based update management
US20180331895A1 (en) Viral System Discovery and Installation for Distributed Networks
WO2019140790A1 (en) Service tracking method and apparatus, terminal device, and storage medium
CN107844488B (en) Data query method and device
US20210099477A1 (en) Identifying Similar Assets Across A Digital Attack Surface
US9781230B2 (en) Broadcast-based update management
US10778636B2 (en) Dynamic credential based addressing
US11418570B2 (en) Robust computing device identification framework
CN112241298A (en) Page display method and device, storage medium and electronic device
CN109240871B (en) Information acquisition method and device and computer readable storage medium
US11153099B2 (en) Reestablishing secure communication with a server after the server's certificate is renewed with a certificate authority unknown to the client
WO2018121164A1 (en) Method, device, and system for creating service numbers
US20150100888A1 (en) Providing a common interface for accessing and presenting component configuration settings
CN109302446B (en) Cross-platform access method and device, electronic equipment and storage medium
US20150295886A1 (en) System for identifying current internet protocol address for a remote computing device
CN111767221A (en) Interface test method, device, equipment and 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
GR01 Patent grant
GR01 Patent grant