Programming :: Perl - Way To Encrypt Command-line Input When User Enter A Password ?

Nov 4, 2010

I need user to input a password through command line in Windows cmd prompt. Is there a way to encrypt the input (such as put it into ......) when user is typing ?

View 2 Replies


ADVERTISEMENT

Programming :: Create A Simple Program With Will Continually Read Input From The User Until They Enter A Blank Line?

Apr 6, 2011

basically i have to create a simple program with will continually read input from the user until they enter a blank linei know how to read in certain input but not sure how to get it continually in a loop

View 2 Replies View Related

General :: Crypt() Perl Function To Encrypt Password In Shell Scripts Or Encrypt Passwords?

Jan 8, 2010

I Have shell script like this

Code:
#!/usr/bin/expect
set password "XXXXXXXX"

[code]...

View 13 Replies View Related

General :: Didn't Show The Line To Enter The User Name And The Password?

Feb 21, 2011

I have downloaded the backtrack 4 r2 but when I started it, it didn't show me the line to enter the user name and the password

View 5 Replies View Related

Programming :: Bash - Read User Input: URLs Without The Enter Key Stroke?

Sep 23, 2010

Here's a challenge I've been struggling for months with:

I have a bash script that reads URL addresses of our internal server and then executes some test commands on them. Something like this:

Code:
read -p "Enter URL: " url
sh execute-what-ever-to $url

After copy-pasting the URL the user taps the enter key and the script proceeds, but here comes the tricky part: I want this to work without the need to press the enter key after copy-pasting the URL.

"read -n" does not work in this case, as the URLs vary greatly in length. However, the URLs always end to the same string. They could be like "http://url1/END", "http://url2/END" and so on. So this ending string "END" could be theoretically used to recognize that the whole URL has been pasted.

View 2 Replies View Related

General :: Can't Input Password In Command Line (ubuntu)?

Sep 19, 2010

When Linux ask for my password in command line,my keyboard becomes unresponsive just for that moment or let me put it this way,until i need to write my password my keyboard is unresponsive,but for all other things is fine.or for example,i can input my password when i have a graphic interface but i can't with command line or i can't login to my computer from command lineexcuse me if my question is doll,i moved from windows to ubuntu just lastweek,( & i am flying high in sky with ubuntu & digging a very deep hole for windows too!!.)

View 2 Replies View Related

Programming :: How To Enter Mode Column From Command Line

Mar 3, 2009

I like running sql queries from the command line.

Code:
sqlite3 foo.db "select * from some table"
How can I specify

Code:
.mode column
at the command line?

View 1 Replies View Related

Programming :: Take A Single Line Of Input From User In Shell Script?

Mar 10, 2011

How do i take a single line of input from the user in a shell script?

View 3 Replies View Related

Fedora :: Terminal Won't Let Enter Password After Enter Sudo Command ?

Jan 12, 2011

I am pasting sudo commands without problems as a user (ales in my case) and then immediately the ask the user password.

The keyboard seems to be dead, no keys work, not allowing me to enter the password.

View 6 Replies View Related

Programming :: Running Gcov When Executable Has Command Line Input Options

Mar 3, 2011

I have an executable with input options, like so:
Code:
./executable -n 42 -s 42
I've added gcov to the makefiles (compiling with --coverage, -fprofile-arcs, and -ftest-coverage, and linking with -lgcov). It builds fine and creates executable.gcno.

When I try to run gcov, gcov things the options belong to it:
Code:
$ gcov ./executable -n 42 -s 42
gcov: invalid option -- 's'
Usage: gcov [OPTION]... SOURCEFILE...
When I use quotes this happens:

Code:
$ gcov './executable -n 42 -s 42'
executable -n 42 -s 42.gcno:cannot open graph file

The command line options must remain. How can I get gcov to generate the same .gcno file it later looks for?

View 2 Replies View Related

Programming :: Bash Scripting With Sudo / Password Prompt And Accepting User Input?

Jul 30, 2011

I'm creating a bash script to do some tasks for me. I would like the script to be run at a set time of everyday. My first question is if it is possible that if one of the commands in the script requires sudo, is there a way to get around it with out making sudo not require a password. Such as, is there a way to include the password in the script? If that is the case, I can always just set the file as read only by sudo. I've been looking for a way to do this, with no success. if I have a command that wants input, how do I give it to the program. For example, if I want to make a zip file that is encrypted, the command would go as:

