password-protection

Uninstallation password

懵懂的女人 提交于 2019-12-07 09:55:10
问题 I am making one phone security application in android. The point where I stuck is that How to set uninstall password for this app. When application is installed user can set the security password and this password will be used for uninstalling this app. So please someone suggest me how to put code for uninstall event.? Is there any event or service called when apps are going to uninstall.? 回答1: No, sadly there is no uninstall event that you can catch for your own app. You can only watch the

From Password Protected Excel File to Python Object

前提是你 提交于 2019-12-06 12:38:19
问题 I am using Windows 7, Python 2.7 and Microsoft Excel 2013. I know from here that I can open and access a password protected Excel sheet using the below sample code: import sys import win32com.client xlApp = win32com.client.Dispatch("Excel.Application") print "Excel library version:", xlApp.Version filename, password = sys.argv[1:3] xlwb = xlApp.Workbooks.Open(filename, Password=password) # xlwb = xlApp.Workbooks.Open(filename) xlws = xlwb.Sheets(1) # counts from 1, not from 0 print xlws.Name

Password Protection of PDF Files

元气小坏坏 提交于 2019-12-06 12:10:18
问题 We have a requirement to protect PDF files using a password. Are there any Java-based, open source tools which will help us in this regard? 回答1: I would recommend using the iText java PDF library. Inside iText, there is a class called PdfEncrypter which should let you password protect a PDF file. 回答2: You can easily make the Password protected pdf file in java......to do so you will require two addtional jar/lib bctsp-jdk16-1.46.jar and bcprov-jdk16-1.46.jar along with the itextpdf-5.2.1.jar.

How can I password protect a binary file download?

▼魔方 西西 提交于 2019-12-06 11:58:29
I would like to create a very simple php protector on an arbitrary binary file, where the user enters a password and the file is downloaded to their computer, but they must enter the password each time they want to download. In the first answer to the question Easy way to password-protect php page , the line include("secure.html"); seems to require that the file has to be displayable ascii, renderable by the browser. Is there a way to protect a binary file, say foo.bin with the same level of simplicity (and similar limited degree of security)? Matthew Camp Set the folder to where your file is

Protecting an email password when using NLog

纵饮孤独 提交于 2019-12-06 10:26:29
问题 When using NLog as a logging instrument we can easily send messages via email, for example this is the example configuration for using Gmail as a smtp server: <targets> <target name="gmail" type="Mail" smtpServer="smtp.gmail.com" smtpPort="587" smtpAuthentication="Basic" smtpUsername="user@gmail.com" smtpPassword="password" enableSsl="true" from="emailaddress@gmail.com" to="recipient@example.com" cc="alice@example.com;bob@example.com;charlie@example.com" /> </targets> <rules> <logger name="*"

Making a downloadable file password protected on webpage

China☆狼群 提交于 2019-12-06 09:49:04
I want to make a webpage which has download option for a pdf, but i want it password protected i.e. if someone clicks on that link he has to enter username and password and if he directly open the link "www.example.com/~folder_name/abc.pdf" then server ask for password first and then allow to download Edit: I want user to view the file in browser, not to force it to download here is my code <?php /* authentication script goes here*/ $file = 'http://example.com/folder_name/abc.pdf'; //header('Content-Description: File Transfer'); header('Content-Type: application/pdf'); header('Content

Howto save a password in the registry

寵の児 提交于 2019-12-06 09:11:07
问题 I have a desktop application with a remote interface. The access to the remote interface is secured by a username and password. What would be the best way to save these password securely, preferably in the registry? 回答1: You would need to save the hashed password (be it in the registry or somewhere else). Then when the user enters their password you check the hashed version of what they enter with the hashed version as stored. If these match then the passwords match and you can let the user

VBA - Check if a workbook is protected before open it

不羁岁月 提交于 2019-12-06 01:59:34
问题 Is there a way to check if a workbook is protected before try to open it. Here is my code but I have no Idea of the way (if it is possible) Sub MySub() Dim Wb As Workbook For i = 14 To Cells(Rows.Count, 1).End(xlUp).Row 'I Would like to check if the workbook is Protected here Set Wb = GetObject(Cells(i, 4).Value) Wb.Open End Sub Note : In this code Cells(i,4).Value will be equal to the workbooks path.. 回答1: Had a bit more of a think about this and came up with the following - although will

Bash script to skip extraction of password protected archives

帅比萌擦擦* 提交于 2019-12-06 00:31:30
I have a script, which performs mass extraction of specific zip and\or tar.gz archives in some folders using command: unzip -o "$zip_path" -d "$destination_folder" Unfortunately, when archive is password-protected, script stops and waiting for password input. Is there any way to omit password entering stage to not interrupt script running? P.S. There is no need to extract password-protected files. Only omit this archives. Something like: if "$zip_path" [ determine that archive is password-protected ]; then echo "Password-protected" elif "continue script execution" fi For zip files, you can

BadPasswordException when filling out pdf with iTextSharp

末鹿安然 提交于 2019-12-06 00:04:29
问题 I have a third-party PDF file with some form fields, that I need to fill out programmatically. PDF file is secured. Detailed security settings: SecurityMethod: Password Security, Document Open Password: No, ... Form Field Fill-in or Signing: Allowed... When I'm trying to open and fill out the document manually, everything is ok, and I'm not asked for any password. But with the code, it fails with exception. Here's the code (I'm using iTextSharp library): var str = new MemoryStream(); var