10-22-2012
Why are you using a third-party brute forcing utility to inject stored plaintext passwords into a login system that's supposed to be secure? This is what things like sudo are for...
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I have the code like this :
shell script continues ...
....
expect -c"
spawn telnet $ip
expect "login:"
send \"$usrname\r\"
expect "Password:"
send \"$passwd\r\"
expect "*\>"
send \"$cmdstr\r\"
... (1 Reply)
Discussion started by: robbiezr
1 Replies
2. Shell Programming and Scripting
Hi,
Please share you experience and way out on below error:-->
#!/bin/bash -xv
FILE=login.txt
+ FILE=login.txt
CONNECT=sshlogin.exp
+ CONNECT=sshlogin.exp
SERVERNAME=$1
+ SERVERNAME=192.168.12.1
MyServer=""
+ MyServer=
MyUser=""
+ MyUser=
MyPassword=""
+ MyPassword=
exec 3<&0
+... (6 Replies)
Discussion started by: manish_1678
6 Replies
3. Shell Programming and Scripting
hii,,
I am trying to automate jira. during my scripting using bash script, in the terminal i got the terminal message like this:
"Configure which ports JIRA will use.
JIRA requires two TCP ports that are not being used by any other
applications on this machine. The HTTP port is where you... (1 Reply)
Discussion started by: nithinfluent
1 Replies
4. Shell Programming and Scripting
Hi
I'm trying to run a script " abc.sh" which triggers "use.sh" .
abc.sh is nothing but a "expect" script which provides username and password automatically to the use.sh script.
Please find below the scripts:
#abc.sh
#!/usr/bin/expect -f
exec /root/use.sh
expect "*name*"
send... (1 Reply)
Discussion started by: baddykam
1 Replies
5. Programming
Hi,
Am very new to expect scripting..
Can You please suggest me how to call an expect script inside another expect script..
I tried with
spawn /usr/bin/ksh
send "expect main.exp\r"
expect $root_prompt
and
spawn /usr/bin/ksh
send "main.exp\r"
expect $root_prompt
Both... (1 Reply)
Discussion started by: Priya Amaresh
1 Replies
6. Programming
I have an expect script called remote that I want to call from inside my expect script called sudoers.push, here is the code that is causing me issues:
set REMOTE "/root/scripts/remote"
...
log_user 1
send_user "Executing remote script as $user...\n"
send_user "Command to execute is: $REMOTE... (1 Reply)
Discussion started by: brettski
1 Replies
7. Shell Programming and Scripting
I am trying to execute expect command inside by small bash script to login into servers using key authentication method. My script is as follows:
#!/bin/bash
HOST=$1
/usr/bin/expect -c "
spawn ssh -i /root/.ssh/id_rsa root@$HOST
expect -exact "Enter... (3 Replies)
Discussion started by: John Wilson
3 Replies
8. Shell Programming and Scripting
Hi I have two scripts one is Expect and other is shell.
I want to merge Expect code in to Shell script so that i can run it using only one script. Can somebody help me out ?
Order to execute: Run Expect_install.sh first and then when installation completes run runTests.sh shell script.
... (1 Reply)
Discussion started by: ashish_neekhra
1 Replies
9. Shell Programming and Scripting
i have defined a function ln_s() for customizing the ln command in script1.sh.
more script1.sh
echo "Starting Execution"
./script2.sh
echo "End of Execution"
ln_s(){
] && return
ln -s "$1" "$2"
}
My script1.sh executes another script2.sh which has the following entry
more script2.sh... (12 Replies)
Discussion started by: mohtashims
12 Replies
10. Shell Programming and Scripting
Hi I am trying the following in my bash script which logs into my machine and runs a command. Trying to solve this using expect.
The first expect statement is hit and it enters the address "10.10.0.10" but when the second expect statement is hit it exits
#!/bin/bash
expect -c '
spawn... (2 Replies)
Discussion started by: skorada
2 Replies
LEARN ABOUT DEBIAN
test::expect
Test::Expect(3pm) User Contributed Perl Documentation Test::Expect(3pm)
NAME
Test::Expect - Automated driving and testing of terminal-based programs
SYNOPSIS
# in a t/*.t file:
use Test::Expect;
use Test::More tests => 13;
expect_run(
command => "perl testme.pl",
prompt => 'testme: ',
quit => 'quit',
);
expect("ping", "pong", "expect");
expect_send("ping", "expect_send");
expect_is("* Hi there, to testme", "expect_is");
expect_like(qr/Hi there, to testme/, "expect_like");
DESCRIPTION
Test::Expect is a module for automated driving and testing of terminal-based programs. It is handy for testing interactive programs which
have a prompt, and is based on the same concepts as the Tcl Expect tool. As in Expect::Simple, the Expect object is made available for
tweaking.
Test::Expect is intended for use in a test script.
SUBROUTINES
expect_run
The expect_run subroutine sets up Test::Expect. You must pass in the interactive program to run, what the prompt of the program is, and
which command quits the program:
expect_run(
command => "perl testme.pl",
prompt => 'testme: ',
quit => 'quit',
);
expect
The expect subroutine is the catch all subroutine. You pass in the command, the expected output of the subroutine and an optional comment.
expect("ping", "pong", "expect");
expect_send
The expect_send subroutine sends a command to the program. You pass in the command and an optional comment.
expect_send("ping", "expect_send");
expect_is
The expect_is subroutine tests the output of the program like Test::More's is. It has an optional comment:
expect_is("* Hi there, to testme", "expect_is");
expect_like
The expect_like subroutine tests the output of the program like Test::More's like. It has an optional comment:
expect_like(qr/Hi there, to testme/, "expect_like");
expect_handle
This returns the Expect object.
expect_quit
Closes the Expect handle.
SEE ALSO
Expect, Expect::Simple.
AUTHOR
Leon Brocard, "<acme@astray.com>"
COPYRIGHT
Copyright (C) 2005, Leon Brocard
This module is free software; you can redistribute it or modify it under the same terms as Perl itself.
perl v5.12.3 2011-06-12 Test::Expect(3pm)