Infoblox’s global team of threat hunters uncovers a DNS operation with the ability to bypass traditional security measures and control the Great Firewall of China. Read about “Muddling Meerkat” and the many other threat actors discovered by Infoblox Threat Intel here.

Automation Scripts


Hit enter after a send_command in python/netmri

New Member
Posts: 1
2631     0

Hi Team,


I'm trying to write a python script in netmri to copy dap.xml file from ASA to my FTP server but once I issue copy it will ask for multiple prompt (we need just press 'enter' for 4 to 5 times) but I couldn't do this, could you please help? I've tried /r,/n and combination but no luck Smiley Sad


# Script-Filter:
# true


from python_helper import send_multiline
from python_helper import init_helper
from pprint import pprint
import re

# initiate API connector
cli = init_helper(api_url, http_username, http_password, job_id, device_id, batch_id)


#get current dap xml file
sh_disk = cli.send_command('sh disk0: | include dap.xml')

#Copy dap file to ftp

#cli.send_command('copy disk0:dap.xml ftp://ftpuser:ftppw@$device_dap.xml\n\n\n')




vpn-rnd-1# sh disk0: | include dap.xml
352 59869 Mar 24 2020 04:28:20 dap.xml
290 9468 Jun 21 2018 11:47:16 original_dap.xml


vpn-rnd-1# copy disk0:dap.xml ftp://ftpuser:ftppw@$device_dap.xml

Source filename [dap.xml]?

*** Job Failed Due to Timeout ***

Re: Hit enter after a send_command in python/netmri

Posts: 115
2632     0

Change the "\n" to "\r"

Follow me on LinkedIn:
Showing results for 
Search instead for 
Did you mean: 

Recommended for You