当前位置:网站首页>How Windows bat script automatically executes sqlcipher command

How Windows bat script automatically executes sqlcipher command

2022-07-05 09:47:00 Black Mountain demon 2018

windows bat How scripts execute automatically sqlcipher command

Demand background

Following sqlcipher After decryption , I think I have to input a bunch of instructions every time I view the encrypted database , It is not conducive to development and testing , So this article introduces how to pass bat Scripts execute automatically .

Use the command line directly

sqlcipher-shell64.exe universal_encrypt.db Enter into sqlite in  Insert picture description here
And then execute

     1.PRAGMA key = '123456';
     2.ATTACH DATABASE 'plaintext.db' AS plaintext KEY '';
     3.SELECT sqlcipher_export('plaintext');
     4.DETACH DATABASE plaintext

Use bat Script

sqlcipher-shell64.exe universal_encrypt.db < adb.txt
pause

adb.txt
       PRAGMA key = ‘123456’;
       ATTACH DATABASE ‘plaintext.db’ AS plaintext KEY ‘’;
       SELECT sqlcipher_export(‘plaintext’);
       DETACH DATABASE plaintext

原网站

版权声明
本文为[Black Mountain demon 2018]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/02/202202140536454176.html