Code:

zip -r example * -e

now how would I get the script to insert my wanted password.

View 14 Replies View Related

Programming :: Write A Perl Script Which Will Give An Interactive Session To A User To Execute Command On The Server

Feb 25, 2011

I am trying to write a perl script which will give an interactive session to a user to execute command on the server. I have written a small script to do this :

Code: !/usr/bin/perl -w
use strict;
use Net::SSH::Perl;
my $host = '192.168.1.1';
my $username = 'user';
my $login_passwd = 'test123';

[Code]...

View 2 Replies View Related

Programming :: Perl Script To Replace Line After Finding Previous Line

Feb 28, 2011

At the moment I have a flat file which is being used by a few people. I want a script to remotely change the file, so I can start logging who is doing what.At this point here is one requirement I am trying to develop. We have text blocks who pretty much look like.I hope this is somewhat clear. I try to find $param for the right $workflow and change that. Can you help me to find $$var3 and change that?

View 1 Replies View Related

Programming :: Perl - Delete Line From Text File With Duplicate Match At Beginning Of Line

Apr 1, 2009

Was wondering if any perl guru's could help me with a quick log file adjustment. I have a text file that looks like so (tabs and newlines are revealed so you can see what separates the data):

There are maybe 100 lines of text in this file at any given time. I need to delete all duplicate lines only looking at the first bit of text prior to the first tab. It doesn't matter which one gets deleted as long as there are no two lines that begin with that same text at the beginning before the first tab. So in this example, either the fist line "1234" or the last line "1234" would need to be deleted. I already have code in my script that opens the files - I just need the code to read the text into an array and the part that would find matches based on the above criteria, and make the deletions.

If it would be easier, I can even do a system call and use SED (v4.1.5) and/or AWK (3.1.5) instead.

View 7 Replies View Related

Programming :: Bash Shell Read User Argument From Command Line And Test It

Aug 29, 2010

Trying to create a small script that will read user's input, test if user entered some input and if not display some message or display a text using user's input.

The script is the following but i get an error saying "[: 6: =: argument expected"

View 12 Replies View Related

Programming :: Perl Script To Read Line By Line

Aug 2, 2011

I just learn perl script.May i know how to simplify the code below especially in the red color part? i saw some examples in internet, they use "next" command.

View 20 Replies View Related

General :: Use This Command It Will Ask The User To Enter Year In Command?

Apr 4, 2011

i want in the website they ask to enter some input.Code:echo -e "<p>Please Enter Year : c</p> "read Yearif i use this command it will ask the user to enter year in command. but what i want is they ask the user to enter year in web browser.

View 14 Replies View Related

Programming :: Passing Perl Variable Into Input Tag In Cgi Script?

Aug 27, 2010

How can I to pass a perl variable into html input tag? For example, If a have got a cgi script:

Quote:

use CGI;
use DBI;
my $owner = $cgi->param('owner');

[code]....

How can I to pass $owner variable?

View 1 Replies View Related

OpenSUSE :: Require A User To Enter Password To Open Terminal?

Sep 21, 2010

I'm in the process of configuring a "guest" account for houseguests tose my computer. I've got the file permissions set, but I'd also like to restrict their access to the terminal. It seems to me that most of the damage that can be done to a computer goes through the terminal.I downloaded Pessulus (I use Gnome)but it doesn't require a password. the profiled user can just open Pessulus and alter their profile -- what's the point?Is there a way I can require a user to enter a password, either for any terminal or Pessulus?I like Pessulus -- it's concise and easy to use. But it doesn't seem very secure as I understand it.

View 5 Replies View Related

Software :: When Enter The User Name And Password, Instead Of Logging Into The Console, It Again Redirects?

Jun 2, 2011

I have installed the new phpMyadmin3.4.1 on a server running Ubuntu 9.10 with apache and mysql. It runs on php5.2.10The apache config seems fine as the virtual directory that I configured works fine. http://<ip-of-server>/phpmyadminlink works. The home page is displayed. But when I enter the user name and password, instead of logging into the console, it again redirects me to the index page of the site. There are no errors displayed. I have checked that cookies on browser are enabled.The server is hosted on amazon web services, if that makes any difference

View 7 Replies View Related

CentOS 5 :: Enter Password For Root User - SSH Access Denied

