Tag: encryption

Excel到SQL安全

我在Excel模块中使用下面的VBA脚本来允许使用预编程的用户名和密码连接到SQL服务器。 连接运行一个基本的select查询,但是我需要隐藏或encryption密码。 我能想到的唯一方法是将密码隐藏在另一张表中,lockingVBA或从包含密码的共享驱动器调用文本文件。 然而这些方法似乎仍然不安全。 有谁知道更好的安全方法,可以在Excel VBA中实施? Sub ConnectSqlServer() Dim txt As String txt = Sheets("Sheet1").Range("D1").Value If txt Like "*[AZ]*" Or txt Like "*[;]*" Or txt Like "*[""]*" Then a = MsgBox("Invalid" & vbNewLine & "Try again", okonly + vbCritical, "SECURITY WARNING") Exit Sub Else End If Dim conn As ADODB.Connection Dim rs As ADODB.Recordset Dim […]

java.lang.ClassNotFoundException:org.apache.poi.poifs.crypt.agile.AgileEncryptionInfoBuilder

我正在使用Apache Poi.3.10-FINAL jar生成Excel Sheet.I尝试使用下面的代码密码保护。我越来越像这样的错误。 Exception in thread "main" org.apache.poi.EncryptedDocumentException: java.lang.ClassNotFoundException: org.apache.poi.poifs.crypt.agile.AgileEncryptionInfoBuilder at org.apache.poi.poifs.crypt.EncryptionInfo.<init>(EncryptionInfo.java:135) at org.apache.poi.poifs.crypt.EncryptionInfo.<init>(EncryptionInfo.java:91) at org.apache.poi.poifs.crypt.EncryptionInfo.<init>(EncryptionInfo.java:80) at com.tcs.ServiceCatalog.Common.main(Common.java:63) Caused by: java.lang.ClassNotFoundException: org.apache.poi.poifs.crypt.agile.AgileEncryptionInfoBuilder at java.net.URLClassLoader$1.run(URLClassLoader.java:366) at java.net.URLClassLoader$1.run(URLClassLoader.java:355) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:354) at java.lang.ClassLoader.loadClass(ClassLoader.java:425) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308) at java.lang.ClassLoader.loadClass(ClassLoader.java:358) at org.apache.poi.poifs.crypt.EncryptionInfo.getBuilder(EncryptionInfo.java:150) at org.apache.poi.poifs.crypt.EncryptionInfo.<init>(EncryptionInfo.java:133) … 3 more 代码:取自链接。 POIFSFileSystem fs = new POIFSFileSystem(); EncryptionInfo info = new […]

encryption(密码保护).xls文件的方式已经创build

