Answer the question
In order to leave comments, you need to log in
How to add a variable to ru script?
Good day!
There is a python + bash script
Using multigrep, I filtered the required list of poppy addresses and figured out how to get a list of IP (bash) based on
them
How to do it in ru3?
import paramiko
import os
host = "192.168.0.1"
port = 22
username = "root"
password = "passwd"
command = "arp -an |grep 'mac1\|mac2\|mac3\|mac4'"
ssh = paramiko.SSHClient()
ssh.set_missing_host_key_policy(paramiko.AutoAddPolicy())
ssh.connect(host, port, username, password)
# using exec_command
#stdin, stdout, stderr = ssh.exec_command("arp -an |grep 'mac1\|mac2\|mac3\|mac4'")
lines = stdout.readlines()
print(lines)
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question