passwords

UIWebView passing username and password into a form

无人久伴 提交于 2019-12-11 13:52:14
问题 I have a UIWebView set up containing my universitys intranet page, my code will pass in my username fine (as it is a number) NSString *studentNumber = @"639909"; NSString *javaScriptNumber = @"document.getElementById('username').value=%@;"; javaScriptNumber = [NSString stringWithFormat: javaScriptNumber, studentNumber]; [webViewInt stringByEvaluatingJavaScriptFromString: javaScriptNumber]; However when i try to run the same code to fill in the password field, it will only work with numbers,

How to get a password with a CLI program?

风格不统一 提交于 2019-12-11 13:48:45
问题 I am writing a Linux CLI program. I need to get a password from the user and, obviously, I don't want the password to be echoed to the console. There are several solutions available here, but they are all for plain C. C command-line password input How to mask password in c? Getting a password in C without using getpass (3)? How can those be adapted for C++, using std::string instead of char[]? What would be the most elegant C++ solution? 回答1: Use any of the plain C solutions: std::string pass

Install4j: how to specify a password value in Java Invocation of Launcher

…衆ロ難τιáo~ 提交于 2019-12-11 13:23:47
问题 In Install4j , I have a form to let the user configure a login/password (with the variable names: login and password ) Then I want to create a launcher using the login/password values in Java Invocation Launcher. See the screenshot below. How can I debug to see the value of these arguments after the installation ? The ${installer:password} is really the entered value by the user ? 回答1: You probably use a "Password field" form component. The bound variable for a password field component is not

R Import - CSV file from password protected URL - in .BAT file

两盒软妹~` 提交于 2019-12-11 13:16:53
问题 Okay - so here is what I'm trying to do. I've got this password protected CSV file I'm trying to import into R. I can import it fine using: read.csv() and when I run my code in RStudio everything works perfect. However, when I try and run my .R file using a batch file (windows .bat) it doesn't work. I want to use the .BAT file so that I can set up a scheduled task to run my code every morning. Here is my .BAT file: "E:\R-3.0.2\bin\x64\R.exe" CMD BATCH "E:\Control Files\download_data.R" "E:

phpass CheckPassword using different salts?

有些话、适合烂在心里 提交于 2019-12-11 13:16:38
问题 I have a site with a user area and admin area. In the admin area, I have a page for creating users and a page for creating admins. On the users and admins pages, I used the code below to hash passwords: $hasher = new PasswordHash(8, false); $password = $HTTP_POST_VARS['password']; $hash = $hasher->HashPassword($password); $HTTP_POST_VARS['password'] = $hash; For the user page, the code to check the password is: $hasher = new PasswordHash(8, false); $check = $hasher->CheckPassword($password,

Linux/Python: How can I hide sensitive information in a Python file, so that developers on the environment won't be able to access it?

 ̄綄美尐妖づ 提交于 2019-12-11 12:48:44
问题 I've got a Django project running on an Ubuntu server. There are other developers who have the ability to ssh into the box and look at files. I want to make it so that the mysql credentials and api keys in settings.py are maybe separated into a different file that's only viewable by the root user, but also usable by the django project to run. My previous approach was to make the passwords file only accesible to root:root with chmod 600 , but my settings.py throws an ImportError when it tries

How do I start an SSH session locally using Python?

让人想犯罪 __ 提交于 2019-12-11 12:41:18
问题 What I mean to ask is, if I am on System "A" (Linux) and I want to ssh into System "B" (Windows): On System "A", I can do ssh admin@xx.xx.xx.xx which will prompt me to a password and when that gets authenticated, I will get to the "$" of System "B" (on System "A"). how do I send username and password together as a single line (since I want to use a script) How to achieve the scenario that I have above. 回答1: I generally do it with Paramiko, its easier import paramiko # ssh print 'enter ssh'

Using wget to download directories over FTP, but not passing the password as a parameter

拥有回忆 提交于 2019-12-11 12:30:05
问题 When I don't have SSH access to a server, I usually download stuff over FTP, like this: wget -r ftp://user:pass@server/path/to/dir How do I keep my password more secure? I don't like that the password is in the command, but when I try something like this: wget -r ftp://user@server/path/to/dir it doesn't work. It gives me "Login incorrect". 回答1: You can put your credentials in ~/.wgetrc like so: ftp_user = user ftp_password = pass Depending on your needs, it is also possible to use a different

hashing passwords with pbkdf2 crypto does not work correctly

人走茶凉 提交于 2019-12-11 12:24:15
问题 Password security is not my strong suit. Please help me out. I use node.js 4.2.3 express 4.13.3. I found some examples to hash and salt passwords with crypto's pbkdf2. Here is my code. var salt = crypto.randomBytes(10).toString('base64'); console.log("salt > "+salt); crypto.pbkdf2(pass, salt , 10000, 150, 'sha512',function(err, derivedKey) { pass = derivedKey.toString('hex'); }); The final derivedKey does not include the salt. What am I missing? Should I join the two strings manually before

SFTP to a remote location without a password/key pair

北城以北 提交于 2019-12-11 12:21:32
问题 We are trying to provide an SFTP adapter in a Spring based environment to transfer files from local to either local or remote server.But, we dont have any password configured for the users in the remote location. All implementations like apache-commons VFS or Jsch require password or private key pairs to do file transfer. We cannot configure a password to the users now as that would need multiple changes in other APIs from which we get the user infromation. How do you suggest we tackle it?