-1

I've recently been thinking of projects to start, and I've settled on an OS fingerprinting tool. I know that the OS can be determined by matching TTL and TCP window size, but I don't know the most efficient way to cross-reference that information to identify the OS.

My idea so far is to have a text file containing the different fingerprints, and once the TCP traffic is captured, cross-reference it with the contents of the text file. But this method seems too bulky and slow. I thought of having some basic fingerprints built in and then cross-referencing text files within some structured sub-directories, but this also seems like a shoddy workaround.

At its core, my question is this; What is the best and most efficient way to query a large amount of information for specific information using Python?

Side note: I know that Scapy can be used with Nmap and P0f, but I'd like to avoid using these.

The Defalt
  • 69
  • 8

1 Answers1

0

I know it's a headshot answer but I can't keep silent. Answering on your question How to query from a large amount of information (Python) literally I would recommend to read from special device /dev/urandom. The code can be looks like this:

information = ''
with open('/dev/urandom', 'b') as fi:
    while True:
        buf = fi.read(4096)
        if len(buf) == 0:
            break
        information += buf
frist
  • 1,918
  • 12
  • 25