dictionary - using Python/Pexpect to crawl a network -
This is a logical thinking problem rather than coding. I have some working code blocks already working on one device - Telnet on a device that parses the result of a command that organizes the dictionary etc., now says that I want to analyze the network with unknown nodes I, A, B, C etc. (but I only know about 1)
I give my code block node a. The result is a table with B, C; I save it in a dictionary
Then I want to use that first entry (B) as a goal and see what this can see. Possibly add D, E, etc. and those (if any) add to the dictionary
And then in this new populated dictionary do the same on the next node. The final output will be that only all nodes Visited, and all the devices viewed have been entered in this (or other) dictionary.
Although I can not understand how it grows as well, and I can not understand how to avoid seeing more than one device.
I understand that this is clear to me, I have explained, sorry if it is confusing
Are you looking at graph algorithms, specifically or are you specifically asking about the implementation details about algorithms, or more?
Recycling will be a very clean way of doing this.
looked = {} def DFS (node): For neighbors in the node. Despicable (): If the neighbor did not see: [Neighborhood] = Some_info_bout_infgh DFS (neighboring)
Comments
Post a Comment