ShoreTel IP Migration Script by Aaron Surina

#Author: Aaron Surina aaron\@surina.org
#Email with addons, i have the cygdrive parameters configured also
#automation with cygwin using Net::Telnet and perl- Cheers
#——————————————————————————
# cat st-pwn.pl
# use Net::Telnet;
print “\n\n”;
$count = 20; #start at the first phones last octect 10.31.0.20 is 20
while ($count <= 36) #How many phones to script .
{
print “#—————————————————–\n”;
print “#use Net::Telnet;\n”; #This one line will need uncomment after

#print “chop(\$ipblock = <STDIN>’);\n”; #alternative ip insertion
print “#print \”\$ipblock = \”10.0.31.$count;\”;\n”;

#Above – This 10.0.31. needs to reflect your network ip block

print “\$telnet = new Net::Telnet ( Timeout=>10,
Errmode=>’return’);\n”;
print “\$host = \”10.8.31.$count\”;\n”;
print “\$telnet->open(\”10.8.31.$count\”);\n”;
#print “\$telnet->open \(\”\$host\”);\n”;
print “\$telnet->cmd(\”dhcpEraseCache\\nreset\\n\”);\n”;
print “sleep(2);\n”;
print “\$telnet->cmd(\”\^\]\\n\”);\n”;
#print “\n\n”;
#print “sleep(2);\n”;
print “\$telnet->close(\”\$host\”);\n”;
print “print \$host;\n”;
$count++;
print “print \”Probe – \$host\”;\n”;
#print “print \”\n\@arr \n\@arr2 \n\”;”;
#print “\$telnet->close or die \”close fail: \$!\”;\n”;
print “\nsleep(1);\n”;
print “#—————————————————————————–\n”;
print “#This script is for migrating shoretel VoIP networks\n”;
print “#Author: Aaron Surina aaron\@surina.org\n”;
print “#——————————————————————————\n”;
print “#Connecting to host number: “;
print ($count);
print “\n”;
#print “}\n\n”
}


No Comments so far.

Leave a Reply