Python Forum
Multithread telnet not working Parallel
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Multithread telnet not working Parallel
#2
what if u indent lines 52 & 53 ...
with open('zyxel.txt','r') as ipfile:
        for sr_no, line in enumerate(ipfile, start=1):
            ip = line.strip()
            th = threading.Thread(target = open_telnet ,args = (ip,))
            th.start()
            threads.append(th)
        for thr in threads:   #indent this line
            thr.join()        #indent this line
the code likely started & joined each thread simultanously, could be the main reason why scripts works sequentially
swallow osama bin laden
Reply


Messages In This Thread
Multithread telnet not working Parallel - by anna - Feb-01-2018, 11:02 AM
RE: Multithread telnet not working Parallel - by ka06059 - Feb-04-2018, 06:11 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  telnet from ssh tunnel oldfart 3 8,974 Jul-17-2020, 02:28 PM
Last Post: noobami99
  telnet to a device under tacacs management kang18 0 2,138 Jun-05-2020, 06:11 AM
Last Post: kang18
  3.6 telnet eyler 3 12,566 Jun-28-2019, 05:22 AM
Last Post: Khanhamid90
  Any suggestion on python library to use for both ssh and telnet? lord_mani 4 5,245 Jun-25-2019, 04:07 PM
Last Post: gb74razor
  telnet question jacklee26 2 3,350 Mar-30-2019, 06:45 AM
Last Post: jacklee26
  Retrieve output from telnet command Networker 1 5,353 Mar-12-2019, 01:36 PM
Last Post: searching1
  Aggregate multiple telnet connections Jibeji 1 5,292 Mar-02-2018, 07:21 PM
Last Post: mpd
  Python telnet script for IP list mangesh 1 93,023 Jun-26-2017, 11:12 PM
Last Post: DeaD_EyE
  Need advice: UDP? TCP? Multithread? Guybrush 5 6,472 Apr-28-2017, 08:04 PM
Last Post: wavic

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020