python and LAN

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Egor Bolonev

    python and LAN

    Hello, All!

    I wish to write a programs for LAN, but I don't know where to begin.

    For example I have to get a hostlist of my network:
    ....
    192.168.1.35 acca
    192.168.3.38 alligator
    192.168.1.1 alpha
    192.168.2.31 andp-duha
    192.168.5.76 angel
    192.168.2.49 anny
    192.168.3.26 antracit
    192.168.3.35 array
    192.168.5.39 arsen
    192.168.4.64 asperansa
    192.168.2.44 assasin
    192.168.5.17 asterix
    192.168.4.53 baggins
    192.168.2.38 bars
    192.168.4.24 basilio
    192.168.4.28 batchhq
    192.168.5.46 bazuka
    192.168.2.27 benladen
    192.168.2.48 bigmag
    192.168.4.39 bilya
    ....

    How can I do it with python?

    With best regards, Egor Bolonev. E-mail: ebolonev@rin.ru
  • Thomas Guettler

    #2
    Re: python and LAN

    Am Sat, 03 Jan 2004 20:16:09 +1000 schrieb Egor Bolonev:
    [color=blue]
    > Hello, All!
    >
    > I wish to write a programs for LAN, but I don't know where to begin.
    >
    > For example I have to get a hostlist of my network:
    > ...
    > 192.168.1.35 acca
    > 192.168.3.38 alligator[/color]

    What operating system do you use?

    Some systems answer ping to the
    broadcast address, but not all

    ping 255.255.255.255

    If you network is not switched, you
    can listen to the wire by setting
    the ethernet card to promiscuous mode.
    Google for tcpdump.

    But this has nothing to do with python.

    thomas

    Comment

    • Egor Bolonev

      #3
      Re: python and LAN

      Hello, Thomas!
      You wrote on Mon, 05 Jan 2004 16:09:42 +0100:

      TG> What operating system do you use?

      winXP, LAN consists of ~300 pc's, 5 segment, Iam not admin

      TG> Some systems answer ping to the
      TG> broadcast address, but not all

      Is there any modules for LAN in python? How to get list of pc's now working?
      ....[color=blue][color=green][color=darkred]
      >>> f=open('\\\\DEL TA\\upload\\sob aka.swf','rb')
      >>> s=f.read()
      >>> print s[/color][/color][/color]
      CWSнЊ[color=blue][color=green][color=darkred]
      >>> import glob
      >>> glob.glob('\\\\ delta\\upload\\ *')[/color][/color][/color]
      ['\\\\delta\\upl oad\\RAdmin', '\\\\delta\\upl oad\\Norton AntiVirus 2002',
      '\\\\delta\\upl oad\\htm', '\\\\delta\\upl oad\\K&M',
      '\\\\delta\\upl oad\\AVP', '\\\\delta\\upl oad\\From DemoN',
      '\\\\delta\\upl oad\\From Merkava_Mk4 \xec\xf3\xeb\xf c\xf2\xfb',
      '\\\\delta\\upl oad\\Max Payne 2 Bonus', '\\\\delta\\upl oad\\Demoscene' ,
      '\\\\delta\\upl oad\\3DAnalyze' ,
      ....

      With best regards, Egor Bolonev. E-mail: ebolonev@rin.ru

      Comment

      Working...