Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!goblin2!goblin.stu.neva.ru!newsfeed.xs4all.nl!newsfeed2.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.012 X-Spam-Evidence: '*H*': 0.98; '*S*': 0.00; 'filename:fname piece:py': 0.07; 'hosts': 0.07; '#print': 0.09; 'host,': 0.09; 'subject:Help': 0.11; 'def': 0.12; 'ios': 0.16; 'trying': 0.19; 'skip:g 40': 0.19; 'help.': 0.21; 'import': 0.22; 'print': 0.22; 'script.': 0.24; 'login': 0.25; 'mode': 0.30; 'work.': 0.31; 'doc': 0.31; 'anyone': 0.31; 'run': 0.32; 'skip:# 10': 0.33; 'skip:d 20': 0.34; 'subject:with': 0.35; 'received:google.com': 0.35; 'charset:us-ascii': 0.36; 'message-id:@gmail.com': 0.38; 'thank': 0.38; 'to:addr:python-list': 0.38; 'does': 0.39; 'to:addr:python.org': 0.39; 'header:Message-Id:1': 0.63; 'cisco': 0.68; 'can\xe2\x80\x99t': 0.84 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:content-type:subject:message-id:date:to:mime-version; bh=qJ8n+qlm3/KQjHLmyid8V3ziB2I9EGbHsL0Xf21R42A=; b=niS7t7I7jqpNhIU/+04kb0CcR8Ab1tjyaf93uAUCdWGI9RNj8PQ+5kHph7pkIAtXmX ZR1Sf107qx6L27KIiwJhjsDA4dGG/zOBNIvSq/nX5uMvMDU1oq8mooyKgEpvZl0l/Qzr VHs3x7cWTw+2tQuIXIY+Bgm3vj2qOx6EGg6hGZ3bcFQ/nvte4/Znh8wuoUrKwVOPa13N o+TVFZvPfuzEXvyH0qpjrJOKXb61mQ/uCbxT9aauP7IZksz8MYkSgY+2wCualFF+xgPt 5Tze1hwbFObzK0/huq/M8jf4mJpWsLKlIlx7lZnNQ5FvGhsYysfsWk0XPGXLKJZzTCea iroQ== X-Received: by 10.170.45.211 with SMTP id 202mr26951450ykn.53.1417878702854; Sat, 06 Dec 2014 07:11:42 -0800 (PST) From: Edward Manning Content-Type: multipart/mixed; boundary="Apple-Mail=_FF04CB3E-34AF-4721-AFAE-568BDE11D07A" Subject: Help with exscript with Cisco asa Date: Sat, 6 Dec 2014 10:11:40 -0500 To: python-list@python.org Mime-Version: 1.0 (Mac OS X Mail 8.1 \(1993\)) X-Mailer: Apple Mail (2.1993) X-Mailman-Approved-At: Sun, 07 Dec 2014 11:48:30 +0100 X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 61 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1417949312 news.xs4all.nl 2966 [2001:888:2000:d::a6]:43791 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:82050 --Apple-Mail=_FF04CB3E-34AF-4721-AFAE-568BDE11D07A Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 I am trying to login to enable mode on a Cisco ASA with this script. I = can=E2=80=99t seem to get the enable mode to work. Can anyone help. Does = anyone know of a good doc for exscript lib. Thank you=20 Ed --Apple-Mail=_FF04CB3E-34AF-4721-AFAE-568BDE11D07A Content-Disposition: attachment; filename=run-show.py Content-Type: text/x-python-script; name="run-show.py" Content-Transfer-Encoding: quoted-printable =0D =0D from Exscript.util.start import quickstart=0D from Exscript.util.file import get_hosts_from_file=0D from Exscript.protocols.drivers import ios=0D =0D =0D def do_something(job, host, conn):=0D =0D =0D conn.send("enable\r")=0D get_password_prompt(self)=0D print conn.response=0D =0D =0D #conn.execute('sh run | i ipv6-address-pool')=0D #print conn.response=0D =0D =0D =0D =0D hosts =3D get_hosts_from_file('myhosts.txt','ssh')=0D quickstart(hosts, do_something,max_threads =3D 4 )=0D --Apple-Mail=_FF04CB3E-34AF-4721-AFAE-568BDE11D07A Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=us-ascii --Apple-Mail=_FF04CB3E-34AF-4721-AFAE-568BDE11D07A--