|
Answer» Hi
I'm trying to create a batch file that will generate SNMP authentication failures on my system. I can issue this command:
“C:\Program Files (x86)\snmpri\JBb.JMADK\snmp17.2.0.1\eso\w32.bin\getone” –v3 172.16.0.40 admin sysDescr.0
but when I do that, it'll prompt me for my auth and priv passwords. I want to be able to generate a whole bunch of these errors so I don't want to have to enter the auth/priv passwords every time. Is there any way to get the .bat file to do this for me? I tried:
“C:\Program Files (x86)\snmpri\JBb.JMADK\snmp17.2.0.1\eso\w32.bin\getone” –v3 172.16.0.40 admin sysDescr.0 SHA:thisIsMyPassword AES12:thisIsMyPassword
in my batch file (the LAST two lines are the answers to the "what's your auth KEY" and "what's your priv key" questions that come up after issuing the getone command) but I still got the prompts asking these questions and my .bat file complained about the SHA:thisIsMyPassword and AES12:thisIsMyPassword lines.
I HOPE I explained this well enough for someone to make sense of what I'm trying to ask.....Thanks for your help!Try putting the 2 passwords in a text file, in the right order, each on its own line, and using redirection e.g.
Code: [Select]“C:\Program Files (x86)\snmpri\JBb.JMADK\snmp17.2.0.1\eso\w32.bin\getone” –v3 172.16.0.40 admin sysDescr.0 <passwords.txtThank you thank you thank you!!!! That worked!!! Now all I NEED to do is throw it in a loop and voila!!!
Thanks again!!!
|