Apr 18, 2011

I have a new CentOS server install. I am trying to connect from a windows xp box using putty ssh. I can get as far as putting in the password for root user and then it tells me access denied.

View 2 Replies View Related

Programming :: Perl: Compare CGI Input With Data From A MySQL Table?

Nov 19, 2008

I have this program:

#! /usr/bin/perl
use DBI ;
use strict ;

[code]....

and I get this error simply running the program from the command line: DBD::mysql::st execute failed: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1 at ./submit.cgi line 24.

is this the right syntax to use, both, for this line:

my (@param) = $cgi->param("firstname","lastname","type") ;

as well as this one:

$sth=$dbh->prepare ("SELECT firstname,lastname,type FROM dts WHERE firstname LIKE $param[0] AND lastname LIKE $param[1] and type LIKE $param[2]" );

or should there be quotes around the $param[0] or something? (also is it $param[0] or $param(0)?)

View 1 Replies View Related

Programming :: Standardize A Perl Script So That Can Use It No Matter How Many Input Files

Mar 21, 2010

I need write a script that can compare multiple input files and output a file. The basic idea is:1: All my input files are in the same format2: I want to find in-common lines (in-common 1) from some of my input files (e.g., input1, 2 an 3), and find in-common lines (in-common 2) from the rest of my input files (e.g., input 4,5,6,7). And then, compare in-common1 and in-common2 and remove any overlap from in-common 1.3: Output the remaining in-common 1 file after removing any of its overlap with in-common 2I know how to write this script by putting all the filenames in one script and compare them. But the thing is, if I have more input files, such as 100, it might not be that efficient to write all filenames in one script and compare them.

I am wondering if there is any way to do such as:1: put all input filenames in a text file (file1)2: write a script3: Everytime, when I run this script, it will read in file1 directly no matter how many input files I have, give an output.I want this because I will have more and more input files and I don't wanna add multiple lines in the script just for reading the new inputfiles and compare them with the previous files. So, I guess this is something related to making my script a package or standardize it and make it easy to use in the future no matter how many input files I will have.

View 5 Replies View Related

Ubuntu :: Sudo Permisiion Denied, Even Enter Super User Password?

Aug 2, 2011

i trying to create file in /usr/local from below command"sudo df | grep /dev > dev_string.txt"First it asked for sudo password. I enterd sudo password. but I was not able to create the file dev_string.txt .Next time onwards it not asking sudo password also.the below execution flow

##################################################
/usr/local/$ sudo df | grep /dev > dev_string.txt
bash: dev_string.txt: Permission denied

[code]....

View 9 Replies View Related

Ubuntu :: Password Doesn't Work To Enter Super User Mode In The Terminal

May 8, 2010

My password doesn't work to enter super user mode in the terminal. this password works for all other administartive uses in and out of the terminal, just not for entering super user mode.

View 8 Replies View Related

General :: No Prompt For Root Password After Attempting To Enter Single User Mode?

Jul 13, 2011

I followed instructions to enter single user mode by adding single at the end of kernel line but after that it doesn't ask for root password but brings up the sh# prompt. Isn't that supposed to be insecure? I understand for this the grub password can be applied but even after adding "single" it should ask for root password..or it should not..??

View 3 Replies View Related

Ubuntu :: Run Perl File From Command Line?

Jul 24, 2010

I'm trying to run a perl script found at http://wiki.scribus.net/index.php/Web_optimised_PDF.

running "compress-newsletter.pl input.pdf" produces the result:

-bash: compress-newsletter.pl: command not found

View 4 Replies View Related

General :: Perl Command To Replace String By Line Numbe?

Jul 10, 2010

I want to know the Perl command to replace a string by pointing the line number. I know how to replace a string without pointing a line number but I am in need to replace only the two matching string in a file

View 6 Replies View Related

Programming :: Using Perl - How To Chomp Every 2nd Line

Feb 4, 2010

I'm trying to chomp the new line character off of every 2nd line in a CSV file

[code]...

The above code gives me this error: Filehandle FILE opened only for output at SCR.pl line 7.

View 14 Replies View Related

Debian Programming :: How To Do Code Bash Script To Run Su And Enter Password

Sep 15, 2014

Whats the bash script for like, how synaptic package manager runs ..

When you run synaptic it ask for root password ..

How do I do this in bash script?

View 5 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved