[rancid] FortiGate login banner

2018-10-16 Thread Ni Ne
If you configure a login banner to FortiGates, you have to accept it before you 
can login to the device. This pops up after entering the password, and you are 
prompted with:

$banner-message
(Press 'a' to accept):

I successfully tested these small changes to fnlogin (version 3.8, build 3763) 
to automatically accept the login banner. The lines between the hash-marks were 
added to the fnlogin script.

---

-re "@\[^\r\n]+\[Pp]assword:"   {
  # ssh pwd prompt
  sleep 1
  send -- "$userpswd\r"
  exp_continue
}
-re "$p_prompt" {
  sleep 1;
  if {$uprompt_seen == 1} {
send -- "$userpswd\r"
  } else {
send -- "$passwd\r"
  }
  exp_continue
}
### accept banner
"(Press 'a' to accept):" {
send "a\r"
exp_continue
}
### accept banner /end
-- "$prompt"{ break; }
 }
}
set in_proc 0
return 0
}

---

Regards,

-Aaron
___
Rancid-discuss mailing list
Rancid-discuss@shrubbery.net
http://www.shrubbery.net/mailman/listinfo/rancid-discuss


[rancid] fortigate login

2018-04-03 Thread heasley
A user recently reported a problem with fnlogin to a Fortigate device.
While they have reported the changes to fnlogin are working for them,
I'd welcome confirmation from other users.  The problem was primarily
in the initial prompt matching.

http://rancid.shrubbery.net/rancid/svn/rancid/trunk/rancid/bin/fnlogin.in
OR
ftp://ftp.shrubbery.net/pub/rancid/alpha/rancid-3.99.99.tar.gz

tia.

___
Rancid-discuss mailing list
Rancid-discuss@shrubbery.net
http://www.shrubbery.net/mailman/listinfo/rancid-discuss