Sorry, wrong answer. I was wondering myself how to use the script with the
dynamic address allocation and asked this question to the author. I wasn't
the first one to ask and got a "stock reply". Here is a quote:
the critical command line is the
get $local remote 10
<get> the command
<$local> the "variable" (I think that $local $remote $mtu (and maybe
some others.. I would have to look at the src again..) can be set
via this method.. I wanted to change the system to a more "variable"
like system.. insted of a whole bunch of commands...
<remote>|<ask><"or a string"> if remote then it gets it from the serial
line... (it is a mildly intellegent parser if the variable is for a
IP# then it looks for 4 #'s seperated by "."
if $mtu (or any other "number only") then it just gets the first X
digits in a row.. if a "string" variable then it gets the next word
until a " "
So you see, it's smart enough to recognize the ip address when it sees one.
Good job, Paul Mossip!
Here is his sample script:
# Fetch the IP address of our target host.
main:
# Set the desired serial port and speed.
port modem
speed 38400
# Reset the modem and terminal line.
reset
# Prepare for dialing.
send ATZ1\r
wait OK 4
if $errlvl != 0 goto error
dial 932-0801
if $errlvl != 0 goto error
wait CONNECT 60
if $errlvl != 0 goto error
# We are connected. Login to the system.
login:
sleep 3
send \r\n\r\n
wait waller> 20
if $errlvl != 0 goto error
send login\n
wait name: 10
if $errlvl != 0 goto erro
wait ord: 10
if $errlvl != 0 goto error
send password\n
wait waller> 10
if $errlvl != 0 goto error
send slip\n
wait ress: 10
if $errlvl != 0 goto error
send default\n
wait SLIP 30
if $errlvl != 0 goto error
get $local remote 10
if $errlvl != 0 goto error
get $remote waller
done:
print CONNECTED to $remote with address $rmtip we are $local
default
mode SLIP
goto exit
error:
print SLIP to $host failed.
exit:
--
_______________________________________________________
| -Alex Freed (The opinions expressed are my own. |
| However everyone is entitled to them.) |
-------------------------------------------------------