我已经成功encryption现有的Excel文件(.xlsx格式),但我不知道如何encryption.xls格式的Excel文件,到目前为止,我已经压缩,然后encryption.xls,但我想Excel文件(.xls)被encryption。 我已经使用POI进行这些操作。 if(!CSVToEXCEL.pw.equals("NA")){ if(CSVToEXCEL.oformat.equals("xlsx")){ POIFSFileSystem fs = new POIFSFileSystem(); EncryptionInfo info = new EncryptionInfo(fs, EncryptionMode.agile); Encryptor enc = info.getEncryptor(); enc.confirmPassword(CSVToEXCEL.pw); OPCPackage opc = OPCPackage.open(new File(CSVToEXCEL.opath), PackageAccess.READ_WRITE); OutputStream os = enc.getDataStream(fs); opc.save(os); opc.close(); FileOutputStream fos = new FileOutputStream(CSVToEXCEL.opath); fs.writeFilesystem(fos); System.out.println("File created…"+CSVToEXCEL.opath); fos.close(); } else { // if file is of '.xls' format System.out.println("xls cannot be Encrypted…"); […]

读密码保护的工作表(版本 – excel 95,97-2003)Java

我有一个密码保护工作表创build与Excel 95,97-2003 我有密码,我正尝试以不同的方式阅读这个文件 方法1: WorkbookFactory.create(inputStream, "password"); throws: org.apache.poi.EncryptedDocumentException: HSSF does not currently support CryptoAPI encryption 方法2: protected InputStream WorkbookProtectionUnlocker(NPOIFSFileSystem fs, String password) throws AAAAException { EncryptionInfo info; try { info = new EncryptionInfo(fs.getRoot()); } catch (IOException e) { throw new AAAException(e.getCause()); } Decryptor d = Decryptor.getInstance(info); org.apache.poi.EncryptedDocumentException:HSSF目前不支持CryptoAPIencryption 也抛出同样的例外 方法3: org.apache.poi.hssf.record.crypto.Biff8EncryptionKey.setCurrentUserPassword("password"); Workbook wb = new HSSFWorkbook(new […]

在VBA密码框上encryption密码

我有几个excel电子表格的用户表单,我需要设置一个pipe理面板,用于某些我不希望大多数人访问的任务。 我的问题是,我可以设置一个简单的密码保护forms,但文字总是可见的。 我想尝试encryption它,所以如果有人正在看我的应该或其他pipe理员肩膀之一,那么他们不能看到密码。 反正有没有文字显示为****或类似的东西? 谢谢Al Private Sub CommandButton1_Click() Dim MyValue As Variant MyValue = InputBox("Enter Password") If MyValue = "lemonade" Then 'lemonade being the password Application.Visible = True Else MsgBox ("Password Incorrect") End If End Sub 编辑 – 我已经修改它按照你的build议,因为我有它来调出一个input框,而不是创build自己的用户窗体。 If Pword2.Value = "lemonade" Then AddPick1.Hide Report1.Hide Unload Me Admin1.Show vbModal Else MsgBox ("Password Incorrect") End […]

Python或LibreOffice保存用密码encryption的xlsx文件

我正在尝试保存用密码encryption的Excel文件。 我已经尝试遵循https://help.libreoffice.org/Common/Protecting_Content_in上的指导 – 并且完美地工作。 但是,这是在GUI中,但我正在寻找一种解决scheme,在无头模式下使用命令行界面。 我看过那个man libreoffice ,但是在那找不到任何东西。 同样我也看过Python 3库openpyxl的文档,但是我没有发现任何有用的东西。 是否可以使用不需要任何用户交互或X会话的命令行(或Python库)在Ubuntu 14.04 / 16.04上保存使用密码encryption的Excel 2007+文件?

Jackcess:用于MSAccess数据库的错误字符集

我有一个MS-Access数据库,其中有“encryption”string。 这些看起来像这样: 但是,我很快注意到这些string的长度恰好与明文的长度(我知道明文)相匹配。 所以,用Excel试一下,我发现如果你使用=CODE(<char>)函数(所以你得到的字符代码在默认字符集,和=CHAR(<number>) viceversa)和用这个符号代表字母代码的这个数字代表你总会得到相同的结果。 这意味着我只需要用java和瞧这些值创build一个数组。 Excel示例(在右边提到的“数组”): 例如:“>>”具有(dec)187的索引,所以187x或253产生70 =>“F” 现在,我使用jackcess来访问这些值,“解密”大多是好的,但我有时从string中得到错误的字符。 在Excel中,一切正常。 具有最佳结果的代码: public static final int[] DECRYPT_KEY = { 253, 203, 204, 217, 226, 205, 128, 201, 222, 183, 58, 217, 230, 201, 183, 211, 158, 203, 167, 213, 35, 33, 201, 123, 186, 247 }; public static void main(String[] args) throws IOException { System.out.println(System.getProperty("file.encoding")); […]

这个密码破解器是如何工作的? 它也可以适应其他的东西吗?

我不得不使用这个代码从受保护的表中删除密码,没有人知道密码,我有兴趣了解它是如何工作的,是否可以调整从其他Excel位,如工作簿结构或工作簿密码? Sub PasswordBreaker() 'Breaks worksheet password protection. Dim i As Integer, j As Integer, k As Integer Dim l As Integer, m As Integer, n As Integer Dim i1 As Integer, i2 As Integer, i3 As Integer Dim i4 As Integer, i5 As Integer, i6 As Integer On Error Resume Next For i = 65 […]

Excel密码删除

我们每天都会收到使用相同密码进行密码保护的Excel工作簿文件。 我们知道这个密码。 是否有一个实用程序或方法来删除这些工作簿文件的密码保护,而无需调用Excel.exe或Excel对象。 我们的目标是将Excel从stream程中移出并利用VB.net中的SpreadsheetGear。 但是,SpreadsheetGear只能取消保护工作表而不是工作簿。 谢谢

为什么excel的内容在修改密码时会改变?

我通过分配一个excel密码来testing它。 这个excel保存在dropbox中,当我给excel分配一个密码时,它被完全下载到每个被共享的comp。 有没有一种方法,我分配密码,整个文件不会被修改? 我相信Dropbox不是问题,因为这也是SugarSync发生的事情。