├── .github └── workflows │ └── Qt6Git.yml ├── .gitignore ├── ABOUT ME ├── BUILD_INSTRUCTIONS ├── CMakeLists.txt ├── COPYING ├── GPLv2 ├── GPLv3 ├── LICENSE ├── README ├── README.md ├── TODO ├── changelog ├── cmake_uninstall.cmake.in ├── copyright ├── debian.upstream ├── BINARY_INSTALL_INSTRUCTIONS ├── BUILD_INSTRUCTIONS ├── TODO ├── changelog ├── compat ├── control ├── copyright ├── docs ├── libzulucrypt-dev.install ├── libzulucrypt1.install ├── libzulucrypt1.lintian-overrides ├── menu ├── patches │ └── series ├── postinst ├── rules ├── source │ └── format ├── watch ├── zulucrypt-cli.install └── zulucrypt-gui.install ├── docs ├── README ├── library dependency flow chart.jpg ├── library dependency flow chart.odg ├── zuluCrypt-cli flow chart.jpg ├── zuluCrypt-cli flow chart.odg ├── zuluCrypt.odt ├── zuluCrypt.pdf ├── zuluMount-cli flowchar.jpg └── zuluMount-cli flowchar.odg ├── external_libraries ├── lxqt_wallet │ ├── BUILD_INSTRUCTIONS │ ├── CMakeLists.txt │ ├── LICENSE │ ├── README.md │ ├── SOURCE │ ├── backend │ │ ├── CMakeLists.txt │ │ ├── README │ │ ├── fake_wallet_backend.c │ │ ├── lxqtwallet.c │ │ └── lxqtwallet.h │ ├── changelog │ └── frontend │ │ ├── CMakeLists.txt │ │ ├── README │ │ ├── changepassworddialog.cpp │ │ ├── changepassworddialog.h │ │ ├── changepassworddialog.ui │ │ ├── libsecret.c │ │ ├── libsecret │ │ └── CMakeLists.txt │ │ ├── lxqt_internal_wallet.cpp │ │ ├── lxqt_internal_wallet.h │ │ ├── lxqt_kwallet-dbus.cpp │ │ ├── lxqt_kwallet-dbus.h │ │ ├── lxqt_kwallet.cpp │ │ ├── lxqt_kwallet.h │ │ ├── lxqt_libsecret.cpp │ │ ├── lxqt_libsecret.h │ │ ├── lxqt_osx_keychain.cpp │ │ ├── lxqt_osx_keychain.h │ │ ├── lxqt_osx_keychain_private.h │ │ ├── lxqt_wallet.cpp │ │ ├── lxqt_wallet.h │ │ ├── lxqt_windows_dpapi.cpp │ │ ├── lxqt_windows_dpapi.h │ │ ├── password_dialog.cpp │ │ ├── password_dialog.h │ │ ├── password_dialog.ui │ │ └── task.h ├── tasks │ ├── CMakeLists.txt │ ├── LICENSE │ ├── README.md │ └── task.hpp └── tcplay │ ├── CHANGELOG │ ├── CMakeLists.txt │ ├── LICENSE │ ├── Makefile.classic │ ├── README.md │ ├── crc32.c │ ├── crc32.h │ ├── crypto-dev.c │ ├── crypto-gcrypt.c │ ├── crypto.c │ ├── generic_xts.c │ ├── generic_xts.h │ ├── hdr.c │ ├── humanize.c │ ├── humanize.h │ ├── io.c │ ├── main.c │ ├── pbkdf2-gcrypt.c │ ├── pbkdf2-openssl.c │ ├── safe_mem.c │ ├── tcplay.3 │ ├── tcplay.8 │ ├── tcplay.c │ ├── tcplay.h │ ├── tcplay.map │ ├── tcplay_api.c │ ├── tcplay_api.h │ ├── tcplay_api_internal.h │ ├── tcplay_api_test.c │ └── zuluplay_api.h ├── images ├── Screenshot_20190912_121900.png ├── Screenshot_20190912_121934.png ├── Screenshot_20190912_122017.png ├── Screenshot_20190912_122040.png └── Screenshot_20190912_122108.png ├── plugins ├── CMakeLists.txt ├── default.png ├── file.png ├── generic_header │ ├── CMakeLists.txt │ └── main.cpp ├── gpg │ ├── CMakeLists.txt │ └── main.cpp ├── hmac │ ├── CMakeLists.txt │ ├── README │ ├── hmac.pro │ └── main.cpp ├── icon.qrc ├── keydialog-qt │ ├── CMakeLists.txt │ ├── icon.qrc │ ├── key.png │ ├── keydialog-qt.pro │ ├── main.cpp │ ├── mainwindow.cpp │ ├── mainwindow.h │ └── mainwindow.ui ├── keyfile.png ├── keykeyfile │ ├── CMakeLists.txt │ └── main.cpp ├── keyring │ ├── README │ └── keyring.c ├── kwallet │ ├── CMakeLists.txt │ ├── kwallet.pro │ ├── main.cpp │ ├── wallet.cpp │ └── wallet.h ├── luks │ ├── CMakeLists.txt │ └── main.cpp ├── mainwindow.cpp ├── mainwindow.h ├── mainwindow.ui ├── network_key │ ├── CMakeLists.txt │ ├── README │ ├── crypt_buffer.c │ ├── crypt_buffer.h │ ├── main.cpp │ ├── network_key.h │ ├── server.c │ └── zuluCryptKeyServer.desktop ├── plugins.h ├── plugins.pro ├── steghide │ ├── CMakeLists.txt │ └── main.cpp ├── test │ ├── README │ └── zuluCrypt-testKey.c └── tomb │ ├── CMakeLists.txt │ └── main.cpp ├── rpm ├── BUILD_INSTRUCTIONS └── zuluCrypt.spec ├── translations ├── INSTRUCTIONS ├── plugins │ └── messages.ts ├── zuluCrypt │ ├── README │ ├── ar_SA.qm │ ├── ar_SA.ts │ ├── de_DE.qm │ ├── de_DE.ts │ ├── en_US.qm │ ├── en_US.ts │ ├── fr_FR.qm │ ├── fr_FR.ts │ ├── messages.pot │ ├── pl_PL.ts │ ├── zuluCrypt-cli.mo │ ├── zuluCrypt-cli.po │ └── zuluCrypt-cli.pot └── zuluMount │ ├── README │ ├── ar_SA.qm │ ├── ar_SA.ts │ ├── de_DE.qm │ ├── de_DE.ts │ ├── en_US.qm │ ├── en_US.ts │ ├── fr_FR.qm │ ├── fr_FR.ts │ └── messages.pot ├── udev_support_README ├── version ├── zuluCrypt-cli.1 ├── zuluCrypt-cli ├── CMakeLists.txt ├── bin │ ├── add_key.c │ ├── bash_special_chars.h │ ├── bind.c │ ├── check_invalid_key.c │ ├── check_opened_mapper.c │ ├── clear_dead_mappers.c │ ├── close_volume.c │ ├── create_mount_point.c │ ├── create_volumes.c │ ├── crypt_file.c │ ├── file_encryption.c │ ├── get_opts.c │ ├── help.c │ ├── includes.h │ ├── libzuluCrypt-exe.h │ ├── main.c │ ├── mount_flags.c │ ├── open_volume.c │ ├── partitions.c │ ├── path_access.c │ ├── remove_key.c │ ├── save_and_restore_volume_header.c │ ├── security.c │ ├── security.h │ ├── test.c │ ├── volume_info.c │ ├── volumes.c │ └── write_device_with_junk.c ├── constants.h ├── lib │ ├── add_key.c │ ├── bitlocker.c │ ├── blkid_evaluate_tag.c │ ├── close_mapper.c │ ├── close_volume.c │ ├── create_loop_device.c │ ├── create_luks.c │ ├── create_mapper_name.c │ ├── create_tcrypt.c │ ├── create_volume.c │ ├── empty_slots.c │ ├── file_path_security.c │ ├── includes.h │ ├── is_luks.c │ ├── is_path_valid.c │ ├── libzuluCrypt.h │ ├── mount_fs_options.c │ ├── mount_volume.c │ ├── mountinfo.c │ ├── open_luks.c │ ├── open_plain.c │ ├── open_tcrypt.c │ ├── open_volume.c │ ├── parse_fstab.c │ ├── real_path.c │ ├── remove_key.c │ ├── resolve_paths.c │ ├── status.c │ ├── unmount_volume.c │ ├── user_home_path.c │ ├── version.c │ └── volume_type.c ├── pluginManager │ ├── libzuluCryptPluginManager.h │ └── zuluCryptPluginManager.c └── utility │ ├── process │ ├── process.c │ └── process.h │ ├── socket │ ├── socket.c │ └── socket.h │ └── string │ ├── String.c │ ├── String.h │ ├── StringList.c │ └── StringList.h ├── zuluCrypt-gui.1 ├── zuluCrypt-gui ├── CMakeLists.txt ├── TRANSLATIONS ├── about.cpp ├── about.h ├── about.ui ├── createfile.cpp ├── createfile.h ├── createfile.ui ├── createkeyfile.cpp ├── createkeyfile.h ├── createkeyfile.ui ├── createvolume.cpp ├── createvolume.h ├── createvolume.ui ├── createvolumedialog.cpp ├── createvolumedialog.h ├── createvolumedialog.ui ├── createvolumeinexistingfile.cpp ├── createvolumeinexistingfile.h ├── createvolumeinexistingfile.ui ├── cryptfiles.cpp ├── cryptfiles.h ├── cryptfiles.ui ├── cryptoinfo.cpp ├── cryptoinfo.h ├── cryptoinfo.ui ├── debugwindow.cpp ├── debugwindow.h ├── debugwindow.ui ├── dialogmsg.cpp ├── dialogmsg.h ├── dialogmsg.ui ├── dialogok.cpp ├── dialogok.h ├── dialogok.ui ├── erasedevice.cpp ├── erasedevice.h ├── erasedevice.ui ├── executablesearchpaths.cpp ├── executablesearchpaths.h ├── favorites.cpp ├── favorites.h ├── favorites2.cpp ├── favorites2.h ├── favorites2.ui ├── file.png ├── filemanager.cpp ├── filemanager.h ├── filemanager.ui ├── folder.png ├── help.cpp ├── help.h ├── help.ui ├── icon.qrc ├── json_parser.hpp ├── keyfile-1.png ├── keyfile.png ├── keystrength.cpp ├── keystrength.h ├── luksaddkey.cpp ├── luksaddkey.h ├── luksaddkey.ui ├── luksdeletekey.cpp ├── luksdeletekey.h ├── luksdeletekey.ui ├── main.cpp ├── managesystemvolumes.cpp ├── managesystemvolumes.h ├── managesystemvolumes.ui ├── managevolumeheader.cpp ├── managevolumeheader.h ├── managevolumeheader.ui ├── module.png ├── openvolume.cpp ├── openvolume.h ├── openvolume.ui ├── partition.png ├── passphrase.png ├── password.ui ├── password_dialog.cpp ├── password_dialog.h ├── plugin.cpp ├── plugin.h ├── plugin.ui ├── readonlywarning.cpp ├── readonlywarning.h ├── readonlywarning.ui ├── secrets.cpp ├── secrets.h ├── sharedObjects │ ├── CMakeLists.txt │ └── icon.qrc ├── showluksslots.cpp ├── showluksslots.h ├── showluksslots.ui ├── systemsignalhandler.cpp ├── systemsignalhandler.h ├── tablewidget.cpp ├── tablewidget.h ├── tcrypt.cpp ├── tcrypt.h ├── tcrypt.ui ├── utility.cpp ├── utility.h ├── utility2.h ├── warnwhenextendingcontainerfile.cpp ├── warnwhenextendingcontainerfile.h ├── warnwhenextendingcontainerfile.ui ├── zuluCrypt-0.png ├── zuluCrypt.desktop.README ├── zuluCrypt.nicolas.png ├── zuluCrypt.papirus.dark.png ├── zuluCrypt.papirus.png ├── zuluCrypt.png ├── zuluCrypt.pro ├── zulucrypt.cpp ├── zulucrypt.h └── zulucrypt.ui ├── zuluCrypt.xml ├── zuluMount-cli.1 ├── zuluMount-cli ├── README ├── crypto_mount.c ├── crypto_umount.c ├── includes.h ├── main.c ├── mount.c ├── umount.c └── volume_status.c ├── zuluMount-gui.1 ├── zuluMount-gui ├── CMakeLists.txt ├── events.cpp ├── events.h ├── file.png ├── folder.png ├── icon.qrc ├── keydialog.cpp ├── keydialog.h ├── keydialog.ui ├── keyfile-1.png ├── keyfile.png ├── main.cpp ├── module.png ├── monitor_mountinfo.cpp ├── monitor_mountinfo.h ├── mountpartition.cpp ├── mountpartition.h ├── mountpartition.ui ├── oneinstance.cpp ├── oneinstance.h ├── partition.png ├── passphrase.png ├── siritask.cpp ├── siritask.h ├── veracryptpimdialog.cpp ├── veracryptpimdialog.h ├── veracryptpimdialog.ui ├── volumeproperty.cpp ├── volumeproperty.h ├── zuluCrypt-1.png ├── zuluCrypt.png ├── zuluMount.nicolas.png ├── zuluMount.papirus.dark.png ├── zuluMount.papirus.png ├── zuluMount.png ├── zuluMount.pro ├── zuluMount.xcf ├── zulumount.cpp ├── zulumount.h ├── zulumount.ui ├── zulumounttask.cpp └── zulumounttask.h ├── zuluPolkit ├── CMakeLists.txt ├── main.cpp ├── zulupolkit.cpp └── zulupolkit.h ├── zuluSafe-cli.1 └── zuluSafe ├── CMakeLists.txt ├── zuluSafe.c ├── zuluwallet.c └── zuluwallet.h /.github/workflows/Qt6Git.yml: -------------------------------------------------------------------------------- 1 | name: Build Qt6 Git 2 | 3 | on: 4 | push: 5 | branches: 6 | - master 7 | tags-ignore: 8 | - '*' 9 | 10 | env: 11 | QT6_VERSION: "6.6.2" 12 | jobs: 13 | buildLinuxQt6Git: 14 | runs-on: ubuntu-latest 15 | steps: 16 | - 17 | uses: actions/checkout@v4 18 | with: 19 | repository: mhogomchungu/zuluCrypt 20 | path: Linux 21 | - 22 | name: Install packages 23 | run: | 24 | sudo apt-get update 25 | sudo apt-get -f install tar xz-utils libpwquality-dev libblkid-dev libcryptsetup-dev libgcrypt20-dev libsecret-1-dev libdevmapper-dev uuid-dev libudev-dev 26 | - 27 | name: Install Qt6 28 | uses: jurplel/install-qt-action@v3 29 | with: 30 | version: ${{ env.QT6_VERSION }} 31 | arch: 'gcc_64' 32 | dir: "${{github.workspace}}/qt6" 33 | install-deps: "true" 34 | host: 'linux' 35 | target: 'desktop' 36 | - 37 | name: Configure CMake 38 | env: 39 | CMAKE_PREFIX_PATH: "${{github.workspace}}/qt6/Qt/${{ env.QT6_VERSION }}" 40 | run: cmake -DCMAKE_INSTALL_PREFIX=${{github.workspace}}/zC -DBUILD_WITH_QT6=true -DCMAKE_VERBOSE_MAKEFILE=FALSE -DCMAKE_BUILD_TYPE=RELEASE -S ${{github.workspace}}/Linux/ -B ${{github.workspace}}/Linux/build6 41 | - 42 | name: Build 43 | run: cmake --build ${{github.workspace}}/Linux/build6 44 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | CMakeLists.txt.* 2 | -------------------------------------------------------------------------------- /COPYING: -------------------------------------------------------------------------------- 1 | 2 | copyright (c) 2011-2015 3 | name : Francis Banyikwa 4 | email: mhogomchungu@gmail.com 5 | 6 | This program is free software: you can redistribute it and/or modify 7 | it under the terms of the GNU General Public License as published by 8 | the Free Software Foundation, either version 2 of the License, or 9 | (at your option) any later version. 10 | 11 | This program is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License 17 | along with this program. If not, see . 18 | 19 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | 2 | copyright (c) 2011-2015 3 | name : Francis Banyikwa 4 | email: mhogomchungu@gmail.com 5 | 6 | This program is free software: you can redistribute it and/or modify 7 | it under the terms of the GNU General Public License as published by 8 | the Free Software Foundation, either version 2 of the License, or 9 | (at your option) any later version. 10 | 11 | This program is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License 17 | along with this program. If not, see . 18 | 19 | -------------------------------------------------------------------------------- /README: -------------------------------------------------------------------------------- 1 | zuluCrypt 2 | ========= 3 | 4 | zuluCrypt is a simple,feature rich and powerful solution for hard drives encryption. 5 | 6 | Project's frontpage is at: https://mhogomchungu.github.io/zuluCrypt 7 | 8 | bugs,wishes and comments can be reported at: https://github.com/mhogomchungu/zuluCrypt/issues or 9 | to my private email address at: mhogomchungu@gmail.com 10 | 11 | 12 | [![Build Status](https://api.travis-ci.org/mhogomchungu/zuluCrypt.svg?branch=master)](https://travis-ci.org/mhogomchungu/zuluCrypt) 13 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | zuluCrypt 2 | ========== 3 | 4 | zuluCrypt is a simple,feature rich and powerful solution for hard drives encryption. 5 | 6 | Project's frontpage is at: https://mhogomchungu.github.io/zuluCrypt 7 | 8 | bugs,wishes and comments can be reported at: https://github.com/mhogomchungu/zuluCrypt/issues or 9 | to my private email address at: mhogomchungu@gmail.com 10 | 11 | 12 | [![Build Status](https://api.travis-ci.org/mhogomchungu/zuluCrypt.svg?branch=master)](https://travis-ci.org/mhogomchungu/zuluCrypt) 13 | -------------------------------------------------------------------------------- /TODO: -------------------------------------------------------------------------------- 1 | 2 | version 1.0 3 | 4 | zuluCrypt-cli 5 | --open, close, create volumes and check for info of opened ones. - DONE 6 | 7 | zuluCrypt 8 | --open and close volumes and and check for info of opened ones. - DONE 9 | 10 | version 2.0 11 | -- add support to managing luks keys in the cli and GUI. - DONE 12 | 13 | version 3.0 14 | zuluCrypt 15 | -- add support for creation of volumes - DONE 16 | 17 | zuluCrypt-cli 18 | -- see if it is possible to safely create volumes resising in "/dev" - DONE 19 | 20 | version 4.0 21 | -- host UI blocking code to threads to remove/minimize UI freezes - DONE 22 | -- allow a user to select what random number generator to use - DONE 23 | -- transition away from using cryptsetup on the cli to using the library - DONE 24 | -- Allow a user to select what font size and type to use - DONE 25 | -- add support for favorite volumes - DONE 26 | -- warn on attempt to delete a key when there is only one key left - DONE 27 | -- refuse to attemp tp add more keys when key slots are full. - DONE 28 | -- implement tray icon to minimize to tray - DONE 29 | -- provide a complete docs in a header file and associated shared and static library 30 | for others to use - DONE 31 | -- include partitions in /etc/crypttab in a list of system partitions. - DONE 32 | -- use cmake for building and installation. - DONE 33 | 34 | version 4.3.1 35 | -- This version marks the status change to "maintanance mode". The project to the most partitions 36 | will be fixing bugs when found as it can now do all of what it is meant to do. 37 | -- New featues will be added in a form of transitions if people start submitting them. 38 | 39 | 4.0 going up 40 | -- just maintainig the tool,all features are in. 41 | 42 | X.Y 43 | -- add a plugin to retrieve keys from smart cards 44 | -- add mtp based devices support to zuluMount 45 | -------------------------------------------------------------------------------- /cmake_uninstall.cmake.in: -------------------------------------------------------------------------------- 1 | 2 | cmake_policy(SET CMP0007 NEW) 3 | 4 | if (NOT EXISTS "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt") 5 | message(FATAL_ERROR "Cannot find install manifest: \"@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt\"") 6 | endif(NOT EXISTS "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt") 7 | 8 | file(READ "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt" files) 9 | string(REGEX REPLACE "\n" ";" files "${files}") 10 | list(REVERSE files) 11 | foreach (file ${files}) 12 | message(STATUS "Uninstalling \"$ENV{DESTDIR}${file}\"") 13 | if (EXISTS "$ENV{DESTDIR}${file}") 14 | execute_process( 15 | COMMAND @CMAKE_COMMAND@ -E remove "$ENV{DESTDIR}${file}" 16 | OUTPUT_VARIABLE rm_out 17 | RESULT_VARIABLE rm_retval 18 | ) 19 | if(NOT ${rm_retval} EQUAL 0) 20 | message(FATAL_ERROR "Problem when removing \"$ENV{DESTDIR}${file}\"") 21 | endif (NOT ${rm_retval} EQUAL 0) 22 | else (EXISTS "$ENV{DESTDIR}${file}") 23 | message(STATUS "File \"$ENV{DESTDIR}${file}\" does not exist.") 24 | endif (EXISTS "$ENV{DESTDIR}${file}") 25 | endforeach(file) 26 | 27 | -------------------------------------------------------------------------------- /debian.upstream/BINARY_INSTALL_INSTRUCTIONS: -------------------------------------------------------------------------------- 1 | 2 | This package contains debian packages for 32 bit systems and 64 bit systems. 3 | 4 | Packages for 32 bit systems are in i386 folder. 5 | 6 | Packages for 64 bit systems are in amd64 folder. 7 | 8 | Use packages that match your computer architecture. 9 | 10 | To install these packages,just click on them and see if your system understands how to 11 | install debian packages.If it does,then install them in this order: 12 | 13 | 1. libzuluCrypt1 14 | 2. libzuluCrypt-dev 15 | 3. zuluCrypt-cli 16 | 4. zuluCrypt-gui 17 | 18 | If your system does not understand how to install debian packages by clicking on them,then install 19 | them using the following steps: 20 | 21 | 1. Open the terminal. 22 | 2. Change directories to where the debian packages are. 23 | 3. Run the following command to install them: su -c "dpkg -i *.deb && apt-get install -f" 24 | 4. Enter root's password when asked. 25 | -------------------------------------------------------------------------------- /debian.upstream/TODO: -------------------------------------------------------------------------------- 1 | split plugins to separate packages 2 | find a safe but comfortable way of runing *-cli as a regular user 3 | - RPM package sets setuid bit, but it may be give much privilege to anyone 4 | -------------------------------------------------------------------------------- /debian.upstream/compat: -------------------------------------------------------------------------------- 1 | 9 2 | -------------------------------------------------------------------------------- /debian.upstream/control: -------------------------------------------------------------------------------- 1 | Source: zulucrypt 2 | Section: admin 3 | Priority: extra 4 | Maintainer: Mhogo Mchungu 5 | Uploaders: 6 | Build-Depends: chrpath, debhelper (>= 9), cmake, pkg-config, libcryptsetup-dev, libblkid-dev, libdevmapper-dev, uuid-dev, libgcrypt20-dev, libudev-dev, bzip2, qtbase5-dev, qttools5-dev, libsecret-1-dev, libpwquality-dev 7 | Standards-Version: 3.9.8 8 | Homepage: http://mhogomchungu.github.io/zuluCrypt/ 9 | Vcs-Git: git://git@github.com:mhogomchungu/zuluCrypt.git 10 | Vcs-Browser: https://github.com/mhogomchungu/zuluCrypt 11 | 12 | Package: zulucrypt 13 | Architecture: all 14 | Depends: zulucrypt-gui, zulucrypt-cli 15 | Description: front-end for cryptsetup and tcplay 16 | ZuluCrypt makes it easier to use cryptsetup by providing a Qt based 17 | GUI and a simpler to use cli front end to cryptsetup. 18 | . 19 | This metapackage installs the gui and the cli components. 20 | 21 | Package: zulucrypt-gui 22 | Architecture: any 23 | Depends: ${shlibs:Depends}, ${misc:Depends}, zulucrypt-cli (= ${binary:Version}) 24 | Description: graphical front-end for cryptsetup and tcplay 25 | ZuluCrypt makes it easier to use cryptsetup by providing a Qt based 26 | GUI and a simpler to use cli front end to cryptsetup. 27 | . 28 | This package contains the graphical applications. 29 | 30 | Package: zulucrypt-cli 31 | Architecture: any 32 | Depends: ${shlibs:Depends}, ${misc:Depends}, libzulucrypt1 (= ${binary:Version}) 33 | Description: console front-end for cryptsetup and tcplay 34 | ZuluCrypt makes it easier to use cryptsetup by providing a Qt based 35 | GUI and a simpler to use cli front end to cryptsetup. 36 | . 37 | This package contains the console applications. 38 | 39 | Package: libzulucrypt1 40 | Architecture: any 41 | Multi-Arch: same 42 | Pre-Depends: ${misc:Pre-Depends} 43 | Depends: ${shlibs:Depends}, ${misc:Depends} 44 | Description: shared libraries for cryptsetup and tcplay 45 | ZuluCrypt makes it easier to use cryptsetup by providing a Qt based 46 | GUI and a simpler to use cli front end to cryptsetup. 47 | . 48 | This package contains the shared libraries. 49 | 50 | Package: libzulucrypt-dev 51 | Pre-Depends: ${misc:Pre-Depends} 52 | Depends: ${misc:Depends} 53 | Architecture: any 54 | Section: libdevel 55 | Description: development files for zulucrypt 56 | This package contains development files and libraries necessary to 57 | build programs around zulucrypt 58 | 59 | -------------------------------------------------------------------------------- /debian.upstream/docs: -------------------------------------------------------------------------------- 1 | README 2 | 3 | -------------------------------------------------------------------------------- /debian.upstream/libzulucrypt-dev.install: -------------------------------------------------------------------------------- 1 | usr/include/ 2 | usr/lib/*/*.so 3 | usr/lib/*/pkgconfig/ 4 | -------------------------------------------------------------------------------- /debian.upstream/libzulucrypt1.install: -------------------------------------------------------------------------------- 1 | usr/lib/*/lib*.so.* 2 | -------------------------------------------------------------------------------- /debian.upstream/libzulucrypt1.lintian-overrides: -------------------------------------------------------------------------------- 1 | libzulucrypt1 binary: package-name-doesnt-match-sonames 2 | -------------------------------------------------------------------------------- /debian.upstream/menu: -------------------------------------------------------------------------------- 1 | ?package(zulucrypt-gui):needs="X11" section="Applications/System/Security"\ 2 | title="ZuluCrypt" command="/usr/bin/zuluCrypt-gui" 3 | 4 | ?package(zulucrypt-gui):needs="X11" section="Applications/System/Security"\ 5 | title="ZuluMount" command="/usr/bin/zuluMount-gui" 6 | -------------------------------------------------------------------------------- /debian.upstream/patches/series: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mhogomchungu/zuluCrypt/5e6a307b9540ea9d9f6bf05ffb35509f94ae9dc9/debian.upstream/patches/series -------------------------------------------------------------------------------- /debian.upstream/postinst: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | chmod 4755 /usr/bin/zuluCrypt-cli 4 | chmod 4755 /usr/bin/zuluMount-cli 5 | 6 | #DEBHELPER# 7 | -------------------------------------------------------------------------------- /debian.upstream/rules: -------------------------------------------------------------------------------- 1 | #!/usr/bin/make -f 2 | 3 | # Uncomment this to turn on verbose mode. 4 | #export DH_VERBOSE=1 5 | 6 | # This has to be exported to make some magic below work. 7 | export DH_OPTIONS 8 | 9 | DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH) 10 | 11 | override_dh_auto_configure: 12 | dh_auto_configure -- -DCMAKE_INSTALL_PREFIX=/usr/ -DCMAKE_INSTALL_LIBDIR=lib/$(DEB_HOST_MULTIARCH) -DUDEVSUPPORT=true -DNOGUI=false -DQT5=true -DREUSEMOUNTPOINT=false -DHOMEMOUNTPREFIX=false -DNOGNOME=false -DNOKDE=true 13 | 14 | override_dh_install: 15 | chrpath -d $(CURDIR)/debian/tmp/usr/bin/* 16 | chrpath -d $(CURDIR)/debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)/zuluCrypt/* 17 | dh_install --list-missing 18 | 19 | %: 20 | dh $@ 21 | 22 | .PHONY: override_dh_auto_configure override_dh_install 23 | -------------------------------------------------------------------------------- /debian.upstream/source/format: -------------------------------------------------------------------------------- 1 | 3.0 (quilt) 2 | -------------------------------------------------------------------------------- /debian.upstream/watch: -------------------------------------------------------------------------------- 1 | # Compulsory line, this is a version 3 file 2 | version=3 3 | 4 | opts=filenamemangle=s/.+\/v?(\d\S*)\.tar\.gz/zuluCrypt-$1\.tar\.gz/ \ 5 | https://github.com/mhogomchungu/zuluCrypt/tags .*/v?(\d\S*)\.tar\.gz 6 | 7 | -------------------------------------------------------------------------------- /debian.upstream/zulucrypt-cli.install: -------------------------------------------------------------------------------- 1 | usr/bin/*-cli 2 | usr/lib/*/zuluCrypt/ 3 | usr/share/man/man1/*-cli.* 4 | -------------------------------------------------------------------------------- /debian.upstream/zulucrypt-gui.install: -------------------------------------------------------------------------------- 1 | usr/bin/*-gui 2 | usr/bin/zuluPolkit 3 | usr/share/applications/ 4 | usr/share/icons/ 5 | usr/share/pixmaps/ 6 | usr/share/man/man1/*-gui.* 7 | usr/share/zuluCrypt/* 8 | usr/share/doc/zuluCrypt/* 9 | usr/share/polkit-1/actions/org.zulucrypt.zulupolkit.policy 10 | usr/share/mime/packages/zuluCrypt.xml 11 | -------------------------------------------------------------------------------- /docs/README: -------------------------------------------------------------------------------- 1 | 2 | 3 | Look at the .jpg image files to get an over view of the backend architecture 4 | -------------------------------------------------------------------------------- /docs/library dependency flow chart.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mhogomchungu/zuluCrypt/5e6a307b9540ea9d9f6bf05ffb35509f94ae9dc9/docs/library dependency flow chart.jpg -------------------------------------------------------------------------------- /docs/library dependency flow chart.odg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mhogomchungu/zuluCrypt/5e6a307b9540ea9d9f6bf05ffb35509f94ae9dc9/docs/library dependency flow chart.odg -------------------------------------------------------------------------------- /docs/zuluCrypt-cli flow chart.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mhogomchungu/zuluCrypt/5e6a307b9540ea9d9f6bf05ffb35509f94ae9dc9/docs/zuluCrypt-cli flow chart.jpg -------------------------------------------------------------------------------- /docs/zuluCrypt-cli flow chart.odg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mhogomchungu/zuluCrypt/5e6a307b9540ea9d9f6bf05ffb35509f94ae9dc9/docs/zuluCrypt-cli flow chart.odg -------------------------------------------------------------------------------- /docs/zuluCrypt.odt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mhogomchungu/zuluCrypt/5e6a307b9540ea9d9f6bf05ffb35509f94ae9dc9/docs/zuluCrypt.odt -------------------------------------------------------------------------------- /docs/zuluCrypt.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mhogomchungu/zuluCrypt/5e6a307b9540ea9d9f6bf05ffb35509f94ae9dc9/docs/zuluCrypt.pdf -------------------------------------------------------------------------------- /docs/zuluMount-cli flowchar.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mhogomchungu/zuluCrypt/5e6a307b9540ea9d9f6bf05ffb35509f94ae9dc9/docs/zuluMount-cli flowchar.jpg -------------------------------------------------------------------------------- /docs/zuluMount-cli flowchar.odg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mhogomchungu/zuluCrypt/5e6a307b9540ea9d9f6bf05ffb35509f94ae9dc9/docs/zuluMount-cli flowchar.odg -------------------------------------------------------------------------------- /external_libraries/lxqt_wallet/BUILD_INSTRUCTIONS: -------------------------------------------------------------------------------- 1 | 2 | 3 | The build system in use is cmake 4 | 5 | To build make sure you have the following packages installed(packages may be named differently in your distribution): 6 | 7 | g++ 8 | gcc 9 | cmake 10 | kde-devel( if you want to build KDE/KWALLET support ) 11 | qt4-devel 12 | 13 | Build instructions are below: 14 | 15 | mkdir build 16 | cd build 17 | cmake -DCMAKE_INSTALL_PREFIX=`kde4-config --prefix` -DCMAKE_BUILD_TYPE=RELEASE .. 18 | make 19 | make install 20 | 21 | To build without KDE/KWALLET support,pass "-DNOKDESUPPORT=true" as one of the arguments in the third stage above 22 | 23 | To build without gnome/secret_service support,pass "-DNOSECRETSUPPORT=true" as one of the arguments in the third stage above 24 | -------------------------------------------------------------------------------- /external_libraries/lxqt_wallet/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | if(${CMAKE_VERSION} VERSION_GREATER "3.26") 2 | cmake_minimum_required(VERSION 3.5.0) 3 | else() 4 | cmake_minimum_required(VERSION 3.0.2) 5 | endif() 6 | 7 | find_package( PkgConfig ) 8 | 9 | if( WIN32 ) 10 | add_library( lxqt-wallet-backend STATIC backend/fake_wallet_backend.c ) 11 | 12 | set_target_properties( lxqt-wallet-backend PROPERTIES COMPILE_FLAGS "-Wall -s -pedantic" ) 13 | else() 14 | add_subdirectory( backend ) 15 | endif() 16 | 17 | add_subdirectory( frontend ) 18 | 19 | 20 | -------------------------------------------------------------------------------- /external_libraries/lxqt_wallet/LICENSE: -------------------------------------------------------------------------------- 1 | /* 2 | * copyright: 2013 3 | * name : Francis Banyikwa 4 | * email: mhogomchungu@gmail.com 5 | * 6 | * Redistribution and use in source and binary forms, with or without 7 | * modification, are permitted provided that the following conditions 8 | * are met: 9 | * 10 | * 1. Redistributions of source code must retain the above copyright 11 | * notice, this list of conditions and the following disclaimer. 12 | * 2. Redistributions in binary form must reproduce the above copyright 13 | * notice, this list of conditions and the following disclaimer in 14 | * the documentation and/or other materials provided with the 15 | * distribution. 16 | * 17 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 18 | * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 19 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS 20 | * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE 21 | * COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 22 | * INCIDENTAL, SPECIAL, EXEMPLARY OR CONSEQUENTIAL DAMAGES (INCLUDING, 23 | * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 24 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED 25 | * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 26 | * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT 27 | * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 28 | * SUCH DAMAGE. 29 | */ 30 | -------------------------------------------------------------------------------- /external_libraries/lxqt_wallet/README.md: -------------------------------------------------------------------------------- 1 | lxqt_wallet 2 | =========== 3 | 4 | This project seeks to give a functionality for secure storage of information that can be presented in key-values pair 5 | like user names-passwords pairs. 6 | 7 | Currently the project can store the information in KDE's kwallet,GNOME's secret service or in an internal system that use libgcrypt 8 | as its cryptographic backend. 9 | 10 | The internal secure storage system allows the functionality to be provided without dependencies on KDE or gnome libraries. 11 | 12 | This project is designed to be used by other projects simply by adding the source folder in the build system and start using it. 13 | 14 | The front end is build on Qt/C++ and has an optional dependency on KDE's kwallet and GNOME's secretservice. 15 | 16 | The project allows other Qt based project's to target one API and use it for secure storage of information in different 17 | secure storage systems. -------------------------------------------------------------------------------- /external_libraries/lxqt_wallet/SOURCE: -------------------------------------------------------------------------------- 1 | 2 | project's homepage is: https://github.com/mhogomchungu/lxqt_wallet 3 | -------------------------------------------------------------------------------- /external_libraries/lxqt_wallet/backend/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | if(${CMAKE_VERSION} VERSION_GREATER "3.26") 2 | cmake_minimum_required(VERSION 3.5.0) 3 | else() 4 | cmake_minimum_required(VERSION 3.0.2) 5 | endif() 6 | 7 | INCLUDE(FindPkgConfig) 8 | 9 | find_file( GCRYPT_INCLUDE_FILE gcrypt.h ) 10 | find_path( GCRYPT_INCLUDE_PATH gcrypt.h ) 11 | 12 | find_library( GCRYPT_LIBRARY gcrypt ) 13 | 14 | if( NOT GCRYPT_INCLUDE_FILE ) 15 | MESSAGE( FATAL_ERROR "ERROR: could not find gcrypt header file" ) 16 | else() 17 | MESSAGE( STATUS "Found gcrypt header file: ${GCRYPT_INCLUDE_FILE}" ) 18 | endif() 19 | 20 | if( NOT GCRYPT_LIBRARY ) 21 | MESSAGE( FATAL_ERROR "ERROR: could not find gcrypt library (libgcrypt.so)" ) 22 | else() 23 | MESSAGE( STATUS "Found gcrypt library: ${GCRYPT_LIBRARY}" ) 24 | endif() 25 | 26 | get_filename_component( GCRYPT_LIBRARY_PATH ${GCRYPT_LIBRARY} DIRECTORY ) 27 | 28 | add_library( lxqt-wallet-backend STATIC lxqtwallet.c ) 29 | 30 | if( CMAKE_COMPILER_IS_GNUCC AND CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 7.0 ) 31 | if( WIN32 ) 32 | set_target_properties( lxqt-wallet-backend PROPERTIES COMPILE_FLAGS "-Wall -s -pedantic -Wformat-truncation=0 -I${GCRYPT_INCLUDE_PATH}" ) 33 | else() 34 | set_target_properties( lxqt-wallet-backend PROPERTIES COMPILE_FLAGS "-Wall -s -fPIC -pedantic -Wformat-truncation=0 -I${GCRYPT_INCLUDE_PATH}" ) 35 | endif() 36 | else() 37 | if( WIN32 ) 38 | set_target_properties( lxqt-wallet-backend PROPERTIES COMPILE_FLAGS "-Wall -s -pedantic -I${GCRYPT_INCLUDE_PATH}" ) 39 | else() 40 | set_target_properties( lxqt-wallet-backend PROPERTIES COMPILE_FLAGS "-Wall -s -fPIC -pedantic -I${GCRYPT_INCLUDE_PATH}" ) 41 | endif() 42 | endif() 43 | 44 | if( WIN32 ) 45 | set_target_properties( lxqt-wallet-backend PROPERTIES COMPILE_FLAGS "-Wall -s -pedantic -I${GCRYPT_INCLUDE_PATH}" ) 46 | else() 47 | set_target_properties( lxqt-wallet-backend PROPERTIES COMPILE_FLAGS "-Wall -s -fPIC -pedantic -I${GCRYPT_INCLUDE_PATH}" ) 48 | endif() 49 | 50 | set_target_properties( lxqt-wallet-backend PROPERTIES LINK_FLAGS "-pie" ) 51 | TARGET_LINK_LIBRARIES( lxqt-wallet-backend "${GCRYPT_LIBRARY}" ) 52 | link_directories( "${GCRYPT_LIBRARY_PATH}" ) 53 | -------------------------------------------------------------------------------- /external_libraries/lxqt_wallet/backend/fake_wallet_backend.c: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright (c) 2017 4 | * name : Francis Banyikwa 5 | * email: mhogomchungu@gmail.com 6 | * This program is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 2 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program. If not, see . 18 | */ 19 | 20 | #include "lxqtwallet.h" 21 | 22 | int lxqt_wallet_exists( const char * wallet_name, 23 | const char * application_name ) 24 | { 25 | if( wallet_name && application_name ){} 26 | 27 | return 0 ; 28 | } 29 | 30 | lxqt_wallet_error lxqt_wallet_delete_wallet( const char * wallet_name, 31 | const char * application_name ) 32 | { 33 | if( wallet_name && application_name ){} 34 | return lxqt_wallet_no_error ; 35 | } 36 | 37 | void lxqt_wallet_application_wallet_path( char * path_buffer, 38 | uint32_t path_buffer_size, 39 | const char * application_name ) 40 | { 41 | if( path_buffer && path_buffer_size && application_name ){} 42 | } 43 | 44 | -------------------------------------------------------------------------------- /external_libraries/lxqt_wallet/changelog: -------------------------------------------------------------------------------- 1 | 2 | - version 1.0.0 3 | - initial release 4 | - libgcrypt is used for encryption and decryption of the internal wallet 5 | -------------------------------------------------------------------------------- /external_libraries/lxqt_wallet/frontend/README: -------------------------------------------------------------------------------- 1 | This project seeks to give a functionality for secure storage of information that can be presented in key-pair values 2 | like user names-passwords. 3 | 4 | Currently the project can store the information in KDE's kwallet,GNOME's secret service or in an internal system. 5 | 6 | The internal secure storage system allows the functionality to be provided without dependencies on KDE or gnome libraries. 7 | 8 | The header file with the public API is named "lxqt_wallet.h". 9 | 10 | This project is designed to be used by other projects simply by adding the source folder in the build system and start using it. 11 | 12 | The front end is build on Qt/C++ and has an optional dependency on KDE's kwallet and GNOME's secretservice. 13 | 14 | The project allows other Qt based project's to target one API and use it for secure storage of information in different 15 | secure storage systems. 16 | -------------------------------------------------------------------------------- /external_libraries/lxqt_wallet/frontend/libsecret/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | if(${CMAKE_VERSION} VERSION_GREATER "3.26") 2 | cmake_minimum_required(VERSION 3.5.0) 3 | else() 4 | cmake_minimum_required(VERSION 3.0.2) 5 | endif() 6 | 7 | include_directories( ${LIBSECRET_INCLUDE_DIRS} ) 8 | link_directories( ${LIBSECRET_LIBDIR} ) 9 | add_definitions( -I${LIBSECRET_INCLUDEDIR} ) 10 | 11 | set( SECRETSERVICE_LIBRARY "secretlib" ) 12 | add_library( secretlib STATIC ../libsecret.c ) 13 | target_link_libraries( secretlib ${LIBSECRET_LIBRARIES} -L${LIBSECRET_LIBDIR} ) 14 | set_target_properties( secretlib PROPERTIES COMPILE_FLAGS "-D_FILE_OFFSET_BITS=64 -Wextra -Wall -s -fPIC -pedantic" ) 15 | -------------------------------------------------------------------------------- /external_libraries/tasks/LICENSE: -------------------------------------------------------------------------------- 1 | /* 2 | * copyright: 2014-2018 3 | * name : Francis Banyikwa 4 | * email: mhogomchungu@gmail.com 5 | * 6 | * Redistribution and use in source and binary forms, with or without 7 | * modification, are permitted provided that the following conditions 8 | * are met: 9 | * 10 | * 1. Redistributions of source code must retain the above copyright 11 | * notice, this list of conditions and the following disclaimer. 12 | * 2. Redistributions in binary form must reproduce the above copyright 13 | * notice, this list of conditions and the following disclaimer in 14 | * the documentation and/or other materials provided with the 15 | * distribution. 16 | * 17 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 18 | * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 19 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS 20 | * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE 21 | * COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 22 | * INCIDENTAL, SPECIAL, EXEMPLARY OR CONSEQUENTIAL DAMAGES (INCLUDING, 23 | * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 24 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED 25 | * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 26 | * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT 27 | * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 28 | * SUCH DAMAGE. 29 | */ 30 | -------------------------------------------------------------------------------- /external_libraries/tcplay/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2011 Alex Hornung . 2 | All rights reserved. 3 | 4 | Redistribution and use in source and binary forms, with or without 5 | modification, are permitted provided that the following conditions 6 | are met: 7 | 8 | 1. Redistributions of source code must retain the above copyright 9 | notice, this list of conditions and the following disclaimer. 10 | 2. Redistributions in binary form must reproduce the above copyright 11 | notice, this list of conditions and the following disclaimer in 12 | the documentation and/or other materials provided with the 13 | distribution. 14 | 15 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 16 | ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 17 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS 18 | FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE 19 | COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 20 | INCIDENTAL, SPECIAL, EXEMPLARY OR CONSEQUENTIAL DAMAGES (INCLUDING, 21 | BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 22 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED 23 | AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 24 | OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT 25 | OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 26 | SUCH DAMAGE. 27 | -------------------------------------------------------------------------------- /external_libraries/tcplay/crc32.h: -------------------------------------------------------------------------------- 1 | uint32_t crc32(const void *buf, size_t size); 2 | uint32_t crc32_intermediate(uint32_t crc, uint8_t d); 3 | -------------------------------------------------------------------------------- /external_libraries/tcplay/generic_xts.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2008, Damien Miller 3 | * Copyright (C) 2011, Alex Hornung 4 | * 5 | * Permission to use, copy, and modify this software with or without fee 6 | * is hereby granted, provided that this entire notice is included in 7 | * all copies of any software which is or includes a copy or 8 | * modification of this software. 9 | * You may use this code under the GNU public license if you so wish. Please 10 | * contribute changes back to the authors under this freer than GPL license 11 | * so that we may further the use of strong encryption without limitations to 12 | * all. 13 | * 14 | * THIS SOFTWARE IS BEING PROVIDED "AS IS", WITHOUT ANY EXPRESS OR 15 | * IMPLIED WARRANTY. IN PARTICULAR, NONE OF THE AUTHORS MAKES ANY 16 | * REPRESENTATION OR WARRANTY OF ANY KIND CONCERNING THE 17 | * MERCHANTABILITY OF THIS SOFTWARE OR ITS FITNESS FOR ANY PARTICULAR 18 | * PURPOSE. 19 | */ 20 | 21 | #include 22 | #define XTS_MAX_BLOCKSIZE 16 23 | #define XTS_IVSIZE 8 24 | #define XTS_ALPHA 0x87 /* GF(2^128) generator polynomial */ 25 | 26 | typedef int (*encrypt_decrypt_fn)(void *, size_t, const uint8_t *, uint8_t *); 27 | typedef int (*set_key_fn)(void **, void *, void *, const uint8_t *, int); 28 | typedef int (*zero_key_fn)(void **); 29 | 30 | 31 | struct xts_ctx { 32 | encrypt_decrypt_fn encrypt_fn; 33 | encrypt_decrypt_fn decrypt_fn; 34 | set_key_fn set_key_fn; 35 | zero_key_fn zero_key_fn; 36 | 37 | void *ctx1; 38 | void *ctx2; 39 | uint8_t tweak[XTS_MAX_BLOCKSIZE]; 40 | uint32_t blk_sz; 41 | }; 42 | 43 | int xts_init(struct xts_ctx *ctxp, void *arg1, void *arg2, set_key_fn set_key_fn, 44 | zero_key_fn zero_key_fn, encrypt_decrypt_fn encrypt_fn, 45 | encrypt_decrypt_fn decrypt_fn, uint32_t blk_sz, uint8_t *key, int len); 46 | int xts_encrypt(struct xts_ctx *ctx, uint8_t *data, size_t len, uint8_t *iv); 47 | int xts_decrypt(struct xts_ctx *ctx, uint8_t *data, size_t len, uint8_t *iv); 48 | int xts_uninit(struct xts_ctx *ctxp); 49 | 50 | -------------------------------------------------------------------------------- /external_libraries/tcplay/humanize.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2011 Alex Hornung . 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions 7 | * are met: 8 | * 9 | * 1. Redistributions of source code must retain the above copyright 10 | * notice, this list of conditions and the following disclaimer. 11 | * 2. Redistributions in binary form must reproduce the above copyright 12 | * notice, this list of conditions and the following disclaimer in 13 | * the documentation and/or other materials provided with the 14 | * distribution. 15 | * 16 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 17 | * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 18 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS 19 | * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE 20 | * COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 21 | * INCIDENTAL, SPECIAL, EXEMPLARY OR CONSEQUENTIAL DAMAGES (INCLUDING, 22 | * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 23 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED 24 | * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 25 | * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT 26 | * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 27 | * SUCH DAMAGE. 28 | */ 29 | 30 | int _humanize_number(char *buf, size_t bufsz, uint64_t num); 31 | int _dehumanize_number(const char *buf, uint64_t *dest); 32 | 33 | -------------------------------------------------------------------------------- /external_libraries/tcplay/pbkdf2-openssl.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2011 Alex Hornung . 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions 7 | * are met: 8 | * 9 | * 1. Redistributions of source code must retain the above copyright 10 | * notice, this list of conditions and the following disclaimer. 11 | * 2. Redistributions in binary form must reproduce the above copyright 12 | * notice, this list of conditions and the following disclaimer in 13 | * the documentation and/or other materials provided with the 14 | * distribution. 15 | * 16 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 17 | * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 18 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS 19 | * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE 20 | * COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 21 | * INCIDENTAL, SPECIAL, EXEMPLARY OR CONSEQUENTIAL DAMAGES (INCLUDING, 22 | * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 23 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED 24 | * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 25 | * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT 26 | * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 27 | * SUCH DAMAGE. 28 | */ 29 | 30 | #include 31 | #include 32 | 33 | #include "tcplay.h" 34 | 35 | 36 | int 37 | pbkdf2(struct pbkdf_prf_algo *hash, const char *pass, int passlen, 38 | const unsigned char *salt, int saltlen, 39 | int keylen, unsigned char *out) 40 | { 41 | const EVP_MD *md; 42 | int r; 43 | 44 | OpenSSL_add_all_algorithms(); 45 | 46 | md = EVP_get_digestbyname(hash->algo); 47 | if (md == NULL) { 48 | tc_log(1, "Hash %s not found\n", hash->algo); 49 | return ENOENT; 50 | } 51 | r = PKCS5_PBKDF2_HMAC(pass, passlen, salt, saltlen, 52 | hash->iteration_count, md, keylen, out); 53 | 54 | if (r == 0) { 55 | tc_log(1, "Error in PBKDF2\n"); 56 | return EINVAL; 57 | } 58 | 59 | return 0; 60 | } 61 | 62 | -------------------------------------------------------------------------------- /external_libraries/tcplay/tcplay.map: -------------------------------------------------------------------------------- 1 | { 2 | global: 3 | tc_api_init; 4 | tc_api_uninit; 5 | tc_api_has; 6 | tc_api_cipher_iterate; 7 | tc_api_prf_iterate; 8 | tc_api_task_init; 9 | tc_api_task_uninit; 10 | tc_api_task_set; 11 | tc_api_task_do; 12 | tc_api_task_info_get; 13 | local: 14 | *; 15 | }; 16 | -------------------------------------------------------------------------------- /external_libraries/tcplay/tcplay_api_internal.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2011 Alex Hornung . 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions 7 | * are met: 8 | * 9 | * 1. Redistributions of source code must retain the above copyright 10 | * notice, this list of conditions and the following disclaimer. 11 | * 2. Redistributions in binary form must reproduce the above copyright 12 | * notice, this list of conditions and the following disclaimer in 13 | * the documentation and/or other materials provided with the 14 | * distribution. 15 | * 16 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 17 | * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 18 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS 19 | * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE 20 | * COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 21 | * INCIDENTAL, SPECIAL, EXEMPLARY OR CONSEQUENTIAL DAMAGES (INCLUDING, 22 | * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 23 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED 24 | * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 25 | * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT 26 | * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 27 | * SUCH DAMAGE. 28 | */ 29 | 30 | #ifndef _TCPLAY_API_INTERNAL_H 31 | #define _TCPLAY_API_INTERNAL_H 32 | 33 | #include 34 | #include "tcplay.h" 35 | 36 | typedef enum tc_api_op { 37 | TC_OP_CREATE, 38 | TC_OP_MAP, 39 | TC_OP_UNMAP, 40 | TC_OP_INFO, 41 | TC_OP_INFO_MAPPED, 42 | TC_OP_MODIFY, 43 | TC_OP_RESTORE 44 | } tc_api_op; 45 | 46 | struct _tc_api_task { 47 | tc_api_op op; 48 | struct tcplay_opts *opts; 49 | struct tcplay_info *last_info; 50 | }; 51 | 52 | #endif 53 | -------------------------------------------------------------------------------- /external_libraries/tcplay/tcplay_api_test.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | 6 | #include "tcplay_api.h" 7 | 8 | int 9 | main(void) 10 | { 11 | tc_api_opts api_opts; 12 | int error; 13 | 14 | error = tc_api_init(/* verbose */1); 15 | assert(error == 0); 16 | 17 | memset(&api_opts, 0, sizeof(api_opts)); 18 | api_opts.tc_device = "/dev/vn1s0"; 19 | api_opts.tc_passphrase = "apitest2"; 20 | api_opts.tc_keyfiles = NULL; 21 | api_opts.tc_keyfiles_hidden = NULL; 22 | api_opts.tc_size_hidden_in_bytes = 12000*512; 23 | api_opts.tc_passphrase_hidden = "apihidden"; 24 | api_opts.tc_cipher = "AES-256-XTS,TWOFISH-256-XTS,SERPENT-256-XTS"; 25 | api_opts.tc_cipher_hidden = "SERPENT-256-XTS,TWOFISH-256-XTS"; 26 | api_opts.tc_prf_hash = "whirlpool"; 27 | api_opts.tc_prf_hash_hidden = "RIPEMD160"; 28 | 29 | error = tc_api_create_volume(&api_opts); 30 | if (error) 31 | printf("API ERROR: %s\n", tc_api_get_error_msg()); 32 | assert(error == 0); 33 | 34 | error = tc_api_uninit(); 35 | assert(error == 0); 36 | 37 | error = tc_api_init(/*verbose */ 1); 38 | assert(error == 0); 39 | 40 | api_opts.tc_passphrase = NULL; 41 | api_opts.tc_map_name = "dragonfly-test"; 42 | api_opts.tc_password_retries = 5; 43 | api_opts.tc_interactive_prompt = 1; 44 | api_opts.tc_prompt_timeout = 5; 45 | error = tc_api_map_volume(&api_opts); 46 | if (error) 47 | printf("API MAP ERROR: %s\n", tc_api_get_error_msg()); 48 | assert(error == 0); 49 | 50 | system("dmsetup ls"); 51 | tc_api_unmap_volume(&api_opts); 52 | 53 | error = tc_api_uninit(); 54 | assert(error == 0); 55 | 56 | return 0; 57 | } 58 | 59 | -------------------------------------------------------------------------------- /images/Screenshot_20190912_121900.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mhogomchungu/zuluCrypt/5e6a307b9540ea9d9f6bf05ffb35509f94ae9dc9/images/Screenshot_20190912_121900.png -------------------------------------------------------------------------------- /images/Screenshot_20190912_121934.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mhogomchungu/zuluCrypt/5e6a307b9540ea9d9f6bf05ffb35509f94ae9dc9/images/Screenshot_20190912_121934.png -------------------------------------------------------------------------------- /images/Screenshot_20190912_122017.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mhogomchungu/zuluCrypt/5e6a307b9540ea9d9f6bf05ffb35509f94ae9dc9/images/Screenshot_20190912_122017.png -------------------------------------------------------------------------------- /images/Screenshot_20190912_122040.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mhogomchungu/zuluCrypt/5e6a307b9540ea9d9f6bf05ffb35509f94ae9dc9/images/Screenshot_20190912_122040.png -------------------------------------------------------------------------------- /images/Screenshot_20190912_122108.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mhogomchungu/zuluCrypt/5e6a307b9540ea9d9f6bf05ffb35509f94ae9dc9/images/Screenshot_20190912_122108.png -------------------------------------------------------------------------------- /plugins/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | if(${CMAKE_VERSION} VERSION_GREATER "3.26") 2 | cmake_minimum_required(VERSION 3.26.0) 3 | else() 4 | cmake_minimum_required(VERSION 3.0.2) 5 | endif() 6 | 7 | if( NOT NOKDE ) 8 | #add_subdirectory( kwallet ) 9 | endif() 10 | 11 | add_subdirectory( keydialog-qt ) 12 | 13 | add_definitions( -D_FILE_OFFSET_BITS=64 -Wall -pedantic -I${PROJECT_BINARY_DIR}/plugins -I${PROJECT_BINARY_DIR} ) 14 | 15 | if( CMAKE_COMPILER_IS_GNUCC AND CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 10.0.0) 16 | set( CMAKE_CXX_STANDARD 14 ) 17 | MESSAGE( STATUS "Setting C++ version to C++14" ) 18 | else() 19 | set( CMAKE_CXX_STANDARD 14 ) 20 | MESSAGE( STATUS "Setting C++ version to C++14" ) 21 | endif() 22 | 23 | set( CMAKE_CXX_STANDARD_REQUIRED ON ) 24 | set( CMAKE_CXX_EXTENSIONS OFF) 25 | 26 | if(BUILD_WITH_QT6) 27 | 28 | add_library( plugin STATIC mainwindow.h mainwindow.ui mainwindow.cpp ) 29 | 30 | TARGET_LINK_LIBRARIES( plugin sharedObject ${Qt6Widgets_LIBRARIES} ${Qt6Core_LIBRARIES} ) 31 | else() 32 | QT5_WRAP_UI( UI mainwindow.ui ) 33 | QT5_WRAP_CPP( MOC mainwindow.h ) 34 | 35 | add_library( plugin STATIC ${MOC} ${UI} mainwindow.cpp ) 36 | 37 | TARGET_LINK_LIBRARIES( plugin sharedObject ${Qt5Widgets_LIBRARIES} ${Qt5Core_LIBRARIES} ) 38 | endif() 39 | 40 | set_target_properties( plugin PROPERTIES COMPILE_FLAGS "-D_FILE_OFFSET_BITS=64 -Wextra -Wall -s -fPIC -pthread -pedantic " ) 41 | 42 | TARGET_LINK_LIBRARIES( plugin sharedObject zuluCryptPluginManager ${blkid} ) 43 | 44 | add_subdirectory( gpg ) 45 | add_subdirectory( keykeyfile ) 46 | add_subdirectory( steghide ) 47 | #add_subdirectory( luks ) 48 | add_subdirectory( tomb ) 49 | add_subdirectory( hmac ) 50 | #add_subdirectory( generic_header ) 51 | 52 | #add_subdirectory( network_key ) 53 | 54 | #keyring module is handled by CMakeLists.txt in ../zuluCrypt-cli 55 | #add_subdirectory( keyring ) 56 | -------------------------------------------------------------------------------- /plugins/default.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mhogomchungu/zuluCrypt/5e6a307b9540ea9d9f6bf05ffb35509f94ae9dc9/plugins/default.png -------------------------------------------------------------------------------- /plugins/file.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mhogomchungu/zuluCrypt/5e6a307b9540ea9d9f6bf05ffb35509f94ae9dc9/plugins/file.png -------------------------------------------------------------------------------- /plugins/generic_header/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | if(${CMAKE_VERSION} VERSION_GREATER "3.26") 2 | cmake_minimum_required(VERSION 3.5.0) 3 | else() 4 | cmake_minimum_required(VERSION 3.0.2) 5 | endif() 6 | 7 | add_definitions( -D_FILE_OFFSET_BITS=64 -Wall -pedantic -std=c++17 -I${PROJECT_BINARY_DIR}/plugins/luks -I${PROJECT_BINARY_DIR} ) 8 | 9 | if( QT5 ) 10 | QT5_ADD_RESOURCES( ICON ../icon.qrc ) 11 | add_executable( generic_header ${ICON} main.cpp ) 12 | else() 13 | QT4_ADD_RESOURCES( ICON ../icon.qrc ) 14 | add_executable( generic_header ${ICON} main.cpp ) 15 | endif() 16 | 17 | set_target_properties( generic_header PROPERTIES INSTALL_RPATH "${CMAKE_INSTALL_FULL_LIBDIR}" ) 18 | set_target_properties( generic_header PROPERTIES COMPILE_FLAGS "-D_FILE_OFFSET_BITS=64 -Wall -s -fPIE -pthread -pedantic " ) 19 | 20 | TARGET_LINK_LIBRARIES( generic_header plugin ) 21 | 22 | install( TARGETS generic_header RUNTIME DESTINATION "${PLUGINPATH}" ) 23 | -------------------------------------------------------------------------------- /plugins/generic_header/main.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright (c) 2012-2015 4 | * name : Francis Banyikwa 5 | * email: mhogomchungu@gmail.com 6 | * This program is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 2 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program. If not, see . 18 | */ 19 | 20 | #include 21 | #include "../mainwindow.h" 22 | #include "../plugins.h" 23 | 24 | int main( int argc,char * argv[] ) 25 | { 26 | QApplication a( argc,argv ) ; 27 | 28 | MainWindow w( plugins::luks ) ; 29 | 30 | w.setToken( argv ) ; 31 | w.setApplicationName( "luks" ) ; 32 | w.setkeyLabel( QObject::tr( "Enter LUKS Key Below" ) ) ; 33 | w.setkeyFileLabel( QObject::tr( "Enter A Path To A LUKS Header Below" ) ) ; 34 | 35 | w.Show() ; 36 | 37 | return a.exec() ; 38 | } 39 | -------------------------------------------------------------------------------- /plugins/gpg/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | if(${CMAKE_VERSION} VERSION_GREATER "3.26") 2 | cmake_minimum_required(VERSION 3.26.0) 3 | else() 4 | cmake_minimum_required(VERSION 3.0.2) 5 | endif() 6 | 7 | add_definitions( -D_FILE_OFFSET_BITS=64 -Wall -pedantic -std=c++17 -I${PROJECT_BINARY_DIR}/plugins/gpg -I${PROJECT_BINARY_DIR} ) 8 | 9 | if(BUILD_WITH_QT6) 10 | add_executable( gpg ../icon.qrc main.cpp ) 11 | else() 12 | QT5_ADD_RESOURCES( ICON ../icon.qrc ) 13 | add_executable( gpg ${ICON} main.cpp ) 14 | endif() 15 | 16 | #set_target_properties( gpg PROPERTIES INSTALL_RPATH "${CMAKE_INSTALL_FULL_LIBDIR}" ) 17 | set_target_properties( gpg PROPERTIES COMPILE_FLAGS "-D_FILE_OFFSET_BITS=64 -Wall -s -fPIE -pthread -pedantic " ) 18 | 19 | TARGET_LINK_LIBRARIES( gpg plugin ) 20 | 21 | install( TARGETS gpg RUNTIME DESTINATION "${PLUGINPATH}" ) 22 | -------------------------------------------------------------------------------- /plugins/gpg/main.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright (c) 2012-2015 4 | * name : Francis Banyikwa 5 | * email: mhogomchungu@gmail.com 6 | * This program is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 2 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program. If not, see . 18 | */ 19 | 20 | #include 21 | #include "../mainwindow.h" 22 | 23 | #include "../plugins.h" 24 | 25 | int main( int argc,char * argv[] ) 26 | { 27 | QApplication a( argc,argv ) ; 28 | 29 | MainWindow w( plugins::gpg ) ; 30 | 31 | w.setToken( argv ) ; 32 | w.setApplicationName( "gpg" ) ; 33 | w.setkeyLabel( QObject::tr( "Enter GPG Key Below" ) ) ; 34 | w.setkeyFileLabel( QObject::tr( "Enter A Path To A GPG Keyfile Below" ) ) ; 35 | 36 | w.setExe( { "gpg" } ) ; 37 | 38 | w.Show() ; 39 | 40 | return a.exec() ; 41 | } 42 | -------------------------------------------------------------------------------- /plugins/hmac/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | if(${CMAKE_VERSION} VERSION_GREATER "3.26") 2 | cmake_minimum_required(VERSION 3.26.0) 3 | else() 4 | cmake_minimum_required(VERSION 3.0.2) 5 | endif() 6 | 7 | add_definitions( -D_FILE_OFFSET_BITS=64 -Wall -pedantic -std=c++17 -I${PROJECT_BINARY_DIR} ) 8 | 9 | if(BUILD_WITH_QT6) 10 | add_executable( hmac ../icon.qrc main.cpp ) 11 | else() 12 | QT5_ADD_RESOURCES( ICON ../icon.qrc ) 13 | add_executable( hmac ${ICON} main.cpp ) 14 | endif() 15 | 16 | #set_target_properties( hmac PROPERTIES INSTALL_RPATH "${CMAKE_INSTALL_FULL_LIBDIR}" ) 17 | set_target_properties( hmac PROPERTIES COMPILE_FLAGS "-D_FILE_OFFSET_BITS=64 -Wall -s -fPIE -pthread -pedantic " ) 18 | 19 | TARGET_LINK_LIBRARIES( hmac plugin -lgcrypt ) 20 | 21 | install( TARGETS hmac RUNTIME DESTINATION "${PLUGINPATH}" ) 22 | -------------------------------------------------------------------------------- /plugins/hmac/README: -------------------------------------------------------------------------------- 1 | 2 | This plugin takes a path to a keyfile and a password and then 3 | generates a key by calculating hmac-sha256 of the contents of the keyfile using the 4 | provided password. 5 | -------------------------------------------------------------------------------- /plugins/hmac/hmac.pro: -------------------------------------------------------------------------------- 1 | #------------------------------------------------- 2 | # 3 | # Project created by QtCreator 2012-08-26T19:48:55 4 | # 5 | #------------------------------------------------- 6 | 7 | QT += core gui 8 | 9 | TARGET = hmac 10 | TEMPLATE = app 11 | 12 | SOURCES += main.cpp\ 13 | ../mainwindow.cpp \ 14 | ../../zuluCrypt-gui/dialogmsg.cpp 15 | 16 | HEADERS += ../mainwindow.h \ 17 | ../../zuluCrypt-gui/dialogmsg.h 18 | 19 | FORMS += ../mainwindow.ui ../../zuluCrypt-gui/dialogmsg.ui 20 | 21 | QMAKE_CXXFLAGS += -std=c++11 22 | -------------------------------------------------------------------------------- /plugins/hmac/main.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright (c) 2015 4 | * name : Francis Banyikwa 5 | * email: mhogomchungu@gmail.com 6 | * This program is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 2 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program. If not, see . 18 | */ 19 | 20 | #include "../mainwindow.h" 21 | #include "../plugins.h" 22 | 23 | #include 24 | 25 | int main( int argc,char * argv[] ) 26 | { 27 | QApplication a( argc,argv ) ; 28 | 29 | MainWindow w( plugins::hmac_key_1 ) ; 30 | 31 | w.setToken( argv ) ; 32 | w.setApplicationName( "hmac" ) ; 33 | w.setkeyLabel( QObject::tr( "Enter A Password Below" ) ) ; 34 | w.setkeyFileLabel( QObject::tr( "Enter A Path To A Keyfile Below" ) ) ; 35 | 36 | w.Show() ; 37 | 38 | return a.exec() ; 39 | } 40 | -------------------------------------------------------------------------------- /plugins/icon.qrc: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | default.png 6 | keyfile.png 7 | file.png 8 | 9 | 10 | -------------------------------------------------------------------------------- /plugins/keydialog-qt/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | if(${CMAKE_VERSION} VERSION_GREATER "3.26") 2 | cmake_minimum_required(VERSION 3.26.0) 3 | else() 4 | cmake_minimum_required(VERSION 3.0.2) 5 | endif() 6 | 7 | add_definitions( -D_FILE_OFFSET_BITS=64 -Wall -pedantic -std=c++17 -I${PROJECT_BINARY_DIR}/plugins/keydialog-qt -I${PROJECT_BINARY_DIR} ) 8 | 9 | if(BUILD_WITH_QT6) 10 | add_executable( keydialog-qt icon.qrc mainwindow.h mainwindow.ui main.cpp mainwindow.cpp ) 11 | TARGET_LINK_LIBRARIES( keydialog-qt sharedObject ${Qt6Widgets_LIBRARIES} ${Qt6Core_LIBRARIES} zuluCryptPluginManager ${blkid} ) 12 | #set_target_properties( keydialog-qt PROPERTIES INSTALL_RPATH "${CMAKE_INSTALL_FULL_LIBDIR}" ) 13 | set_target_properties( keydialog-qt PROPERTIES COMPILE_FLAGS "-D_FILE_OFFSET_BITS=64 -Wall -s -fPIE -pthread -pedantic " ) 14 | else() 15 | QT5_WRAP_UI( UI mainwindow.ui ) 16 | QT5_WRAP_CPP( MOC mainwindow.h ) 17 | QT5_ADD_RESOURCES( ICON icon.qrc ) 18 | 19 | add_executable( keydialog-qt ${ICON} ${MOC} ${UI} main.cpp mainwindow.cpp ) 20 | TARGET_LINK_LIBRARIES( keydialog-qt sharedObject ${Qt5Widgets_LIBRARIES} ${Qt5Core_LIBRARIES} zuluCryptPluginManager ${blkid} ) 21 | #set_target_properties( keydialog-qt PROPERTIES INSTALL_RPATH "${CMAKE_INSTALL_FULL_LIBDIR}" ) 22 | set_target_properties( keydialog-qt PROPERTIES COMPILE_FLAGS "-D_FILE_OFFSET_BITS=64 -Wall -s -fPIE -pthread -pedantic " ) 23 | endif() 24 | 25 | install( TARGETS keydialog-qt RUNTIME DESTINATION "${PLUGINPATH}" ) 26 | -------------------------------------------------------------------------------- /plugins/keydialog-qt/icon.qrc: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | key.png 6 | 7 | -------------------------------------------------------------------------------- /plugins/keydialog-qt/key.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mhogomchungu/zuluCrypt/5e6a307b9540ea9d9f6bf05ffb35509f94ae9dc9/plugins/keydialog-qt/key.png -------------------------------------------------------------------------------- /plugins/keydialog-qt/keydialog-qt.pro: -------------------------------------------------------------------------------- 1 | #------------------------------------------------- 2 | # 3 | # Project created by QtCreator 2012-08-26T19:48:55 4 | # 5 | #------------------------------------------------- 6 | 7 | QT += core gui 8 | 9 | TARGET = keykeyfile 10 | TEMPLATE = app 11 | 12 | SOURCES += main.cpp\ 13 | mainwindow.cpp \ 14 | ../../zuluCrypt-gui/socketsendkey.cpp \ 15 | ../../zuluCrypt-gui/dialogmsg.cpp 16 | 17 | HEADERS += mainwindow.h \ 18 | ../../zuluCrypt-gui/socketsendkey.h \ 19 | ../../zuluCrypt-gui/dialogmsg.h 20 | 21 | FORMS += mainwindow.ui ../../zuluCrypt-gui/dialogmsg.ui 22 | 23 | 24 | LIBS += -lzuluCryptPluginManager 25 | -------------------------------------------------------------------------------- /plugins/keydialog-qt/main.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright (c) 2012-2015 4 | * name : Francis Banyikwa 5 | * email: mhogomchungu@gmail.com 6 | * This program is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 2 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program. If not, see . 18 | */ 19 | 20 | #include 21 | #include "mainwindow.h" 22 | 23 | int main( int argc,char * argv[] ) 24 | { 25 | QApplication a( argc,argv ) ; 26 | MainWindow w ; 27 | w.setToken( argv ) ; 28 | w.show() ; 29 | 30 | return a.exec() ; 31 | } 32 | -------------------------------------------------------------------------------- /plugins/keydialog-qt/mainwindow.h: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright (c) 2012-2015 4 | * name : Francis Banyikwa 5 | * email: mhogomchungu@gmail.com 6 | * This program is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 2 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program. If not, see . 18 | */ 19 | 20 | #ifndef MAINWINDOW_H 21 | #define MAINWINDOW_H 22 | 23 | #include 24 | 25 | #include 26 | #include 27 | #include 28 | #include 29 | #include 30 | #include 31 | #include 32 | 33 | #include "../../zuluCrypt-gui/dialogmsg.h" 34 | 35 | namespace Ui { 36 | class MainWindow; 37 | } 38 | 39 | class MainWindow : public QWidget 40 | { 41 | Q_OBJECT 42 | public: 43 | MainWindow( QWidget * parent = 0 ) ; 44 | void setToken( char * const * ) ; 45 | ~MainWindow(); 46 | private slots: 47 | void defaultButton( void ) ; 48 | void pbOpen( void ) ; 49 | void pbCancel( void ) ; 50 | void done( void ) ; 51 | private: 52 | void closeEvent( QCloseEvent * ) ; 53 | void SetFocus( void ); 54 | Ui::MainWindow * m_ui; 55 | QString m_token ; 56 | void * m_handle ; 57 | }; 58 | 59 | #endif // MAINWINDOW_H 60 | -------------------------------------------------------------------------------- /plugins/keydialog-qt/mainwindow.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | MainWindow 4 | 5 | 6 | 7 | 0 8 | 0 9 | 542 10 | 82 11 | 12 | 13 | 14 | Send A Key To Unlock A Volume 15 | 16 | 17 | 18 | 19 | 0 20 | 0 21 | 541 22 | 81 23 | 24 | 25 | 26 | 27 | 28 | 180 29 | 50 30 | 91 31 | 31 32 | 33 | 34 | 35 | &Send 36 | 37 | 38 | 39 | 40 | 41 | 270 42 | 50 43 | 91 44 | 31 45 | 46 | 47 | 48 | &Cancel 49 | 50 | 51 | 52 | 53 | 54 | 0 55 | 20 56 | 81 57 | 31 58 | 59 | 60 | 61 | Key 62 | 63 | 64 | Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter 65 | 66 | 67 | 68 | 69 | 70 | 90 71 | 20 72 | 361 73 | 31 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 0 82 | 0 83 | 0 84 | 6 85 | 86 | 87 | 88 | 89 | 90 | 91 | lineEditKey 92 | pbOpen 93 | pbCancel 94 | 95 | 96 | 97 | 98 | -------------------------------------------------------------------------------- /plugins/keyfile.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mhogomchungu/zuluCrypt/5e6a307b9540ea9d9f6bf05ffb35509f94ae9dc9/plugins/keyfile.png -------------------------------------------------------------------------------- /plugins/keykeyfile/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | if(${CMAKE_VERSION} VERSION_GREATER "3.26") 2 | cmake_minimum_required(VERSION 3.26.0) 3 | else() 4 | cmake_minimum_required(VERSION 3.0.2) 5 | endif() 6 | 7 | add_definitions( -D_FILE_OFFSET_BITS=64 -Wall -pedantic -std=c++17 -I${PROJECT_BINARY_DIR}/plugins/keykeyfile -I${PROJECT_BINARY_DIR} ) 8 | 9 | if(BUILD_WITH_QT6) 10 | add_executable( keykeyfile ../icon.qrc main.cpp ) 11 | else() 12 | QT5_ADD_RESOURCES( ICON ../icon.qrc ) 13 | add_executable( keykeyfile ${ICON} main.cpp ) 14 | endif() 15 | 16 | #set_target_properties( keykeyfile PROPERTIES INSTALL_RPATH "${CMAKE_INSTALL_FULL_LIBDIR}" ) 17 | set_target_properties( keykeyfile PROPERTIES COMPILE_FLAGS "-D_FILE_OFFSET_BITS=64 -Wall -s -fPIE -pthread -pedantic " ) 18 | 19 | TARGET_LINK_LIBRARIES( keykeyfile plugin ) 20 | 21 | install( TARGETS keykeyfile RUNTIME DESTINATION "${PLUGINPATH}" ) 22 | -------------------------------------------------------------------------------- /plugins/keykeyfile/main.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright (c) 2012-2015 4 | * name : Francis Banyikwa 5 | * email: mhogomchungu@gmail.com 6 | * This program is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 2 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program. If not, see . 18 | */ 19 | 20 | #include 21 | #include "../mainwindow.h" 22 | #include "../plugins.h" 23 | 24 | int main( int argc,char * argv[] ) 25 | { 26 | QApplication a( argc,argv ) ; 27 | 28 | MainWindow w( plugins::keyKeyFile ) ; 29 | 30 | w.setToken( argv ) ; 31 | w.setkeyLabel( QObject::tr( "Enter Key Below" ) ) ; 32 | w.setkeyFileLabel( QObject::tr( "Enter A Path To A Keyfile Below" ) ) ; 33 | w.setButtonIcon( "Keyfile" ) ; 34 | 35 | w.Show() ; 36 | 37 | return a.exec() ; 38 | } 39 | -------------------------------------------------------------------------------- /plugins/keyring/README: -------------------------------------------------------------------------------- 1 | 2 | This source file is handled by "CMakeLists.txt" file in ../../zuluCrypt-cli 3 | -------------------------------------------------------------------------------- /plugins/kwallet/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | if(${CMAKE_VERSION} VERSION_GREATER "3.26") 2 | cmake_minimum_required(VERSION 3.5.0) 3 | else() 4 | cmake_minimum_required(VERSION 3.0.2) 5 | endif() 6 | 7 | if( QT5 ) 8 | #QT5_WRAP_CPP( MOC wallet.h ) 9 | else() 10 | find_package(KDE4 QUIET) 11 | if(KDE4_FOUND) 12 | find_library( LIBKWALLETBACKEND_ libkwalletbackend.so ) 13 | find_library( LIBQTCORE_ libQtCore.so ) 14 | find_library( LIBQTGUI_ libQtGui.so ) 15 | find_library( LIBKDEUI_ libkdeui.so ) 16 | find_library( LIBKDECORE_ libkdecore.so ) 17 | 18 | if( NOT LIBKWALLETBACKEND_ ) 19 | find_library( LIBKWALLETBACKEND_ libkwalletbackend.so.4 ) 20 | endif() 21 | 22 | if( LIBKWALLETBACKEND_ ) 23 | if( LIBQTCORE_ ) 24 | if( LIBQTGUI_ ) 25 | if( LIBKDEUI_ ) 26 | if( LIBKDECORE_ ) 27 | include(KDE4Defaults) 28 | include_directories(${KDE4_INCLUDES}) 29 | add_definitions(-I${KDE4_INCLUDE_DIR}) 30 | 31 | add_definitions( -D_FILE_OFFSET_BITS=64 -Wall -pedantic -std=c++11 -I${PROJECT_BINARY_DIR}/plugins/kwallet/ -I${PROJECT_BINARY_DIR} -I${KDEINCLUDE} ) 32 | 33 | INCLUDE( ${QT_USE_FILE} ) 34 | QT4_WRAP_CPP( MOC wallet.h ) 35 | 36 | add_executable( kwallet ${MOC} main.cpp wallet.cpp ) 37 | 38 | TARGET_LINK_LIBRARIES( kwallet ${LIBQTCORE_} ${LIBQTGUI_} ${LIBKDECORE_} ${LIBKDEUI_} sharedObject ${LIBKWALLETBACKEND_} zuluCryptPluginManager ) 39 | set_target_properties( kwallet PROPERTIES INSTALL_RPATH "${CMAKE_INSTALL_FULL_LIBDIR}" ) 40 | set_target_properties( kwallet PROPERTIES COMPILE_FLAGS "-D_FILE_OFFSET_BITS=64 -Wall -s -fPIE -pthread -pedantic " ) 41 | 42 | install( TARGETS kwallet RUNTIME DESTINATION "${PLUGINPATH}" ) 43 | endif() 44 | endif() 45 | endif() 46 | endif() 47 | endif() 48 | endif() 49 | endif() 50 | 51 | 52 | -------------------------------------------------------------------------------- /plugins/kwallet/kwallet.pro: -------------------------------------------------------------------------------- 1 | #------------------------------------------------- 2 | # 3 | # Project created by QtCreator 2012-08-10T23:43:26 4 | # 5 | #------------------------------------------------- 6 | 7 | QT += core 8 | 9 | QT -= gui 10 | 11 | TARGET = kwallet 12 | CONFIG += console 13 | CONFIG -= app_bundle 14 | 15 | TEMPLATE = app 16 | 17 | 18 | SOURCES += main.cpp \ 19 | wallet.cpp \ 20 | ../../zuluCrypt-gui/socketsendkey.cpp \ 21 | ../../zuluCrypt-gui/zuluoptions.cpp 22 | 23 | QMAKE_CXXFLAGS += -I/home/local/KDE4/include -Wall 24 | 25 | LIBS += -lkwalletbackend -L/home/local/KDE4/lib -lzuluCryptPluginManager 26 | 27 | INCLUDEPATH +=/home/ink/build /home/local/KDE4/include 28 | 29 | HEADERS += \ 30 | wallet.h \ 31 | ../../zuluCrypt-gui/socketsendkey.h \ 32 | ../../zuluCrypt-gui/zuluoptions.h 33 | -------------------------------------------------------------------------------- /plugins/kwallet/main.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright (c) 2012-2015 4 | * name : Francis Banyikwa 5 | * email: mhogomchungu@gmail.com 6 | * This program is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 2 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program. If not, see . 18 | */ 19 | 20 | 21 | #include 22 | #include "wallet.h" 23 | 24 | int main( int argc,char * argv[] ) 25 | { 26 | QCoreApplication a( argc,argv ) ; 27 | 28 | wallet w( argv[ 1 ],argv[ 2 ],argv[ 3 ] ) ; 29 | 30 | QCoreApplication::setApplicationName( "zuluCrypt kwallet plugin" ) ; 31 | 32 | QMetaObject::invokeMethod( &w,"openWallet",Qt::QueuedConnection ) ; 33 | 34 | return a.exec() ; 35 | } 36 | -------------------------------------------------------------------------------- /plugins/kwallet/wallet.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright (c) 2012-2015 4 | * name : Francis Banyikwa 5 | * email: mhogomchungu@gmail.com 6 | * This program is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 2 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program. If not, see . 18 | */ 19 | 20 | #include "wallet.h" 21 | #include 22 | #include "../../zuluCrypt-gui/utility.h" 23 | 24 | #include "../../zuluCrypt-cli/pluginManager/libzuluCryptPluginManager.h" 25 | 26 | wallet::wallet( const QString& path,const QString& uuid,const QString& sockAddr ) 27 | { 28 | if( uuid == "Nil" ){ 29 | m_keyID = path ; 30 | }else{ 31 | m_keyID = QString( "UUID=\"%1\"" ).arg( uuid ) ; 32 | } 33 | 34 | m_sockAddr = sockAddr ; 35 | m_handle = ::zuluCryptPluginManagerOpenConnection( m_sockAddr.toLatin1().constData() ) ; 36 | } 37 | 38 | void wallet::openWallet() 39 | { 40 | m_wallet = Wallet::openWallet( KWallet::Wallet::LocalWallet(),0,KWallet::Wallet::Synchronous ) ; 41 | 42 | if( m_wallet ){ 43 | m_wallet->setFolder( utility::applicationName() ) ; 44 | QString key ; 45 | m_wallet->readPassword( m_keyID,key ) ; 46 | if( key.isEmpty() && m_keyID.startsWith( "UUID=" ) ){ 47 | m_wallet->readPassword( m_keyID.replace( "\"","" ),key ) ; 48 | } 49 | if( key.isEmpty() ){ 50 | QCoreApplication::exit( 1 ) ; 51 | }else{ 52 | ::zuluCryptPluginManagerSendKey( m_handle,key.toLatin1().constData(),key.size() ) ; 53 | QCoreApplication::exit( 0 ) ; 54 | } 55 | }else{ 56 | QCoreApplication::exit( 1 ) ; 57 | } 58 | } 59 | 60 | wallet::~wallet() 61 | { 62 | ::zuluCryptPluginManagerCloseConnection( m_handle ) ; 63 | delete m_wallet ; 64 | } 65 | -------------------------------------------------------------------------------- /plugins/kwallet/wallet.h: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright (c) 2012-2015 4 | * name : Francis Banyikwa 5 | * email: mhogomchungu@gmail.com 6 | * This program is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 2 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program. If not, see . 18 | */ 19 | 20 | #ifndef WALLET_H 21 | #define WALLET_H 22 | 23 | #include 24 | #include 25 | #include 26 | #include 27 | #include 28 | #include 29 | #include 30 | #include 31 | #include "wallet.h" 32 | 33 | using namespace KWallet ; 34 | 35 | class wallet : public QObject 36 | { 37 | Q_OBJECT 38 | public: 39 | wallet( const QString& path,const QString& uuid,const QString& sockAddr ) ; 40 | ~wallet() ; 41 | private slots: 42 | void openWallet( void ) ; 43 | private: 44 | Wallet * m_wallet ; 45 | QString m_keyID ; 46 | QString m_sockAddr ; 47 | void * m_handle ; 48 | }; 49 | 50 | #endif // WALLET_H 51 | -------------------------------------------------------------------------------- /plugins/luks/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | if(${CMAKE_VERSION} VERSION_GREATER "3.26") 2 | cmake_minimum_required(VERSION 3.5.0) 3 | else() 4 | cmake_minimum_required(VERSION 3.0.2) 5 | endif() 6 | 7 | add_definitions( -D_FILE_OFFSET_BITS=64 -Wall -pedantic -std=c++17 -I${PROJECT_BINARY_DIR}/plugins/luks -I${PROJECT_BINARY_DIR} ) 8 | 9 | if(BUILD_WITH_QT6) 10 | add_executable( luks ../icon.qrc main.cpp ) 11 | else() 12 | QT5_ADD_RESOURCES( ICON ../icon.qrc ) 13 | add_executable( luks ${ICON} main.cpp ) 14 | endif() 15 | 16 | set_target_properties( luks PROPERTIES INSTALL_RPATH "${CMAKE_INSTALL_FULL_LIBDIR}" ) 17 | set_target_properties( luks PROPERTIES COMPILE_FLAGS "-D_FILE_OFFSET_BITS=64 -Wall -s -fPIE -pthread -pedantic " ) 18 | 19 | TARGET_LINK_LIBRARIES( luks plugin ) 20 | 21 | install( TARGETS luks RUNTIME DESTINATION "${PLUGINPATH}" ) 22 | -------------------------------------------------------------------------------- /plugins/luks/main.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright (c) 2012-2015 4 | * name : Francis Banyikwa 5 | * email: mhogomchungu@gmail.com 6 | * This program is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 2 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program. If not, see . 18 | */ 19 | 20 | #include 21 | #include "../mainwindow.h" 22 | #include "../plugins.h" 23 | 24 | int main( int argc,char * argv[] ) 25 | { 26 | QApplication a( argc,argv ) ; 27 | 28 | MainWindow w( plugins::luks ) ; 29 | 30 | w.setToken( argv ) ; 31 | w.setApplicationName( "luks" ) ; 32 | w.setkeyLabel( QObject::tr( "Enter LUKS Key Below" ) ) ; 33 | w.setkeyFileLabel( QObject::tr( "Enter A Path To A LUKS Header Below" ) ) ; 34 | 35 | w.Show() ; 36 | 37 | return a.exec() ; 38 | } 39 | -------------------------------------------------------------------------------- /plugins/network_key/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 2.6) 2 | 3 | add_definitions( -D_FILE_OFFSET_BITS=64 -Wall -pedantic -std=c++17 -I${PROJECT_BINARY_DIR}/plugins/luks -I${PROJECT_BINARY_DIR} ) 4 | 5 | if( QT5 ) 6 | QT5_ADD_RESOURCES( ICON ../icon.qrc ) 7 | add_executable( network_key ${ICON} main.cpp ) 8 | else() 9 | QT4_ADD_RESOURCES( ICON ../icon.qrc ) 10 | add_executable( network_key ${ICON} main.cpp ) 11 | endif() 12 | 13 | set_target_properties( network_key PROPERTIES INSTALL_RPATH "${CMAKE_INSTALL_FULL_LIBDIR}" ) 14 | set_target_properties( network_key PROPERTIES COMPILE_FLAGS "-D_FILE_OFFSET_BITS=64 -Wall -s -fPIE -pthread -pedantic " ) 15 | 16 | TARGET_LINK_LIBRARIES( network_key crypt_buffer plugin ) 17 | 18 | 19 | #currently not used 20 | 21 | install( TARGETS network_key RUNTIME DESTINATION "${PLUGINPATH}" ) 22 | -------------------------------------------------------------------------------- /plugins/network_key/README: -------------------------------------------------------------------------------- 1 | 2 | server.c is build by ../../zuluCrypt-cli/CMakeLists.txt 3 | -------------------------------------------------------------------------------- /plugins/network_key/zuluCryptKeyServer.desktop: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env xdg-open 2 | [Desktop Entry] 3 | Comment[en_US]= 4 | Comment= 5 | Exec=/usr/bin/zuluCryptKeyServer ink 127.0.0.1 40000 6 | GenericName[en_US]=Encrypted volumes key manager 7 | GenericName=Encrypted volumes manager 8 | Icon=zuluCrypt 9 | MimeType= 10 | Name[en_US]=ZuluCrypt Key Server 11 | Name=ZuluCrypt 12 | NoDisplay=false 13 | Path= 14 | StartupNotify=true 15 | Terminal=false 16 | Type=Application 17 | X-DBUS-ServiceName= 18 | X-DBUS-StartupType= 19 | X-KDE-SubstituteUID=false 20 | X-KDE-Username= 21 | Categories=Security;Utility;Qt;X-MandrivaLinux-System-FileTools; 22 | -------------------------------------------------------------------------------- /plugins/plugins.pro: -------------------------------------------------------------------------------- 1 | #------------------------------------------------- 2 | # 3 | # Project created by QtCreator 2011-09-09T10:15:19 4 | # 5 | #------------------------------------------------- 6 | 7 | QT += core gui 8 | 9 | TARGET = zuluCrypt 10 | TEMPLATE = app 11 | 12 | SOURCES += mainwindow.cpp 13 | 14 | HEADERS += mainwindow.h 15 | 16 | FORMS += mainwindow.ui 17 | 18 | TRANSLATIONS = ../translations/plugins/messages.ts 19 | 20 | RESOURCES = icon.qrc 21 | -------------------------------------------------------------------------------- /plugins/steghide/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | if(${CMAKE_VERSION} VERSION_GREATER "3.26") 2 | cmake_minimum_required(VERSION 3.26.0) 3 | else() 4 | cmake_minimum_required(VERSION 3.0.2) 5 | endif() 6 | 7 | add_definitions( -D_FILE_OFFSET_BITS=64 -Wall -pedantic -std=c++17 -I${PROJECT_BINARY_DIR}/plugins/steghide -I${PROJECT_BINARY_DIR} ) 8 | 9 | if(BUILD_WITH_QT6) 10 | add_executable( steghide ../icon.qrc main.cpp ) 11 | else() 12 | QT5_ADD_RESOURCES( ICON ../icon.qrc ) 13 | add_executable( steghide ${ICON} main.cpp ) 14 | endif() 15 | 16 | #set_target_properties( steghide PROPERTIES INSTALL_RPATH "${CMAKE_INSTALL_FULL_LIBDIR}" ) 17 | set_target_properties( steghide PROPERTIES COMPILE_FLAGS "-D_FILE_OFFSET_BITS=64 -Wall -s -fPIE -pthread -pedantic " ) 18 | 19 | TARGET_LINK_LIBRARIES( steghide plugin ) 20 | 21 | install( TARGETS steghide RUNTIME DESTINATION "${PLUGINPATH}" ) 22 | -------------------------------------------------------------------------------- /plugins/steghide/main.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright (c) 2012-2015 4 | * name : Francis Banyikwa 5 | * email: mhogomchungu@gmail.com 6 | * This program is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 2 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program. If not, see . 18 | */ 19 | 20 | #include 21 | #include "../mainwindow.h" 22 | 23 | #include "../plugins.h" 24 | 25 | int main( int argc,char * argv[] ) 26 | { 27 | QApplication a( argc,argv ) ; 28 | 29 | MainWindow w( plugins::steghide ) ; 30 | 31 | w.setToken( argv ) ; 32 | w.setApplicationName( "steghide" ) ; 33 | w.setkeyLabel( QObject::tr( "Enter steghide Key Below" ) ) ; 34 | w.setkeyFileLabel( QObject::tr( "Enter A Path To A Steghide Keyfile Below" ) ) ; 35 | 36 | w.setExe( { "steghide" } ) ; 37 | 38 | w.Show() ; 39 | 40 | return a.exec() ; 41 | } 42 | -------------------------------------------------------------------------------- /plugins/test/README: -------------------------------------------------------------------------------- 1 | 2 | ../../zuluCrypt-cli/CMakeLists.txt controls building of this source file 3 | 4 | -------------------------------------------------------------------------------- /plugins/test/zuluCrypt-testKey.c: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright (c) 2012-2015 4 | * name : Francis Banyikwa 5 | * email: mhogomchungu@gmail.com 6 | * This program is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 2 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program. If not, see . 18 | */ 19 | 20 | #include "../../zuluCrypt-cli/pluginManager/libzuluCryptPluginManager.h" 21 | #include 22 | 23 | int main( int argc,char * argv[] ) 24 | { 25 | /* 26 | * const char * exe = argv[ 0 ] ; 27 | * const char * device = argv[ 1 ] ; 28 | * const char * uuid = argv[ 2 ] ; 29 | * int size = atoi( argv[ 4 ] ) ; 30 | * 31 | * argv[ 5 ] is argument list given to zuluCrypt-cli 32 | * const char * argv = argv[ 5 ] ; 33 | * const char * msg ; 34 | */ 35 | 36 | const char * key = "xyz" ; 37 | void * handle ; 38 | 39 | if( argc < 3 ){ 40 | return 1 ; 41 | } 42 | 43 | handle = zuluCryptPluginManagerOpenConnection( argv[ 3 ] ) ; 44 | 45 | if( handle ){ 46 | zuluCryptPluginManagerSendKey( handle,key,strlen( key ) ) ; 47 | zuluCryptPluginManagerCloseConnection( handle ) ; 48 | return 0 ; 49 | }else{ 50 | return 1 ; 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /plugins/tomb/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | if(${CMAKE_VERSION} VERSION_GREATER "3.26") 2 | cmake_minimum_required(VERSION 3.26.0) 3 | else() 4 | cmake_minimum_required(VERSION 3.0.2) 5 | endif() 6 | 7 | add_definitions( -D_FILE_OFFSET_BITS=64 -Wall -pedantic -std=c++17 -I${PROJECT_BINARY_DIR}/plugins/tomb -I${PROJECT_BINARY_DIR} ) 8 | 9 | if(BUILD_WITH_QT6) 10 | add_executable( tomb ../icon.qrc main.cpp ) 11 | else() 12 | QT5_ADD_RESOURCES( ICON ../icon.qrc ) 13 | add_executable( tomb ${ICON} main.cpp ) 14 | endif() 15 | 16 | #set_target_properties( tomb PROPERTIES INSTALL_RPATH "${CMAKE_INSTALL_FULL_LIBDIR}" ) 17 | set_target_properties( tomb PROPERTIES COMPILE_FLAGS "-D_FILE_OFFSET_BITS=64 -Wall -s -fPIE -pthread -pedantic " ) 18 | 19 | TARGET_LINK_LIBRARIES( tomb plugin ) 20 | 21 | install( TARGETS tomb RUNTIME DESTINATION "${PLUGINPATH}" ) 22 | -------------------------------------------------------------------------------- /translations/INSTRUCTIONS: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | * commands to run to build .mo files for the backends 4 | */ 5 | xgettext -d zuluCrypt-cli -s -o zuluCrypt-cli.pot ../../zuluCrypt-cli/bin/add_key.c ../../zuluCrypt-cli/bin/close_volume.c ../../zuluCrypt-cli/bin/create_volumes.c ../../zuluCrypt-cli/bin/crypt_file.c ../../zuluCrypt-cli/bin/main.c ../../zuluCrypt-cli/bin/open_volume.c ../../zuluCrypt-cli/bin/remove_key.c ../../zuluCrypt-cli/bin/save_and_restore_luks_header.c ../../zuluCrypt-cli/bin/volume_info.c ../../zuluCrypt-cli/bin/write_device_with_junk.c 6 | msginit -l en_US -o zuluCrypt-cli.po -i zuluCrypt-cli.pot 7 | msgfmt -c -v -o zuluCrypt-cli.mo zuluCrypt-cli.po 8 | 9 | xgettext -d zuluMount-cli -s -o zuluMount-cli.pot ../../zuluMount-cli/main.c ../../zuluMount-cli/mount.c ../../zuluMount-cli/umount.c 10 | msginit -l en_US -o zuluMount-cli.po -i zuluMount-cli.pot 11 | msgfmt -c -v -o zuluMount-cli.mo zuluMount-cli.po 12 | 13 | zuluCrypt-gui localization files are Qt translation files ending in ".qm" and they must be placed at $PREFIX/share/zuluCrypt/translations/zuluCrypt-gui/ 14 | 15 | zuluCrypt-cli localization files are gettext translation files ending in ".mo" and they must be placed at $PREFIX/zuluCrypt/translations/LANGUAGE/LC_MESSAGES 16 | 17 | zuluMount-gui localization files are Qt translation files ending in ".qm" and they must be placed at $PREFIX/share/zuluCrypt/translations/zuluMount-gui/ 18 | 19 | zuluMount-cli localization files are gettext translation files ending in ".mo" and they must be placed at $PREFIX/zuluCrypt/translations/LANGUAGE/LC_MESSAGES 20 | 21 | let PATH = "$PREFIX/zuluCrypt/translations/" 22 | 23 | localization files may be something like below 24 | $PATH/en_US/zuluMount.mo 25 | $PATH/en_GB/zuluMount.mo 26 | 27 | $PATH/en_US/zuluCrypt.mo 28 | $PATH/en_GB/zuluCrypt.mo 29 | 30 | NOTE: 31 | the "LANGUAGE" path components allows for the same translation filename to be used with different translations.I do not know if it is intended to be 32 | used this way but it worked on my first attempt and i am sticking with it until i know of a better way 33 | -------------------------------------------------------------------------------- /translations/zuluCrypt/README: -------------------------------------------------------------------------------- 1 | 2 | messages.ts has zuluCrypt-gui strings to be translated 3 | messages.pot has zuluCrypt-cli strings to be translated 4 | -------------------------------------------------------------------------------- /translations/zuluCrypt/ar_SA.qm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mhogomchungu/zuluCrypt/5e6a307b9540ea9d9f6bf05ffb35509f94ae9dc9/translations/zuluCrypt/ar_SA.qm -------------------------------------------------------------------------------- /translations/zuluCrypt/de_DE.qm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mhogomchungu/zuluCrypt/5e6a307b9540ea9d9f6bf05ffb35509f94ae9dc9/translations/zuluCrypt/de_DE.qm -------------------------------------------------------------------------------- /translations/zuluCrypt/en_US.qm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mhogomchungu/zuluCrypt/5e6a307b9540ea9d9f6bf05ffb35509f94ae9dc9/translations/zuluCrypt/en_US.qm -------------------------------------------------------------------------------- /translations/zuluCrypt/fr_FR.qm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mhogomchungu/zuluCrypt/5e6a307b9540ea9d9f6bf05ffb35509f94ae9dc9/translations/zuluCrypt/fr_FR.qm -------------------------------------------------------------------------------- /translations/zuluCrypt/zuluCrypt-cli.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mhogomchungu/zuluCrypt/5e6a307b9540ea9d9f6bf05ffb35509f94ae9dc9/translations/zuluCrypt/zuluCrypt-cli.mo -------------------------------------------------------------------------------- /translations/zuluMount/README: -------------------------------------------------------------------------------- 1 | 2 | messages.ts has zuluMount-gui strings to be translated 3 | messages.pot has zuluMount-cli strings to be translated 4 | -------------------------------------------------------------------------------- /translations/zuluMount/ar_SA.qm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mhogomchungu/zuluCrypt/5e6a307b9540ea9d9f6bf05ffb35509f94ae9dc9/translations/zuluMount/ar_SA.qm -------------------------------------------------------------------------------- /translations/zuluMount/de_DE.qm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mhogomchungu/zuluCrypt/5e6a307b9540ea9d9f6bf05ffb35509f94ae9dc9/translations/zuluMount/de_DE.qm -------------------------------------------------------------------------------- /translations/zuluMount/en_US.qm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mhogomchungu/zuluCrypt/5e6a307b9540ea9d9f6bf05ffb35509f94ae9dc9/translations/zuluMount/en_US.qm -------------------------------------------------------------------------------- /translations/zuluMount/fr_FR.qm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mhogomchungu/zuluCrypt/5e6a307b9540ea9d9f6bf05ffb35509f94ae9dc9/translations/zuluMount/fr_FR.qm -------------------------------------------------------------------------------- /udev_support_README: -------------------------------------------------------------------------------- 1 | 2 | 3 | udev is a runtime dependency but it is configured at build time to remove a necessity to 4 | manage yet another configuration option. 5 | 6 | udev support is off by default because udev has a bad habit of identifying some clearly 7 | external volumes as internal[1]. 8 | 9 | [1]https://wiki.archlinux.org/index.php/udev#Mark_internal_SATA_ports_as_eSATA 10 | 11 | If udev support is off,volumes with entries only in /etc/fstab and /etc/crypttab will be 12 | considered as system volumes.Section 6 of the FAQ has more information on additional 13 | ways to make volumes be considered as system. 14 | 15 | if udev support is on,udev will be consulted before a decision is being when if a volume 16 | is to be considered system or not.Section 7 of the FAQ has more information on how to remove 17 | a volume of a list of system volumes. 18 | 19 | I recommend disabling udev support if you are building zuluCrypt for your own use and you have all your 20 | internal volumes mentioned either in fstab or crypttab. 21 | 22 | I recommend enabling udev support if you are packaging for distribution or if you dont use 23 | /etc/fstab or /etc/crypttab as a central place to manage system volumes. 24 | 25 | To build with udev support add "-DUDEVSUPPORT=true" to cmake option list. 26 | 27 | Example build steps to build with udev support 28 | 29 | cd $SRC 30 | mkdir build 31 | cd build 32 | cmake -DCMAKE_INSTALL_PREFIX=/usr/ -DUDEVSUPPORT=true -DCMAKE_BUILD_TYPE=RELEASE . .. 33 | make 34 | make install 35 | -------------------------------------------------------------------------------- /version: -------------------------------------------------------------------------------- 1 | 5.4.0 2 | -------------------------------------------------------------------------------- /zuluCrypt-cli/bin/bash_special_chars.h: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright (c) 2012 4 | * name : Francis Banyikwa 5 | * email: mhogomchungu@gmail.com 6 | * This program is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 2 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program. If not, see . 18 | */ 19 | 20 | /* 21 | * cryptsetup 1.4.1 and previous have a bug and its triggered when the mapper has one or more bash 22 | * special characters, this functions substitute bash special characters for an underscore to 23 | * work around the bug. 24 | */ 25 | 26 | #define BASH_SPECIAL_CHARS "#;\"',\\`:!*?&$@(){}[]><|%~^ \n" 27 | -------------------------------------------------------------------------------- /zuluCrypt-cli/bin/check_invalid_key.c: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright (c) 2012-2015 4 | * name : Francis Banyikwa 5 | * email: mhogomchungu@gmail.com 6 | * This program is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 2 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program. If not, see . 18 | */ 19 | 20 | #include "includes.h" 21 | #include 22 | 23 | void zuluCryptCheckInvalidKey( const char * device ) 24 | { 25 | char * d ; 26 | const char * c ; 27 | int e = 0 ; 28 | 29 | zuluCryptSecurityGainElevatedPrivileges() ; 30 | /* 31 | * zuluCryptEmptySlots() is defined in ../lib/empty_slots.c 32 | */ 33 | d = zuluCryptEmptySlots( device ) ; 34 | zuluCryptSecurityDropElevatedPrivileges() ; 35 | 36 | if( d == NULL ){ 37 | /* 38 | * we got here because the volume is either not luks based or the path is invalid 39 | */ 40 | }else{ 41 | c = d - 1 ; 42 | 43 | while( *++c ){ 44 | 45 | if( *c == '2' ){ 46 | 47 | fprintf( stderr,"WARNING: key slot number: %d is corrupted\n",e ) ; 48 | } 49 | 50 | e++ ; 51 | } 52 | 53 | StringFree( d ) ; 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /zuluCrypt-cli/bin/check_opened_mapper.c: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright (c) 2012-2015 4 | * name : Francis Banyikwa 5 | * email: mhogomchungu@gmail.com 6 | * This program is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 2 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program. If not, see . 18 | */ 19 | #include "includes.h" 20 | #include 21 | #include 22 | 23 | int zuluCryptCheckOpenedMapper( const char * mapper ) 24 | { 25 | const char * c = mapper ; 26 | char * d ; 27 | 28 | int st = 0 ; 29 | 30 | struct dirent * entry ; 31 | 32 | DIR * dir = opendir( crypt_get_dir() ) ; 33 | 34 | if( dir == NULL ){ 35 | return 2 ; 36 | } 37 | 38 | while( *++c != '-' ) {} 39 | while( *++c != '-' ) {} 40 | 41 | while( ( entry = readdir( dir ) ) != NULL ){ 42 | 43 | d = strstr( entry->d_name,"zuluCrypt-" ) ; 44 | 45 | if( d != NULL ){ 46 | 47 | while( *++d != '-' ) {} 48 | while( *++d != '-' ) {} 49 | 50 | if( StringsAreEqual( c,d ) ){ 51 | 52 | st = 1 ; 53 | break ; 54 | } 55 | } 56 | } 57 | 58 | closedir( dir ) ; 59 | return st ; 60 | } 61 | -------------------------------------------------------------------------------- /zuluCrypt-cli/bin/partitions.c: -------------------------------------------------------------------------------- 1 | 2 | 3 | contents of this source file are now in volumes.c 4 | -------------------------------------------------------------------------------- /zuluCrypt-cli/bin/security.h: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | * 4 | * Copyright (c) 2012-2015 5 | * name : Francis Banyikwa 6 | * email: mhogomchungu@gmail.com 7 | * This program is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU General Public License as published by 9 | * the Free Software Foundation, either version 2 of the License, or 10 | * (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU General Public License 18 | * along with this program. If not, see . 19 | */ 20 | 21 | 22 | #ifndef ZULUCRYPTSECURITY 23 | #define ZULUCRYPTSECURITY 24 | 25 | #ifdef __cplusplus 26 | extern "C" { 27 | #endif 28 | 29 | #include "includes.h" 30 | /* 31 | * All these functions are defined in security.c 32 | */ 33 | 34 | void zuluCryptSecuritySetPrivilegeElevationErrorFunction( void ( * ) ( const char * ) ) ; 35 | 36 | void zuluCryptSecuritySanitizeTheEnvironment( uid_t uid,stringList_t * ) ; 37 | 38 | int zuluCryptSecurityUserOwnTheFile( const char * device,uid_t uid ) ; 39 | 40 | void zuluCryptSecurityPrintPermissions( void ) ; 41 | 42 | void zuluCryptSetUserUIDForPrivilegeManagement( uid_t ) ; 43 | 44 | void zuluCryptSecurityLockMemory( stringList_t stl ) ; 45 | 46 | void zuluCryptSecurityUnlockMemory( stringList_t stl ) ; 47 | 48 | void zuluCryptSecurityLockMemory_1( string_t st ) ; 49 | 50 | void zuluCryptSecurityUnlockMemory_1( string_t st ) ; 51 | 52 | const char * zuluCryptRunTimePath( void ) ; 53 | 54 | #ifdef __cplusplus 55 | } 56 | #endif 57 | 58 | #endif 59 | -------------------------------------------------------------------------------- /zuluCrypt-cli/bin/volume_info.c: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright (c) 2011-2015 4 | * name : Francis Banyikwa 5 | * email: mhogomchungu@gmail.com 6 | * This program is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 2 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program. If not, see . 18 | */ 19 | 20 | #include "includes.h" 21 | #include 22 | #include 23 | 24 | int zuluMountPrintBitLockerProperties( const char * device,uid_t uid ) ; 25 | 26 | int zuluCryptEXEVolumeInfo( const char * mapper,const char * device,uid_t uid ) 27 | { 28 | char * output ; 29 | int xt = 2 ; 30 | 31 | string_t p ; 32 | 33 | zuluCryptSecurityGainElevatedPrivileges() ; 34 | 35 | if( zuluCryptDeviceHasAgivenFileSystem( device,zuluCryptBitLockerType() ) 36 | && zuluCryptDeviceManagedByDislocker( device,uid ) ){ 37 | 38 | xt = zuluMountPrintBitLockerProperties( device,uid ) ; 39 | }else{ 40 | /* 41 | * ZULUCRYPTlongMapperPath is set in ../constants.h 42 | * zuluCryptCreateMapperName() is defined at ../lib/create_mapper_name.c 43 | */ 44 | p = zuluCryptCreateMapperName( device,mapper,uid,ZULUCRYPTlongMapperPath ) ; 45 | 46 | /* 47 | *zuluCryptVolumeStatus() is defined in ../lib/status.c 48 | */ 49 | output = zuluCryptVolumeStatus( StringContent( p ) ) ; 50 | 51 | if( output != NULL ){ 52 | 53 | printf( "%s\n",output ) ; 54 | StringFree( output ) ; 55 | xt = 0 ; 56 | }else{ 57 | printf( gettext( "ERROR: Could not get volume properties,volume is not open or was opened by a different user\n" ) ) ; 58 | xt = 2 ; 59 | } 60 | 61 | StringDelete( &p ) ; 62 | } 63 | 64 | zuluCryptSecurityDropElevatedPrivileges() ; 65 | 66 | return xt ; 67 | } 68 | -------------------------------------------------------------------------------- /zuluCrypt-cli/constants.h: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright (c) 2011 4 | * name : Francis Banyikwa 5 | * email: mhogomchungu@gmail.com 6 | * This program is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 2 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program. If not, see . 18 | */ 19 | #ifndef EXECUTABLES_H 20 | 21 | #define EXECUTABLES_H 22 | 23 | #include "bin_path.h" 24 | 25 | #define ZULUCRYPTmkfs "/sbin/mkfs" 26 | #define ZULUCRYPTmount "/bin/mount" 27 | #define ZULUCRYPTumount "/bin/umount" 28 | #define ZULUCRYPTmkfs_dir "/sbin" 29 | #define ZULUCRYPTgroupadd "/usr/sbin/groupadd" 30 | 31 | #define ZULUCRYPTallPartitions 1 32 | #define ZULUCRYPTsystemPartitions 2 33 | #define ZULUCRYPTnonSystemPartitions 3 34 | 35 | #define ZULUCRYPTshortMapperPath 1 36 | #define ZULUCRYPTlongMapperPath 0 37 | 38 | #define ZULUCRYPTread 1 39 | #define ZULUCRYPTwrite 0 40 | 41 | #define ZULUCRYPTtempFolder "/run/zuluCrypt" 42 | #define ZULUCRYPTmountPath "/run/media" 43 | #define ZULUCRYPtmountMiniPath "/run" 44 | 45 | #define ZULUCRYPT_LUKS2_MAX_HEADER_SIZE 33554432 46 | /* 47 | * The below numbers are cryptsetup default numbers. 48 | */ 49 | #define ZULUCRYPT_KEY_MAX_SIZE 512 50 | #define ZULUCRYPT_KEYFILE_MAX_SIZE 8192000 51 | #define ZULUCRYPT_INT_MAX_KEYSIZE 8192000 52 | #define ZULUCRYPT_CHAR_MAX_KEYSIZE "8192000" 53 | 54 | #endif 55 | -------------------------------------------------------------------------------- /zuluCrypt-cli/lib/close_volume.c: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright (c) 2011-2015 4 | * name : Francis Banyikwa 5 | * email: mhogomchungu@gmail.com 6 | * This program is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 2 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program. If not, see . 18 | */ 19 | 20 | #include "includes.h" 21 | 22 | int zuluCryptCloseVolume( const char * map,char ** mount_point ) 23 | { 24 | int i = zuluCryptUnmountVolume( map,mount_point ) ; 25 | 26 | if( i == 0 || i == 3 ){ 27 | 28 | if( zuluCryptCloseMapper( map ) == 0 ){ 29 | 30 | return 0 ; 31 | }else{ 32 | return 5 ; 33 | } 34 | }else{ 35 | return i ; 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /zuluCrypt-cli/lib/is_luks.c: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright (c) 2011-2015 4 | * name : Francis Banyikwa 5 | * email: mhogomchungu@gmail.com 6 | * This program is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 2 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program. If not, see . 18 | */ 19 | 20 | #include "includes.h" 21 | 22 | #include 23 | #include 24 | #include 25 | 26 | static int _is_luks( const char * dev,const resolve_path_t * opts ) 27 | { 28 | struct crypt_device * cd ; 29 | int st ; 30 | 31 | if( opts ){} 32 | 33 | if( crypt_init( &cd,dev ) != 0 ){ 34 | 35 | return 0 ; 36 | } 37 | 38 | st = crypt_load( cd,NULL,NULL ) ; 39 | 40 | crypt_free( cd ) ; 41 | 42 | return st == 0 ; 43 | } 44 | 45 | int zuluCryptVolumeIsLuks( const char * device ) 46 | { 47 | /* 48 | * resolve_path_t is defined in includes.h 49 | */ 50 | resolve_path_t opts ; 51 | 52 | memset( &opts,'\0',sizeof( opts ) ) ; 53 | 54 | opts.device = device ; 55 | opts.error_value = 0 ; 56 | 57 | /* 58 | * zuluCryptResolveDevicePath() is defined in resolve_path.c 59 | */ 60 | return zuluCryptResolveDevicePath( _is_luks,&opts ) ; 61 | } 62 | 63 | int zuluCryptVolumeIsNotLuks( const char * dev ) 64 | { 65 | return !zuluCryptVolumeIsLuks( dev ) ; 66 | } 67 | -------------------------------------------------------------------------------- /zuluCrypt-cli/lib/is_path_valid.c: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright (c) 2012-2015 4 | * name : Francis Banyikwa 5 | * email: mhogomchungu@gmail.com 6 | * This program is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 2 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program. If not, see . 18 | */ 19 | 20 | #include "includes.h" 21 | #include 22 | 23 | int zuluCryptPathIsValid( const char * path ) 24 | { 25 | struct stat st ; 26 | return stat( path,&st ) == 0 ; 27 | } 28 | 29 | int zuluCryptPathIsNotValid( const char * path ) 30 | { 31 | struct stat st ; 32 | return stat( path,&st ) != 0 ; 33 | } 34 | 35 | int zuluCryptPathIsNotValid_0( string_t path ) 36 | { 37 | return zuluCryptPathIsNotValid( StringContent( path ) ) ; 38 | } 39 | -------------------------------------------------------------------------------- /zuluCrypt-cli/lib/real_path.c: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright (c) 2012-2015 4 | * name : Francis Banyikwa 5 | * email: mhogomchungu@gmail.com 6 | * This program is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 2 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program. If not, see . 18 | */ 19 | 20 | #include /* PATH_MAX */ 21 | #include 22 | #include 23 | #include 24 | #include 25 | #include "includes.h" 26 | #include 27 | 28 | char * zuluCryptRealPath( const char * path ) 29 | { 30 | string_t st ; 31 | string_t xt ; 32 | 33 | char * e = realpath( path,NULL ) ; 34 | 35 | if( StringPrefixEqual( e,"/dev/dm-" ) ){ 36 | 37 | st = String_1( "/sys/block/",e + 5,"/dm/name",NULL ) ; 38 | 39 | xt = StringGetFromVirtualFile( StringContent( st ) ) ; 40 | 41 | StringRemoveRight( xt,1 ) ; 42 | 43 | StringPrepend( xt,"/dev/mapper/" ) ; 44 | 45 | StringFree( e ) ; 46 | 47 | StringDelete( &st ) ; 48 | 49 | return StringDeleteHandle( &xt ) ; 50 | }else{ 51 | return e ; 52 | } 53 | } 54 | 55 | int zuluCryptPathStartsWith( const char * path,const char * start ) 56 | { 57 | int st = 0 ; 58 | char * p = zuluCryptRealPath( path ) ; 59 | if( p != NULL ){ 60 | st = StringPrefixEqual( p,start ) ; 61 | StringFree( p ) ; 62 | } 63 | return st ; 64 | } 65 | 66 | int zuluCryptPathDoesNotStartsWith( const char * path,const char * start ) 67 | { 68 | int st = 0; 69 | char * p = zuluCryptRealPath( path ) ; 70 | if( p != NULL ){ 71 | st = StringPrefixEqual( p,start ) ; 72 | StringFree( p ) ; 73 | } 74 | return st == 0 ; 75 | } 76 | 77 | int zuluCryptPathDidNotChange( const char * path ) 78 | { 79 | char * p = zuluCryptRealPath( path ) ; 80 | int st = 0 ; 81 | if( p != NULL ){ 82 | st = StringsAreEqual( path,p ) ; 83 | StringFree( p ) ; 84 | } 85 | return st ; 86 | } 87 | 88 | int zuluCryptPathDeviceIsBlockDevice( const char * device ) 89 | { 90 | if( device ){} 91 | return 0 ; 92 | } 93 | -------------------------------------------------------------------------------- /zuluCrypt-cli/lib/user_home_path.c: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright (c) 2011-2015 4 | * name : Francis Banyikwa 5 | * email: mhogomchungu@gmail.com 6 | * This program is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 2 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program. If not, see . 18 | */ 19 | 20 | #include 21 | #include "includes.h" 22 | 23 | string_t zuluCryptGetUserHomePath( uid_t uid ) 24 | { 25 | return String_1( getpwuid( uid )->pw_dir,"/",NULL ) ; 26 | } 27 | 28 | string_t zuluCryptGetUserName( uid_t uid ) 29 | { 30 | return String( getpwuid( uid )->pw_name ) ; 31 | } 32 | -------------------------------------------------------------------------------- /zuluCrypt-cli/lib/version.c: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright (c) 2011-2015 4 | * name : Francis Banyikwa 5 | * email: mhogomchungu@gmail.com 6 | * This program is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 2 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program. If not, see . 18 | */ 19 | 20 | #include "includes.h" 21 | 22 | const char * zuluCryptVersion(void) 23 | { 24 | return VERSION_STRING ; 25 | } 26 | -------------------------------------------------------------------------------- /zuluCrypt-cli/lib/volume_type.c: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright (c) 2012-2015 4 | * name : Francis Banyikwa 5 | * email: mhogomchungu@gmail.com 6 | * This program is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 2 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program. If not, see . 18 | */ 19 | 20 | #include "includes.h" 21 | #include 22 | 23 | #ifdef CRYPT_TCRYPT 24 | int zuluCryptGetVolumeType( const char * device,const char * pass,size_t pass_size ) 25 | { 26 | /* 27 | * zuluCryptVolumeIsLuks() is defined in is_luks.c 28 | * zuluCryptVolumeIsTcrypt() is defined in open_tcrypt.c 29 | */ 30 | if( zuluCryptVolumeIsLuks( device ) ){ 31 | return 1 ; 32 | }else if( zuluCryptVolumeIsTcrypt( device,pass,pass_size ) ){ 33 | return 2 ; 34 | }else{ 35 | return 3 ; 36 | } 37 | } 38 | #else 39 | int zuluCryptGetVolumeType( const char * device,const char * pass,size_t pass_size ) 40 | { 41 | if( pass && pass_size ){} 42 | /* 43 | * zuluCryptVolumeIsLuks() is defined in is_luks.c 44 | */ 45 | if( zuluCryptVolumeIsLuks( device ) ){ 46 | 47 | return 1 ; 48 | }else{ 49 | return 3 ; 50 | } 51 | } 52 | #endif 53 | -------------------------------------------------------------------------------- /zuluCrypt-gui.1: -------------------------------------------------------------------------------- 1 | 2 | .TH zuluCrypt-gui 1 3 | 4 | .br 5 | .SH NAME 6 | zuluCrypt-gui - Graphical front end for zuluCrypt-cli 7 | .br 8 | .SH SUMMARY 9 | zuluCrypt-gui is a GUI front end to zuluCrypt-cli 10 | .br 11 | copyright: 2011-2013 Ink Francis,mhogomchungu@gmail.com 12 | .br 13 | license : GPLv2+ 14 | .br 15 | options: 16 | .br 17 | -d path to where a volume to be auto unlocked/mounted is located 18 | .br 19 | -m tool to use to open a default file manager(default tool is xdg-open) 20 | .br 21 | -e start the application without showing the GUI 22 | .br 23 | .br 24 | .SH LAST EDIT 25 | Last change: Mon Apr 8 19:59:36 EDT 2013 26 | -------------------------------------------------------------------------------- /zuluCrypt-gui/about.h: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright ( c ) 2015 4 | * name : Francis Banyikwa 5 | * email: mhogomchungu@gmail.com 6 | * This program is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 2 of the License, or 9 | * ( at your option ) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program. If not, see . 18 | */ 19 | 20 | 21 | #ifndef ABOUT_H 22 | #define ABOUT_H 23 | 24 | #include 25 | #include 26 | 27 | class QCloseEvent ; 28 | class QEvent ; 29 | class QObject ; 30 | 31 | namespace Ui { 32 | class about; 33 | } 34 | 35 | class about : public QDialog 36 | { 37 | Q_OBJECT 38 | public: 39 | static void instance( QWidget * parent ) 40 | { 41 | new about( parent ) ; 42 | } 43 | explicit about( QWidget * parent ) ; 44 | ~about() ; 45 | private slots: 46 | void pbClose( void ) ; 47 | private: 48 | void closeEvent( QCloseEvent * ) ; 49 | bool eventFilter( QObject * watched,QEvent * event ) ; 50 | Ui::about * m_ui ; 51 | }; 52 | 53 | #endif // ABOUT_H 54 | -------------------------------------------------------------------------------- /zuluCrypt-gui/createfile.h: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright ( c ) 2011-2015 4 | * name : Francis Banyikwa 5 | * email: mhogomchungu@gmail.com 6 | * This program is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 2 of the License, or 9 | * ( at your option ) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program. If not, see . 18 | */ 19 | 20 | #ifndef CREATEFILE_H 21 | #define CREATEFILE_H 22 | 23 | #include 24 | 25 | #include "utility.h" 26 | 27 | class DialogMsg ; 28 | class QPushButton ; 29 | class FileTask ; 30 | class QCloseEvent ; 31 | class createfile ; 32 | 33 | namespace Ui { 34 | class createfile ; 35 | } 36 | 37 | class createfile : public QDialog 38 | { 39 | Q_OBJECT 40 | public: 41 | static createfile& instance( QWidget * parent,std::function< void( const QString& ) > f ) 42 | { 43 | return *( new createfile( parent,std::move( f ) ) ) ; 44 | } 45 | explicit createfile( QWidget *,std::function< void( const QString& ) > ) ; 46 | ~createfile() ; 47 | signals : 48 | void sendProgress( QString,QString,QString,QString,int ) ; 49 | private: 50 | void warnAboutRandomData( int ) ; 51 | void HideUI() ; 52 | void showUI() ; 53 | void pbOpenFolder() ; 54 | void pbCancel() ; 55 | void pbCreate() ; 56 | void setProgress( QString,QString,QString,QString,int ) ; 57 | void fileTextChange( QString ) ; 58 | void createFile( const QString&,qint64 ) ; 59 | void enableAll() ; 60 | void disableAll() ; 61 | void closeEvent( QCloseEvent * ) ; 62 | bool eventFilter( QObject * watched,QEvent * event ) ; 63 | Ui::createfile * m_ui ; 64 | std::atomic_bool m_exit ; 65 | bool m_running ; 66 | std::function< void( const QString& ) > m_function ; 67 | utility::label m_label ; 68 | }; 69 | 70 | #endif // CREATEFILE_H 71 | -------------------------------------------------------------------------------- /zuluCrypt-gui/createkeyfile.h: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright ( c ) 2011-2015 4 | * name : Francis Banyikwa 5 | * email: mhogomchungu@gmail.com 6 | * This program is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 2 of the License, or 9 | * ( at your option ) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program. If not, see . 18 | */ 19 | 20 | #ifndef CREATEKEYFILE_H 21 | #define CREATEKEYFILE_H 22 | 23 | #include 24 | #include 25 | 26 | #include "utility.h" 27 | 28 | class QWidget ; 29 | class keyFileTask ; 30 | class QCloseEvent ; 31 | 32 | namespace Ui { 33 | class createkeyfile ; 34 | } 35 | 36 | class createkeyfile : public QDialog 37 | { 38 | Q_OBJECT 39 | public: 40 | static createkeyfile& instance( QWidget * parent ) 41 | { 42 | return *( new createkeyfile( parent ) ) ; 43 | } 44 | explicit createkeyfile( QWidget * parent = 0 ) ; 45 | ~createkeyfile() ; 46 | signals: 47 | void HideUISignal() ; 48 | public slots: 49 | void ShowUI() ; 50 | void HideUI() ; 51 | 52 | private: 53 | void pbCancel() ; 54 | void pbCreate() ; 55 | void pbOpenFolder() ; 56 | void keyTextChange( QString ) ; 57 | void closeEvent( QCloseEvent * ) ; 58 | bool eventFilter( QObject * watched,QEvent * event ) ; 59 | void disableAll() ; 60 | void enableAll() ; 61 | Ui::createkeyfile * m_ui ; 62 | bool m_running ; 63 | bool m_stop ; 64 | utility::label m_label ; 65 | }; 66 | 67 | #endif // CREATEKEYFILE_H 68 | -------------------------------------------------------------------------------- /zuluCrypt-gui/createvolumedialog.h: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright ( c ) 2012-2015 4 | * name : Francis Banyikwa 5 | * email: mhogomchungu@gmail.com 6 | * This program is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 2 of the License, or 9 | * ( at your option ) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program. If not, see . 18 | */ 19 | #ifndef createVolumeDialog_H 20 | #define createVolumeDialog_H 21 | 22 | #include 23 | #include 24 | #include 25 | #include 26 | #include 27 | 28 | namespace Ui { 29 | class createVolumeDialog ; 30 | } 31 | 32 | class createVolumeDialog : public QDialog 33 | { 34 | Q_OBJECT 35 | public: 36 | static createVolumeDialog& instance( const QString& path,QWidget * parent,std::function< void( int ) > f ) 37 | { 38 | return *( new createVolumeDialog( path,parent,std::move( f ) ) ) ; 39 | } 40 | explicit createVolumeDialog( const QString& path,QWidget * parent,std::function< void( int ) > ) ; 41 | ~createVolumeDialog() ; 42 | private: 43 | void pbYes() ; 44 | void pbNo() ; 45 | void closeEvent( QCloseEvent * ) ; 46 | void ShowUI() ; 47 | Ui::createVolumeDialog * m_ui ; 48 | int m_opt ; 49 | int m_opt_count ; 50 | QString m_path ; 51 | std::function< void( int ) > m_function ; 52 | }; 53 | 54 | #endif // createVolumeDialog_H 55 | -------------------------------------------------------------------------------- /zuluCrypt-gui/createvolumedialog.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | createVolumeDialog 4 | 5 | 6 | Qt::ApplicationModal 7 | 8 | 9 | 10 | 0 11 | 0 12 | 500 13 | 243 14 | 15 | 16 | 17 | Warning!! 18 | 19 | 20 | 21 | 22 | 160 23 | 210 24 | 91 25 | 31 26 | 27 | 28 | 29 | &Yes 30 | 31 | 32 | 33 | 34 | 35 | 250 36 | 210 37 | 91 38 | 31 39 | 40 | 41 | 42 | &No 43 | 44 | 45 | 46 | 47 | 48 | 10 49 | 10 50 | 481 51 | 201 52 | 53 | 54 | 55 | This operation will lead to permanent destrunction of all present data in /dev/sdc1. Are you sure you want to continue? 56 | 57 | 58 | Qt::AlignCenter 59 | 60 | 61 | true 62 | 63 | 64 | 65 | 66 | 67 | 68 | -------------------------------------------------------------------------------- /zuluCrypt-gui/createvolumeinexistingfile.h: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright ( c ) 2019 4 | * name : Francis Banyikwa 5 | * email: mhogomchungu@gmail.com 6 | * This program is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 2 of the License, or 9 | * ( at your option ) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program. If not, see . 18 | */ 19 | 20 | #ifndef CREATEVOLUMEINEXISTINGFILE_H 21 | #define CREATEVOLUMEINEXISTINGFILE_H 22 | 23 | #include 24 | #include 25 | 26 | namespace Ui { 27 | class createVolumeInExistingFIle; 28 | } 29 | 30 | class createVolumeInExistingFIle : public QDialog 31 | { 32 | Q_OBJECT 33 | public: 34 | static void instance( QWidget * parent ) 35 | { 36 | new createVolumeInExistingFIle( parent ) ; 37 | } 38 | explicit createVolumeInExistingFIle( QWidget * parent ) ; 39 | ~createVolumeInExistingFIle(); 40 | private slots : 41 | void updateProgress( QString,QString,QString,QString,int ) ; 42 | private: 43 | void enableAll() ; 44 | void disableAll() ; 45 | void displayWarning( bool ) ; 46 | void create() ; 47 | void Hide() ; 48 | void closeEvent( QCloseEvent * ) ; 49 | bool eventFilter( QObject * watched,QEvent * event ) ; 50 | QString m_warning ; 51 | std::pair< qint64,QString > m_volumeOffset ; 52 | Ui::createVolumeInExistingFIle * m_ui ; 53 | }; 54 | 55 | #endif // CREATEVOLUMEINEXISTINGFILE_H 56 | -------------------------------------------------------------------------------- /zuluCrypt-gui/cryptoinfo.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright ( c ) 2012-2015 3 | * name : Francis Banyikwa 4 | * email: mhogomchungu@gmail.com 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 2 of the License, or 8 | * ( at your option ) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | #include "cryptoinfo.h" 20 | #include "ui_cryptoinfo.h" 21 | 22 | #include 23 | #include 24 | 25 | cryptoinfo::cryptoinfo( QWidget * parent,QString path,QString msg ) : 26 | QWidget( parent ),m_ui( new Ui::cryptoinfo ),m_path( path ),m_msg( msg ) 27 | { 28 | m_ui->setupUi( this ) ; 29 | 30 | if( !m_msg.isEmpty() ){ 31 | 32 | m_ui->label->setText( m_msg ) ; 33 | } 34 | 35 | this->setFixedSize( this->size() ) ; 36 | this->setWindowFlags( Qt::Window | Qt::Dialog ) ; 37 | this->setFont( parent->font() ) ; 38 | 39 | m_ui->checkBox->setChecked( false ) ; 40 | 41 | connect( m_ui->pbOK,&QPushButton::clicked,this,&cryptoinfo::pbOK ) ; 42 | connect( m_ui->checkBox,&QCheckBox::clicked,this,&cryptoinfo::checkBoxChecked ) ; 43 | 44 | this->installEventFilter( this ) ; 45 | 46 | this->Show() ; 47 | } 48 | 49 | bool cryptoinfo::eventFilter( QObject * watched,QEvent * event ) 50 | { 51 | return utility::eventFilter( this,watched,event,[ this ](){ this->HideUI() ; } ) ; 52 | } 53 | 54 | void cryptoinfo::closeEvent( QCloseEvent * e ) 55 | { 56 | e->ignore() ; 57 | this->HideUI() ; 58 | } 59 | 60 | void cryptoinfo::HideUI() 61 | { 62 | this->hide() ; 63 | this->deleteLater() ; 64 | } 65 | 66 | void cryptoinfo::pbOK() 67 | { 68 | this->HideUI() ; 69 | } 70 | 71 | void cryptoinfo::Show() 72 | { 73 | if( utility::pathExists( m_path ) ){ 74 | 75 | this->deleteLater() ; 76 | }else{ 77 | this->show() ; 78 | } 79 | } 80 | 81 | void cryptoinfo::checkBoxChecked( bool checked ) 82 | { 83 | QFile f( m_path ) ; 84 | 85 | if( checked ){ 86 | 87 | f.open( QIODevice::WriteOnly | QIODevice::Truncate ) ; 88 | }else{ 89 | f.remove() ; 90 | } 91 | } 92 | 93 | cryptoinfo::~cryptoinfo() 94 | { 95 | delete m_ui ; 96 | } 97 | -------------------------------------------------------------------------------- /zuluCrypt-gui/cryptoinfo.h: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright ( c ) 2012-2015 4 | * name : Francis Banyikwa 5 | * email: mhogomchungu@gmail.com 6 | * This program is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 2 of the License, or 9 | * ( at your option ) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program. If not, see . 18 | */ 19 | 20 | #ifndef CRYPTOINFO_H 21 | #define CRYPTOINFO_H 22 | 23 | #include 24 | #include 25 | 26 | #include 27 | 28 | #include "utility.h" 29 | 30 | class QCloseEvent ; 31 | 32 | namespace Ui { 33 | class cryptoinfo ; 34 | } 35 | 36 | class cryptoinfo : public QWidget 37 | { 38 | Q_OBJECT 39 | public: 40 | static cryptoinfo& instance( QWidget * parent,QString path,QString msg ) 41 | { 42 | return *( new cryptoinfo( parent,path,msg ) ) ; 43 | } 44 | cryptoinfo( QWidget * parent,QString path,QString msg ) ; 45 | ~cryptoinfo() ; 46 | signals: 47 | void closeUISignal() ; 48 | private: 49 | void pbOK() ; 50 | void checkBoxChecked( bool ) ; 51 | void Show() ; 52 | void closeEvent( QCloseEvent * ) ; 53 | bool eventFilter( QObject * watched,QEvent * event ) ; 54 | void HideUI() ; 55 | Ui::cryptoinfo * m_ui ; 56 | QString m_path ; 57 | QString m_msg ; 58 | }; 59 | 60 | #endif // CRYPTOINFO_H 61 | -------------------------------------------------------------------------------- /zuluCrypt-gui/cryptoinfo.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | cryptoinfo 4 | 5 | 6 | Qt::ApplicationModal 7 | 8 | 9 | 10 | 0 11 | 0 12 | 553 13 | 292 14 | 15 | 16 | 17 | Greetings 18 | 19 | 20 | 21 | 22 | 230 23 | 260 24 | 101 25 | 31 26 | 27 | 28 | 29 | Ok 30 | 31 | 32 | 33 | 34 | 35 | 20 36 | 0 37 | 511 38 | 221 39 | 40 | 41 | 42 | Please consult "menu->help->open zuluCrypt.pdf" to get an introduction on zuluCrypt. 43 | 44 | Unity users,the menu is on the upper left corner of the screen when zuluCrypt has focus. 45 | 46 | Project's homepage is at: 47 | https://mhogomchungu.github.io/zuluCrypt 48 | 49 | Recommending reading FAQ page from the project's main page. 50 | 51 | 52 | Qt::PlainText 53 | 54 | 55 | Qt::AlignCenter 56 | 57 | 58 | true 59 | 60 | 61 | 62 | 63 | 64 | 150 65 | 220 66 | 391 67 | 41 68 | 69 | 70 | 71 | Do not show this message again. 72 | 73 | 74 | 75 | 76 | 77 | 78 | -------------------------------------------------------------------------------- /zuluCrypt-gui/debugwindow.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright (c) 2018 4 | * name : Francis Banyikwa 5 | * email: mhogomchungu@gmail.com 6 | * This program is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 2 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program. If not, see . 18 | */ 19 | 20 | #include "debugwindow.h" 21 | #include "ui_debugwindow.h" 22 | #include "utility.h" 23 | 24 | debugWindow::debugWindow( QWidget * parent ) : 25 | QWidget( parent ), 26 | m_ui( new Ui::debugWindow ) 27 | { 28 | m_ui->setupUi( this ) ; 29 | 30 | this->window()->setFixedSize( this->window()->size() ) ; 31 | 32 | m_ui->pbClose->setFocus() ; 33 | 34 | connect( m_ui->pbClear,&QPushButton::clicked,[ this ](){ 35 | 36 | m_ui->textEdit->setText( QString() ) ; 37 | } ) ; 38 | 39 | connect( m_ui->pbClose,&QPushButton::clicked,[ this ](){ 40 | 41 | this->Hide() ; 42 | } ) ; 43 | 44 | utility::setDebugWindow( this ) ; 45 | } 46 | 47 | debugWindow::~debugWindow() 48 | { 49 | delete m_ui ; 50 | } 51 | 52 | void debugWindow::Show() 53 | { 54 | this->show() ; 55 | } 56 | 57 | void debugWindow::Hide() 58 | { 59 | this->hide() ; 60 | } 61 | 62 | void debugWindow::UpdateOutPutSlot( const QString& e,bool s ) 63 | { 64 | if( this->isVisible() || s ){ 65 | 66 | auto s = m_ui->textEdit->toPlainText() ; 67 | m_ui->textEdit->setText( s + "\n" + e ) ; 68 | } 69 | } 70 | 71 | void debugWindow::UpdateOutPut( const QString& e,bool m ) 72 | { 73 | QMetaObject::invokeMethod( this, 74 | "UpdateOutPutSlot", 75 | Qt::QueuedConnection, 76 | Q_ARG( QString,e ), 77 | Q_ARG( bool,m ) ) ; 78 | } 79 | 80 | void debugWindow::closeEvent( QCloseEvent * e ) 81 | { 82 | e->ignore() ; 83 | this->hide() ; 84 | } 85 | -------------------------------------------------------------------------------- /zuluCrypt-gui/debugwindow.h: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright (c) 2018 4 | * name : Francis Banyikwa 5 | * email: mhogomchungu@gmail.com 6 | * This program is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 2 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program. If not, see . 18 | */ 19 | 20 | #ifndef DEBUGWINDOW_H 21 | #define DEBUGWINDOW_H 22 | 23 | #include 24 | #include 25 | 26 | namespace Ui { 27 | class debugWindow; 28 | } 29 | 30 | class debugWindow : public QWidget 31 | { 32 | Q_OBJECT 33 | public: 34 | explicit debugWindow( QWidget * parent = nullptr ) ; 35 | ~debugWindow(); 36 | void Show() ; 37 | void Hide() ; 38 | void UpdateOutPut( const QString&,bool ) ; 39 | void closeEvent( QCloseEvent * ) ; 40 | private slots: 41 | void UpdateOutPutSlot( const QString&,bool ) ; 42 | private: 43 | Ui::debugWindow * m_ui ; 44 | }; 45 | 46 | #endif // DEBUGWINDOW_H 47 | -------------------------------------------------------------------------------- /zuluCrypt-gui/debugwindow.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | debugWindow 4 | 5 | 6 | 7 | 0 8 | 0 9 | 659 10 | 465 11 | 12 | 13 | 14 | zuluCrypt Debug Window 15 | 16 | 17 | 18 | 19 | 220 20 | 430 21 | 111 22 | 33 23 | 24 | 25 | 26 | C&lear 27 | 28 | 29 | 30 | 31 | 32 | 330 33 | 430 34 | 111 35 | 33 36 | 37 | 38 | 39 | &Close 40 | 41 | 42 | true 43 | 44 | 45 | true 46 | 47 | 48 | 49 | 50 | 51 | 10 52 | 10 53 | 641 54 | 421 55 | 56 | 57 | 58 | true 59 | 60 | 61 | 62 | 63 | 64 | 65 | -------------------------------------------------------------------------------- /zuluCrypt-gui/dialogmsg.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright ( c ) 2012-2015 3 | * name : Francis Banyikwa 4 | * email: mhogomchungu@gmail.com 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 2 of the License, or 8 | * ( at your option ) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | #ifndef DIALOGMSG_H 20 | #define DIALOGMSG_H 21 | 22 | #include 23 | #include 24 | #include "dialogok.h" 25 | 26 | class QWidget ; 27 | class QCloseEvent ; 28 | 29 | namespace Ui { 30 | class DialogMsg ; 31 | } 32 | 33 | class DialogMsg : public QDialog 34 | { 35 | Q_OBJECT 36 | public: 37 | explicit DialogMsg( QWidget * parent = 0 ) ; 38 | void ShowUIOK( const QString& title,const QString& msg ) ; 39 | QMessageBox::StandardButton ShowUIYesNo( const QString& title,const QString& msg ) ; 40 | QMessageBox::StandardButton ShowUIYesNoDefaultNo( const QString& title,const QString& msg ) ; 41 | void ShowUIInfo( const QString& title,bool,const QString& msg ) ; 42 | void ShowUIVolumeProperties( const QString& title,const QString& msg ) ; 43 | bool ShowUIOKDoNotShowOption( const QString& title,const QString& msg ) ; 44 | void ShowPermissionProblem( const QString& device ) ; 45 | void ShowPermissionProblem( const QString&,const QString& device ) ; 46 | void HideUI( void ) ; 47 | ~DialogMsg() ; 48 | 49 | private slots: 50 | void pbOK( void ) ; 51 | void pbYes( void ) ; 52 | void pbNo( void ) ; 53 | 54 | private: 55 | void SetUpButtons( void ) ; 56 | void ShowLabels( void ) ; 57 | void HideLabels( void ) ; 58 | void ShowUI( const QString& title,const QString& msg ) ; 59 | void setDimentions( const QString& msg ) ; 60 | void closeEvent( QCloseEvent * ) ; 61 | bool eventFilter( QObject * watched,QEvent * event ) ; 62 | Ui::DialogMsg * m_ui ; 63 | QWidget * m_parent ; 64 | QMessageBox::StandardButton m_status ; 65 | }; 66 | 67 | #endif // DIALOGMSG_H 68 | -------------------------------------------------------------------------------- /zuluCrypt-gui/dialogok.h: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright ( c ) 2016 4 | * name : Francis Banyikwa 5 | * email: mhogomchungu@gmail.com 6 | * This program is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 2 of the License, or 9 | * ( at your option ) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program. If not, see . 18 | */ 19 | 20 | #ifndef DIALOGOK_H 21 | #define DIALOGOK_H 22 | 23 | #include 24 | #include 25 | #include 26 | #include 27 | 28 | namespace Ui { 29 | class dialogok; 30 | } 31 | 32 | class dialogok : public QDialog 33 | { 34 | Q_OBJECT 35 | public: 36 | dialogok( QWidget * parent,bool,bool,const QString& title,const QString& msg ) ; 37 | ~dialogok() ; 38 | QMessageBox::StandardButton Show() ; 39 | private slots: 40 | void ok() ; 41 | void yes() ; 42 | void no() ; 43 | private: 44 | void closeEvent( QCloseEvent * ) ; 45 | Ui::dialogok * m_ui ; 46 | QMessageBox::StandardButton m_buttonRole ; 47 | QWidget * m_parent ; 48 | QWidget * m_mainWindow ; 49 | } ; 50 | 51 | #endif // DIALOGOK_H 52 | -------------------------------------------------------------------------------- /zuluCrypt-gui/dialogok.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | dialogok 4 | 5 | 6 | Qt::ApplicationModal 7 | 8 | 9 | 10 | 0 11 | 0 12 | 502 13 | 235 14 | 15 | 16 | 17 | Dialog 18 | 19 | 20 | true 21 | 22 | 23 | 24 | 25 | 200 26 | 200 27 | 101 28 | 31 29 | 30 | 31 | 32 | &Ok 33 | 34 | 35 | 36 | 37 | 38 | 10 39 | 10 40 | 481 41 | 181 42 | 43 | 44 | 45 | QFrame::NoFrame 46 | 47 | 48 | QFrame::Raised 49 | 50 | 51 | TextLabel 52 | 53 | 54 | Qt::AlignCenter 55 | 56 | 57 | true 58 | 59 | 60 | 61 | 62 | 63 | 150 64 | 200 65 | 101 66 | 31 67 | 68 | 69 | 70 | &Yes 71 | 72 | 73 | 74 | 75 | 76 | 250 77 | 200 78 | 101 79 | 31 80 | 81 | 82 | 83 | &No 84 | 85 | 86 | 87 | 88 | 89 | 90 | -------------------------------------------------------------------------------- /zuluCrypt-gui/erasedevice.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright ( c ) 2012-2015 3 | * name : Francis Banyikwa 4 | * email: mhogomchungu@gmail.com 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 2 of the License, or 8 | * ( at your option ) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | #ifndef ERASEDEVICE_H 20 | #define ERASEDEVICE_H 21 | 22 | #include 23 | #include 24 | #include 25 | 26 | #include "utility.h" 27 | 28 | class QCloseEvent ; 29 | class EraseTask ; 30 | class QWidget ; 31 | 32 | namespace Ui { 33 | class erasedevice ; 34 | } 35 | 36 | class erasedevice : public QDialog 37 | { 38 | Q_OBJECT 39 | public: 40 | static erasedevice& instance( QWidget * parent ) 41 | { 42 | return *( new erasedevice( parent ) ) ; 43 | } 44 | explicit erasedevice( QWidget * parent = 0 ) ; 45 | ~erasedevice() ; 46 | void ShowUI() ; 47 | void ShowUI( const QString& ) ; 48 | void HideUI() ; 49 | signals: 50 | void complete( QString ) ; 51 | void sendProgress( QString,QString,QString,QString,int ) ; 52 | private: 53 | void enableAll() ; 54 | void disableAll() ; 55 | void pbStart() ; 56 | void pbCancel() ; 57 | void pbFile() ; 58 | void pbPartition() ; 59 | void setProgress( QString,QString,QString,QString,int ) ; 60 | void setPath( QString ) ; 61 | void taskResult( int ) ; 62 | void closeEvent( QCloseEvent * ) ; 63 | bool eventFilter( QObject * watched,QEvent * event ) ; 64 | Ui::erasedevice * m_ui ; 65 | int m_option ; 66 | std::atomic_bool m_exit ; 67 | bool m_running ; 68 | utility::label m_label ; 69 | QString m_total_time ; 70 | QString m_average_speed ; 71 | }; 72 | 73 | #endif // ERASEDEVICE_H 74 | -------------------------------------------------------------------------------- /zuluCrypt-gui/executablesearchpaths.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright ( c ) 2017 4 | * name : Francis Banyikwa 5 | * email: mhogomchungu@gmail.com 6 | * This program is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 2 of the License, or 9 | * ( at your option ) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program. If not, see . 18 | */ 19 | 20 | #include "executablesearchpaths.h" 21 | 22 | QStringList executableSearchPaths::values() 23 | { 24 | return { "/usr/local/bin/", 25 | "/usr/local/sbin/", 26 | "/usr/bin/", 27 | "/usr/sbin/", 28 | "/bin/", 29 | "/sbin/", 30 | "/opt/local/bin/", 31 | "/opt/local/sbin/", 32 | "/opt/bin/", 33 | "/opt/sbin/" } ; 34 | } 35 | -------------------------------------------------------------------------------- /zuluCrypt-gui/executablesearchpaths.h: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright ( c ) 2017 4 | * name : Francis Banyikwa 5 | * email: mhogomchungu@gmail.com 6 | * This program is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 2 of the License, or 9 | * ( at your option ) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program. If not, see . 18 | */ 19 | 20 | #ifndef EXECUTABLESEARCHPATH_H 21 | #define EXECUTABLESEARCHPATH_H 22 | 23 | #include 24 | 25 | namespace executableSearchPaths 26 | { 27 | QStringList values() ; 28 | } 29 | 30 | #endif 31 | -------------------------------------------------------------------------------- /zuluCrypt-gui/file.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mhogomchungu/zuluCrypt/5e6a307b9540ea9d9f6bf05ffb35509f94ae9dc9/zuluCrypt-gui/file.png -------------------------------------------------------------------------------- /zuluCrypt-gui/filemanager.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright ( c ) 2017 4 | * name : Francis Banyikwa 5 | * email: mhogomchungu@gmail.com 6 | * This program is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 2 of the License, or 9 | * ( at your option ) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program. If not, see . 18 | */ 19 | 20 | #include "filemanager.h" 21 | #include "ui_filemanager.h" 22 | 23 | #include "utility.h" 24 | 25 | fileManager::fileManager( QWidget * parent,std::function< void( const QString& ) > s ) : 26 | QDialog( parent ), 27 | m_ui( new Ui::fileManager ),m_function( std::move( s ) ) 28 | { 29 | m_ui->setupUi( this ) ; 30 | 31 | connect( m_ui->pushButton,&QPushButton::clicked,this,&fileManager::set ) ; 32 | 33 | this->setFixedSize( this->size() ) ; 34 | this->setFont( parent->font() ) ; 35 | 36 | m_ui->label->setText( tr( "Enter Below The Name Of The Application You Want To Be Used To Open Mount Points." ) ) ; 37 | 38 | m_ui->lineEdit->setText( utility::fileManager() ) ; 39 | 40 | this->show() ; 41 | } 42 | 43 | fileManager::~fileManager() 44 | { 45 | delete m_ui ; 46 | } 47 | 48 | void fileManager::set() 49 | { 50 | auto e = m_ui->lineEdit->text() ; 51 | 52 | utility::setFileManager( e ) ; 53 | 54 | if( !e.isEmpty() ){ 55 | 56 | m_function( e ) ; 57 | } 58 | 59 | this->hide() ; 60 | this->deleteLater() ; 61 | } 62 | 63 | void fileManager::closeEvent( QCloseEvent * e ) 64 | { 65 | e->ignore() ; 66 | 67 | this->hide() ; 68 | this->deleteLater() ; 69 | } 70 | -------------------------------------------------------------------------------- /zuluCrypt-gui/filemanager.h: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright ( c ) 2017 4 | * name : Francis Banyikwa 5 | * email: mhogomchungu@gmail.com 6 | * This program is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 2 of the License, or 9 | * ( at your option ) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program. If not, see . 18 | */ 19 | 20 | #ifndef FILEMANAGER_H 21 | #define FILEMANAGER_H 22 | 23 | #include 24 | #include 25 | #include 26 | #include 27 | 28 | namespace Ui { 29 | class fileManager; 30 | } 31 | 32 | class fileManager : public QDialog 33 | { 34 | Q_OBJECT 35 | public: 36 | static void instance( QWidget * w,std::function< void( const QString& ) > s ) 37 | { 38 | new fileManager( w,std::move( s ) ) ; 39 | } 40 | explicit fileManager( QWidget * parent,std::function< void( const QString& ) > ) ; 41 | ~fileManager(); 42 | private: 43 | void set() ; 44 | void closeEvent( QCloseEvent * ) ; 45 | Ui::fileManager * m_ui ; 46 | std::function< void( const QString& ) > m_function ; 47 | }; 48 | 49 | #endif // FILEMANAGER_H 50 | -------------------------------------------------------------------------------- /zuluCrypt-gui/filemanager.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | fileManager 4 | 5 | 6 | 7 | 0 8 | 0 9 | 541 10 | 215 11 | 12 | 13 | 14 | Set File Manager 15 | 16 | 17 | 18 | 19 | 10 20 | 10 21 | 521 22 | 141 23 | 24 | 25 | 26 | TextLabel 27 | 28 | 29 | Qt::AlignCenter 30 | 31 | 32 | true 33 | 34 | 35 | 36 | 37 | 38 | 150 39 | 150 40 | 241 41 | 29 42 | 43 | 44 | 45 | 46 | 47 | 48 | 200 49 | 180 50 | 141 51 | 31 52 | 53 | 54 | 55 | &Set 56 | 57 | 58 | 59 | 60 | 61 | 62 | -------------------------------------------------------------------------------- /zuluCrypt-gui/folder.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mhogomchungu/zuluCrypt/5e6a307b9540ea9d9f6bf05ffb35509f94ae9dc9/zuluCrypt-gui/folder.png -------------------------------------------------------------------------------- /zuluCrypt-gui/help.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright ( c ) 2015 4 | * name : Francis Banyikwa 5 | * email: mhogomchungu@gmail.com 6 | * This program is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 2 of the License, or 9 | * ( at your option ) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program. If not, see . 18 | */ 19 | 20 | #include "help.h" 21 | #include "ui_help.h" 22 | 23 | #include 24 | #include 25 | #include 26 | 27 | #include "utility.h" 28 | 29 | #include "pdf_path.h" 30 | 31 | help::help( QWidget * parent,const QString& path ) : 32 | QDialog( parent ), 33 | m_ui( new Ui::help ), 34 | m_openPath( path ) 35 | { 36 | m_ui->setupUi( this ) ; 37 | 38 | this->setFixedSize( this->size() ) ; 39 | this->setWindowFlags( Qt::Window | Qt::Dialog ) ; 40 | 41 | this->setFont( parent->font() ) ; 42 | 43 | connect( m_ui->pushButton,SIGNAL( clicked( bool ) ),this,SLOT( pbClose() ) ) ; 44 | connect( m_ui->pushButton_2,SIGNAL( clicked( bool ) ),this,SLOT( pbOpenPDF() ) ) ; 45 | 46 | this->show() ; 47 | } 48 | 49 | help::~help() 50 | { 51 | delete m_ui ; 52 | } 53 | 54 | void help::pbClose() 55 | { 56 | this->hide() ; 57 | this->deleteLater() ; 58 | } 59 | 60 | void help::pbOpenPDF() 61 | { 62 | auto x = tr( "WARNING!" ) ; 63 | auto y = tr( "Failed to open zuluCrypt.pdf,make sure your system can open pdf files using \"%1\" tool and try again" ).arg( m_openPath ) ; 64 | 65 | QString e = PDF_PATH ; 66 | 67 | if( utility::pathExists( e ) ){ 68 | 69 | utility::openPath( e,m_openPath,this,x,y ) ; 70 | }else{ 71 | e += ".gz" ; 72 | 73 | if( utility::pathExists( e ) ){ 74 | 75 | utility::openPath( e,m_openPath,this,x,y ) ; 76 | }else{ 77 | utility::openPath( PDF_PATH,m_openPath,this,x,y ) ; 78 | } 79 | } 80 | } 81 | 82 | void help::closeEvent( QCloseEvent * e ) 83 | { 84 | e->ignore() ; 85 | this->pbClose() ; 86 | } 87 | 88 | bool help::eventFilter( QObject * watched,QEvent * event ) 89 | { 90 | return utility::eventFilter( this,watched,event,[ this ](){ this->pbClose() ; } ) ; 91 | } 92 | -------------------------------------------------------------------------------- /zuluCrypt-gui/help.h: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright ( c ) 2015 4 | * name : Francis Banyikwa 5 | * email: mhogomchungu@gmail.com 6 | * This program is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 2 of the License, or 9 | * ( at your option ) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program. If not, see . 18 | */ 19 | 20 | 21 | #ifndef HELP_H 22 | #define HELP_H 23 | 24 | #include 25 | #include 26 | 27 | class QCloseEvent ; 28 | class QEvent ; 29 | class QObject ; 30 | 31 | namespace Ui { 32 | class help; 33 | } 34 | 35 | class help : public QDialog 36 | { 37 | Q_OBJECT 38 | public: 39 | static void instance( QWidget * parent,const QString& path ) 40 | { 41 | new help( parent,path ) ; 42 | } 43 | explicit help( QWidget * parent,const QString& ) ; 44 | ~help() ; 45 | private slots: 46 | void pbClose() ; 47 | void pbOpenPDF() ; 48 | private: 49 | void closeEvent( QCloseEvent * ) ; 50 | bool eventFilter( QObject * watched,QEvent * event ) ; 51 | Ui::help * m_ui ; 52 | QString m_openPath ; 53 | }; 54 | 55 | #endif // HELP_H 56 | -------------------------------------------------------------------------------- /zuluCrypt-gui/icon.qrc: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | zuluCrypt.png 6 | keyfile.png 7 | folder.png 8 | partition.png 9 | file.png 10 | passphrase.png 11 | module.png 12 | 13 | 14 | -------------------------------------------------------------------------------- /zuluCrypt-gui/keyfile-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mhogomchungu/zuluCrypt/5e6a307b9540ea9d9f6bf05ffb35509f94ae9dc9/zuluCrypt-gui/keyfile-1.png -------------------------------------------------------------------------------- /zuluCrypt-gui/keyfile.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mhogomchungu/zuluCrypt/5e6a307b9540ea9d9f6bf05ffb35509f94ae9dc9/zuluCrypt-gui/keyfile.png -------------------------------------------------------------------------------- /zuluCrypt-gui/keystrength.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright ( c ) 2012-2015 3 | * name : Francis Banyikwa 4 | * email: mhogomchungu@gmail.com 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 2 of the License, or 8 | * ( at your option ) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | -------------------------------------------------------------------------------- /zuluCrypt-gui/keystrength.h: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright ( c ) 2012-2015 4 | * name : Francis Banyikwa 5 | * email: mhogomchungu@gmail.com 6 | * This program is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 2 of the License, or 9 | * ( at your option ) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | */ 18 | 19 | #ifndef KEYSTRENGTH_H 20 | #define KEYSTRENGTH_H 21 | 22 | #include 23 | 24 | #include "can_build_pwquality.h" 25 | 26 | #if BUILD_PWQUALITY 27 | class keystrength 28 | { 29 | public: 30 | keystrength() : m_handle( pwquality_default_settings() ) 31 | { 32 | } 33 | ~keystrength() 34 | { 35 | pwquality_free_settings( m_handle ) ; 36 | } 37 | int quality( const QString& e ) 38 | { 39 | return pwquality_check( m_handle,e.toLatin1().constData(), 40 | nullptr,nullptr,nullptr ) ; 41 | } 42 | bool canCheckQuality() 43 | { 44 | return true ; 45 | } 46 | private: 47 | pwquality_settings_t * m_handle ; 48 | }; 49 | 50 | #else 51 | 52 | class keystrength 53 | { 54 | public: 55 | keystrength() 56 | { 57 | } 58 | ~keystrength() 59 | { 60 | } 61 | int quality( const QString& e ) 62 | { 63 | Q_UNUSED( e ) ; 64 | return -1 ; 65 | } 66 | bool canCheckQuality() 67 | { 68 | return false ; 69 | } 70 | private: 71 | }; 72 | 73 | #endif 74 | 75 | #endif // KEYSTRENGTH_H 76 | -------------------------------------------------------------------------------- /zuluCrypt-gui/luksdeletekey.h: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright ( c ) 2011-2015 4 | * name : Francis Banyikwa 5 | * email: mhogomchungu@gmail.com 6 | * This program is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 2 of the License, or 9 | * ( at your option ) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program. If not, see . 18 | */ 19 | 20 | #ifndef LUKSDELETEKEY_H 21 | #define LUKSDELETEKEY_H 22 | 23 | #include 24 | #include 25 | #include 26 | 27 | #include "utility.h" 28 | 29 | class QWidget ; 30 | 31 | namespace Ui { 32 | class luksdeletekey ; 33 | } 34 | 35 | class luksdeletekey : public QDialog 36 | { 37 | Q_OBJECT 38 | public: 39 | static luksdeletekey& instance( QWidget * parent ) 40 | { 41 | return *( new luksdeletekey( parent ) ) ; 42 | } 43 | explicit luksdeletekey( QWidget *parent = 0 ) ; 44 | ~luksdeletekey() ; 45 | signals: 46 | void pbDeleteClicked( QString volumePath,bool passPhraseIsFile,QString passPhrase ) ; 47 | void pbOpenPartitionClicked() ; 48 | void HideUISignal() ; 49 | public: 50 | void ShowUI() ; 51 | void ShowUI( const QString& ) ; 52 | void ShowUI( const QString&,const QString&,std::function< void() > ) ; 53 | void HideUI() ; 54 | private slots: 55 | void Key( int ) ; 56 | void pbOpenPartition() ; 57 | void pbDelete() ; 58 | void pbCancel() ; 59 | void pbOpenKeyFile() ; 60 | void pbOpenVolume() ; 61 | void deleteKey( const QStringList& ) ; 62 | private: 63 | void disableAll() ; 64 | void enableAll() ; 65 | void closeEvent( QCloseEvent * ) ; 66 | bool eventFilter( QObject * watched,QEvent * event ) ; 67 | Ui::luksdeletekey * m_ui ; 68 | QString m_volumePath ; 69 | utility::label m_label ; 70 | bool m_isWindowClosable ; 71 | std::function< void() > m_onExit = [](){} ; 72 | }; 73 | 74 | #endif // LUKSDELETEKEY_H 75 | -------------------------------------------------------------------------------- /zuluCrypt-gui/main.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright (c) 2011-2015 4 | * name : Francis Banyikwa 5 | * email: mhogomchungu@gmail.com 6 | * This program is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 2 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program. If not, see . 18 | */ 19 | 20 | #include 21 | #include "zulucrypt.h" 22 | #include "utility.h" 23 | 24 | int main( int argc,char * argv[] ) 25 | { 26 | QSettings m( "zuluCrypt","zuluCrypt" ) ; 27 | 28 | utility::setSettingsObject( &m ) ; 29 | 30 | utility::setHDPI( "zuluCrypt" ) ; 31 | 32 | QApplication a( argc,argv ) ; 33 | 34 | #if QT_VERSION >= QT_VERSION_CHECK( 5,7,0 ) 35 | 36 | a.setDesktopFileName( "zuluCrypt" ) ; 37 | #endif 38 | return utility::startApplication( "zuluCrypt",[ & ](){ 39 | 40 | zuluCrypt e ; 41 | 42 | utility::invokeMethod( &e,&zuluCrypt::start ) ; 43 | 44 | return a.exec() ; 45 | } ) ; 46 | } 47 | -------------------------------------------------------------------------------- /zuluCrypt-gui/managesystemvolumes.h: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright ( c ) 2011-2015 4 | * name : Francis Banyikwa 5 | * email: mhogomchungu@gmail.com 6 | * This program is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 2 of the License, or 9 | * ( at your option ) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program. If not, see . 18 | */ 19 | 20 | #ifndef MANAGESYSTEMVOLUMES_H 21 | #define MANAGESYSTEMVOLUMES_H 22 | 23 | #include 24 | #include 25 | 26 | #include "utility.h" 27 | 28 | class QCloseEvent ; 29 | class QAction ; 30 | class QTableWidgetItem ; 31 | class QWidget ; 32 | 33 | namespace Ui { 34 | class manageSystemVolumes ; 35 | } 36 | 37 | class manageSystemVolumes : public QDialog 38 | { 39 | Q_OBJECT 40 | public: 41 | static void instance( QWidget * parent,const char * s ) 42 | { 43 | new manageSystemVolumes( parent,s ) ; 44 | } 45 | 46 | explicit manageSystemVolumes( QWidget * parent,const char * s ) ; 47 | ~manageSystemVolumes() ; 48 | void HideUI() ; 49 | signals: 50 | void HideUISignal() ; 51 | private: 52 | void defaultButton() ; 53 | void pbDone() ; 54 | void pbFile() ; 55 | void pbPartition() ; 56 | void currentItemChanged( QTableWidgetItem * current,QTableWidgetItem * previous ) ; 57 | void itemClicked( QTableWidgetItem * current,bool ) ; 58 | void itemClicked( QTableWidgetItem * current ) ; 59 | void removeCurrentRow() ; 60 | void contextMenu() ; 61 | void readSystemPartitions() ; 62 | void writeSystemPartitions() ; 63 | 64 | void addItemsToTable( const QStringList& ) ; 65 | void closeEvent( QCloseEvent * ) ; 66 | bool eventFilter( QObject * watched,QEvent * event ) ; 67 | Ui::manageSystemVolumes * m_ui ; 68 | QString m_path ; 69 | bool m_read ; 70 | }; 71 | 72 | #endif // MANAGESYSTEMVOLUMES_H 73 | -------------------------------------------------------------------------------- /zuluCrypt-gui/managevolumeheader.h: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright ( c ) 2011-2015 4 | * name : Francis Banyikwa 5 | * email: mhogomchungu@gmail.com 6 | * This program is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 2 of the License, or 9 | * ( at your option ) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program. If not, see . 18 | */ 19 | 20 | #ifndef managevolumeheader_H 21 | #define managevolumeheader_H 22 | 23 | #include 24 | #include 25 | 26 | #include "utility.h" 27 | class QWidget ; 28 | class QCloseEvent ; 29 | 30 | namespace Ui { 31 | class managevolumeheader; 32 | } 33 | 34 | class managevolumeheader : public QDialog 35 | { 36 | Q_OBJECT 37 | public: 38 | static managevolumeheader& instance ( QWidget * parent ) 39 | { 40 | return *( new managevolumeheader( parent ) ) ; 41 | } 42 | explicit managevolumeheader( QWidget * parent = 0 ) ; 43 | ~managevolumeheader() ; 44 | signals: 45 | void HideUISignal( void ) ; 46 | public slots: 47 | void ShowUI( void ) ; 48 | void HideUI( void ) ; 49 | void backUpHeader( void ) ; 50 | void backUpHeader( QString ) ; 51 | void restoreHeader( void ) ; 52 | private slots: 53 | void pbCancel( void ) ; 54 | void pbCreate( void ) ; 55 | void pbOpenLuksHeaderBackUp( void ) ; 56 | void taskFinished( int ) ; 57 | void pbOpenPartition( void ) ; 58 | void pbOpenFile( void ) ; 59 | void pbKeyFile( void ) ; 60 | void backUpHeaderNameChange( QString ) ; 61 | void cbKeyType( int ) ; 62 | void cbVolumeType( int ) ; 63 | void cbVolumeHeader( int ) ; 64 | private: 65 | void headerBackUp( void ) ; 66 | void closeEvent( QCloseEvent * ) ; 67 | bool eventFilter( QObject * watched,QEvent * event ) ; 68 | void disableAll( void ) ; 69 | void enableAll( void ) ; 70 | void success( void ) ; 71 | Ui::managevolumeheader * m_ui ; 72 | QString m_path ; 73 | bool m_OperationInProgress ; 74 | QString m_operation ; 75 | int m_saveHeader ; 76 | utility::veraCryptWarning m_veraCryptWarning ; 77 | }; 78 | 79 | #endif // CREATEKEYFILE_H 80 | -------------------------------------------------------------------------------- /zuluCrypt-gui/module.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mhogomchungu/zuluCrypt/5e6a307b9540ea9d9f6bf05ffb35509f94ae9dc9/zuluCrypt-gui/module.png -------------------------------------------------------------------------------- /zuluCrypt-gui/partition.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mhogomchungu/zuluCrypt/5e6a307b9540ea9d9f6bf05ffb35509f94ae9dc9/zuluCrypt-gui/partition.png -------------------------------------------------------------------------------- /zuluCrypt-gui/passphrase.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mhogomchungu/zuluCrypt/5e6a307b9540ea9d9f6bf05ffb35509f94ae9dc9/zuluCrypt-gui/passphrase.png -------------------------------------------------------------------------------- /zuluCrypt-gui/plugin.h: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright ( c ) 2015 4 | * name : Francis Banyikwa 5 | * email: mhogomchungu@gmail.com 6 | * This program is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 2 of the License, or 9 | * ( at your option ) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program. If not, see . 18 | */ 19 | 20 | 21 | #ifndef HMAC_H 22 | #define HMAC_H 23 | 24 | #include 25 | #include 26 | #include 27 | #include 28 | #include 29 | #include 30 | 31 | #include 32 | 33 | class QCloseEvent ; 34 | class QEvent ; 35 | 36 | #include "../plugins/plugins.h" 37 | 38 | namespace Ui { 39 | class plugin; 40 | } 41 | 42 | class plugin : public QDialog 43 | { 44 | Q_OBJECT 45 | public: 46 | static plugin& instance( QWidget * parent, 47 | plugins::plugin t, 48 | std::function< void( const QByteArray& ) > e, 49 | const QString& f = QString(), 50 | const QVector& g = QVector() ) 51 | { 52 | return *( new plugin( parent,t,e,f,g ) ) ; 53 | } 54 | plugin( QWidget * parent, 55 | plugins::plugin, 56 | std::function< void( const QByteArray& ) >, 57 | const QString& = QString(),const QVector& = QVector() ) ; 58 | ~plugin() ; 59 | private slots: 60 | void pbSetKey() ; 61 | void pbSelectKeyFile() ; 62 | void pbClose() ; 63 | private: 64 | void ShowUI() ; 65 | void HideUI() ; 66 | void enableAll() ; 67 | void disableAll() ; 68 | void closeEvent( QCloseEvent * ) ; 69 | bool eventFilter( QObject * watched,QEvent * event ) ; 70 | Ui::plugin * m_ui ; 71 | QByteArray m_key = QByteArray() ; 72 | std::function< void( const QByteArray& ) > m_function ; 73 | plugins::plugin m_pluginType ; 74 | QVector m_exe ; 75 | }; 76 | 77 | #endif // HMAC_H 78 | -------------------------------------------------------------------------------- /zuluCrypt-gui/readonlywarning.h: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright (c) 2015 4 | * name : Francis Banyikwa 5 | * email: mhogomchungu@gmail.com 6 | * This program is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 2 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program. If not, see . 18 | */ 19 | 20 | #ifndef READONLYWARNING_H 21 | #define READONLYWARNING_H 22 | 23 | #include 24 | #include 25 | 26 | class QWidget ; 27 | class QCloseEvent ; 28 | 29 | namespace Ui { 30 | class readOnlyWarning ; 31 | } 32 | 33 | class readOnlyWarning : public QDialog 34 | { 35 | Q_OBJECT 36 | public: 37 | static bool showWarning( QWidget * parent = 0,bool checked = false,const QString& app = QString() ) 38 | { 39 | auto w = new readOnlyWarning( parent,checked,app ) ; 40 | w->ShowUI() ; 41 | return checked ; 42 | } 43 | static bool getOpenVolumeReadOnlyOption( const QString& app ) ; 44 | explicit readOnlyWarning( QWidget * parent = 0,bool checked = false,const QString& app = QString() ) ; 45 | ~readOnlyWarning() ; 46 | void ShowUI( void ) ; 47 | void HideUI( void ) ; 48 | private slots: 49 | void pbOK( void ) ; 50 | void checkBoxChecked( bool ) ; 51 | private: 52 | void setReadOnlyOption( bool ) ; 53 | bool showUIwarning( void ) ; 54 | void closeEvent( QCloseEvent * ) ; 55 | bool eventFilter( QObject * watched,QEvent * event ) ; 56 | Ui::readOnlyWarning * m_ui ; 57 | bool m_checked ; 58 | QString m_app ; 59 | QString m_configPathShowUI ; 60 | }; 61 | 62 | #endif // READONLYWARNING_H 63 | -------------------------------------------------------------------------------- /zuluCrypt-gui/readonlywarning.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | readOnlyWarning 4 | 5 | 6 | 7 | 0 8 | 0 9 | 431 10 | 172 11 | 12 | 13 | 14 | WARNING 15 | 16 | 17 | 18 | 19 | 80 20 | 80 21 | 341 22 | 51 23 | 24 | 25 | 26 | Do Not Show This Message Again. 27 | 28 | 29 | 30 | 31 | 32 | 10 33 | 10 34 | 411 35 | 71 36 | 37 | 38 | 39 | Setting this option will cause the volume to open in read only mode. 40 | 41 | 42 | Qt::AlignCenter 43 | 44 | 45 | true 46 | 47 | 48 | 49 | 50 | 51 | 150 52 | 140 53 | 131 54 | 31 55 | 56 | 57 | 58 | &Ok 59 | 60 | 61 | 62 | 63 | 64 | 65 | -------------------------------------------------------------------------------- /zuluCrypt-gui/sharedObjects/icon.qrc: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | ../file.png 6 | 7 | 8 | -------------------------------------------------------------------------------- /zuluCrypt-gui/showluksslots.h: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright ( c ) 2020 4 | * name : Francis Banyikwa 5 | * email: mhogomchungu@gmail.com 6 | * This program is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 2 of the License, or 9 | * ( at your option ) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program. If not, see . 18 | */ 19 | 20 | #ifndef SHOWLUKSSLOTS_H 21 | #define SHOWLUKSSLOTS_H 22 | 23 | #include 24 | 25 | #include 26 | #include 27 | #include 28 | 29 | class QTableWidgetItem ; 30 | 31 | namespace Ui { 32 | class showLUKSSlots; 33 | } 34 | 35 | class showLUKSSlots : public QDialog 36 | { 37 | Q_OBJECT 38 | public: 39 | static void Show( QWidget * parent,const QString& path,std::function< void() > function ) 40 | { 41 | auto m = new showLUKSSlots( parent,path,std::move( function ) ) ; 42 | m->ShowUI() ; 43 | } 44 | explicit showLUKSSlots( QWidget * parent,const QString& path,std::function< void() > ) ; 45 | ~showLUKSSlots() ; 46 | private: 47 | void deleteSlot( QTableWidgetItem * ) ; 48 | void addSlot( QTableWidgetItem * ) ; 49 | void showData() ; 50 | void HideUI() ; 51 | void ShowUI() ; 52 | void enableAll() ; 53 | void disableAll() ; 54 | void showMenu( QTableWidgetItem * ) ; 55 | void closeEvent( QCloseEvent * ) ; 56 | bool eventFilter( QObject * watched,QEvent * event ) ; 57 | Ui::showLUKSSlots * m_ui ; 58 | std::function< void() > m_function ; 59 | QString m_path ; 60 | QWidget * m_parent ; 61 | }; 62 | 63 | #endif // SHOWLUKSSLOTS_H 64 | -------------------------------------------------------------------------------- /zuluCrypt-gui/systemsignalhandler.h: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright (c) 2018 4 | * name : Francis Banyikwa 5 | * email: mhogomchungu@gmail.com 6 | * This program is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 2 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program. If not, see . 18 | */ 19 | 20 | #ifndef HANDLE_SYSTEM_SIGNAL_H 21 | #define HANDLE_SYSTEM_SIGNAL_H 22 | 23 | #include 24 | #include 25 | 26 | class systemSignalHandler 27 | { 28 | public: 29 | enum class signal{ hup,term }; 30 | systemSignalHandler( QObject * parent ) ; 31 | void setAction( std::function< void( systemSignalHandler::signal ) > ) ; 32 | private: 33 | QObject * m_parent ; 34 | std::function< void( systemSignalHandler::signal ) > m_function ; 35 | } ; 36 | 37 | #endif 38 | -------------------------------------------------------------------------------- /zuluCrypt-gui/tablewidget.h: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright ( c ) 2012-2015 4 | * name : Francis Banyikwa 5 | * email: mhogomchungu@gmail.com 6 | * This program is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 2 of the License, or 9 | * ( at your option ) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program. If not, see . 18 | */ 19 | 20 | #ifndef TABLEWIDGET_H 21 | #define TABLEWIDGET_H 22 | 23 | #include 24 | #include 25 | #include 26 | #include 27 | 28 | class QTableWidget ; 29 | class QTableWidgetItem ; 30 | 31 | namespace tablewidget 32 | { 33 | void selectRow( QTableWidgetItem * current,QTableWidgetItem * previous ) ; 34 | void selectRow( QTableWidget *,int row ) ; 35 | void selectRow( QTableWidget *,const QString&,int column = 0 ) ; 36 | void selectLastRow( QTableWidget * ) ; 37 | 38 | void addOrUpdateRows( QTableWidget *,const QVector< QStringList >&,const QFont& = QFont() ) ; 39 | 40 | void addRow( QTableWidget *,const QStringList&,const QFont& = QFont() ) ; 41 | int addRow( QTableWidget * ) ; 42 | 43 | void updateRow( QTableWidget *,const QStringList&,int row,const QFont& ) ; 44 | 45 | void setFont( QTableWidget *,int row,const QFont& ) ; 46 | 47 | void deleteRow( QTableWidget *,int row ) ; 48 | void deleteRow( QTableWidget *,const QString&,int = 0 ) ; 49 | 50 | int columnHasEntry( QTableWidget *,const QString&,int = 0 ) ; 51 | 52 | QStringList columnEntries( QTableWidget * table,int = 0 ) ; 53 | QStringList rowEntries( QTableWidget * table,int = 0 ) ; 54 | 55 | void clearTable( QTableWidget * ) ; 56 | 57 | void setRowToolTip( QTableWidget *,int row,const QString& ) ; 58 | } 59 | 60 | #endif // TABLEWIDGET_H 61 | -------------------------------------------------------------------------------- /zuluCrypt-gui/tcrypt.h: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright (c) 2014-2015 4 | * name : Francis Banyikwa 5 | * email: mhogomchungu@gmail.com 6 | * This program is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 2 of the License, or 9 | * ( at your option ) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program. If not, see . 18 | */ 19 | #ifndef TCRYPT_H 20 | #define TCRYPT_H 21 | 22 | #include 23 | #include "utility.h" 24 | 25 | class QCloseEvent ; 26 | class QTableWidgetItem ; 27 | 28 | #include 29 | #include 30 | #include 31 | #include 32 | #include 33 | #include 34 | 35 | namespace Ui { 36 | class tcrypt; 37 | } 38 | 39 | class tcrypt : public QDialog 40 | { 41 | Q_OBJECT 42 | public: 43 | static tcrypt& instance( QWidget * parent, 44 | bool b, 45 | std::function< void( const QString&,const QStringList& ) > e, 46 | std::function< void() > f ) 47 | { 48 | return *( new tcrypt( parent,b,std::move( e ),std::move( f ) ) ) ; 49 | } 50 | tcrypt( QWidget * parent, 51 | bool, 52 | std::function< void( const QString&,const QStringList& ) >, 53 | std::function< void() > ) ; 54 | ~tcrypt() ; 55 | private slots: 56 | void currentItemChanged( QTableWidgetItem * current,QTableWidgetItem * previous ) ; 57 | void itemClicked ( QTableWidgetItem * item ) ; 58 | void dragEnterEvent( QDragEnterEvent * e ) ; 59 | void dropEvent( QDropEvent * ) ; 60 | void pbSend( void ) ; 61 | void pbCancel( void ) ; 62 | void pbAddKeyFIle( void ) ; 63 | private: 64 | void HideUI( void ) ; 65 | void closeEvent( QCloseEvent * ) ; 66 | bool eventFilter( QObject * watched,QEvent * event ) ; 67 | Ui::tcrypt * m_ui ; 68 | std::function< void( const QString&,const QStringList& ) > m_success ; 69 | std::function< void() > m_cancelled ; 70 | }; 71 | 72 | #endif // TCRYPT_H 73 | -------------------------------------------------------------------------------- /zuluCrypt-gui/warnwhenextendingcontainerfile.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright ( c ) 2019 3 | * name : Francis Banyikwa 4 | * email: mhogomchungu@gmail.com 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 2 of the License, or 8 | * ( at your option ) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | #include "warnwhenextendingcontainerfile.h" 20 | #include "ui_warnwhenextendingcontainerfile.h" 21 | 22 | #include "utility.h" 23 | 24 | void warnWhenExtendingContainerFile::Show( QWidget * parent,std::function< void() > function ) 25 | { 26 | if( utility::showWarningOnExtendingCoverFile() ){ 27 | 28 | new warnWhenExtendingContainerFile( parent,function ) ; 29 | }else{ 30 | function() ; 31 | } 32 | } 33 | 34 | warnWhenExtendingContainerFile::warnWhenExtendingContainerFile( QWidget * parent,std::function< void() > function ) : 35 | QDialog( parent ), 36 | m_ui( new Ui::warnWhenExtendingContainerFile ), 37 | m_function( std::move( function ) ) 38 | { 39 | m_ui->setupUi( this ) ; 40 | 41 | connect( m_ui->pbOk,&QPushButton::pressed,[ this ](){ 42 | 43 | this->Hide() ; 44 | } ) ; 45 | 46 | connect( m_ui->checkBox,&QCheckBox::stateChanged,[]( int s ){ 47 | 48 | utility::showWarningOnExtendingCoverFile( s == Qt::Unchecked ) ; 49 | } ) ; 50 | 51 | this->show() ; 52 | } 53 | 54 | warnWhenExtendingContainerFile::~warnWhenExtendingContainerFile() 55 | { 56 | delete m_ui ; 57 | } 58 | 59 | void warnWhenExtendingContainerFile::Hide() 60 | { 61 | this->hide() ; 62 | m_function() ; 63 | this->deleteLater() ; 64 | } 65 | 66 | void warnWhenExtendingContainerFile::closeEvent( QCloseEvent * e ) 67 | { 68 | e->ignore() ; 69 | this->Hide() ; 70 | } 71 | -------------------------------------------------------------------------------- /zuluCrypt-gui/warnwhenextendingcontainerfile.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright ( c ) 2019 3 | * name : Francis Banyikwa 4 | * email: mhogomchungu@gmail.com 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 2 of the License, or 8 | * ( at your option ) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | 20 | #ifndef WARNWHENEXTENDINGCONTAINERFILE_H 21 | #define WARNWHENEXTENDINGCONTAINERFILE_H 22 | 23 | #include 24 | #include 25 | #include 26 | 27 | namespace Ui { 28 | class warnWhenExtendingContainerFile ; 29 | } 30 | 31 | class warnWhenExtendingContainerFile : public QDialog 32 | { 33 | Q_OBJECT 34 | public: 35 | static void Show( QWidget * parent,std::function< void() > ) ; 36 | explicit warnWhenExtendingContainerFile( QWidget * parent,std::function< void() > ) ; 37 | ~warnWhenExtendingContainerFile() ; 38 | private: 39 | void Hide() ; 40 | void closeEvent( QCloseEvent * ) ; 41 | Ui::warnWhenExtendingContainerFile * m_ui ; 42 | std::function< void() > m_function ; 43 | }; 44 | 45 | #endif // WARNWHENEXTENDINGCONTAINERFILE_H 46 | -------------------------------------------------------------------------------- /zuluCrypt-gui/zuluCrypt-0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mhogomchungu/zuluCrypt/5e6a307b9540ea9d9f6bf05ffb35509f94ae9dc9/zuluCrypt-gui/zuluCrypt-0.png -------------------------------------------------------------------------------- /zuluCrypt-gui/zuluCrypt.desktop.README: -------------------------------------------------------------------------------- 1 | 2 | zuluCrypt.desktop file will be edited during the configuration stage. 3 | 4 | If you want your changes to not get overwritten, add them to the desktop file section in the "CMakeLists.txt" file located in this folder. 5 | -------------------------------------------------------------------------------- /zuluCrypt-gui/zuluCrypt.nicolas.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mhogomchungu/zuluCrypt/5e6a307b9540ea9d9f6bf05ffb35509f94ae9dc9/zuluCrypt-gui/zuluCrypt.nicolas.png -------------------------------------------------------------------------------- /zuluCrypt-gui/zuluCrypt.papirus.dark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mhogomchungu/zuluCrypt/5e6a307b9540ea9d9f6bf05ffb35509f94ae9dc9/zuluCrypt-gui/zuluCrypt.papirus.dark.png -------------------------------------------------------------------------------- /zuluCrypt-gui/zuluCrypt.papirus.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mhogomchungu/zuluCrypt/5e6a307b9540ea9d9f6bf05ffb35509f94ae9dc9/zuluCrypt-gui/zuluCrypt.papirus.png -------------------------------------------------------------------------------- /zuluCrypt-gui/zuluCrypt.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mhogomchungu/zuluCrypt/5e6a307b9540ea9d9f6bf05ffb35509f94ae9dc9/zuluCrypt-gui/zuluCrypt.png -------------------------------------------------------------------------------- /zuluCrypt.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Raw disk image 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /zuluMount-cli/README: -------------------------------------------------------------------------------- 1 | 2 | These source files are controlled by ../zuluCrypt-cli/CMakeLists.txt 3 | -------------------------------------------------------------------------------- /zuluMount-cli/crypto_umount.c: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright (c) 2012-2015 4 | * name : Francis Banyikwa 5 | * email: mhogomchungu@gmail.com 6 | * This program is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 2 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program. If not, see . 18 | */ 19 | #include "includes.h" 20 | 21 | int zuluMountCryptoUMount( ARGS * args ) 22 | { 23 | const char * device = args->device ; 24 | const char * UUID = args->uuid ; 25 | uid_t uid = args->user_id ; 26 | 27 | const char * mapping_name ; 28 | char * path = NULL ; 29 | 30 | int st ; 31 | 32 | string_t str = StringVoid ; 33 | 34 | if( UUID == NULL ){ 35 | 36 | if( StringPrefixEqual( device,"/dev/loop" ) ){ 37 | 38 | /* 39 | * zuluCryptLoopDeviceAddress_1() is defined in ../zuluCrypt-cli/create_loop_device.c 40 | */ 41 | 42 | path = zuluCryptLoopDeviceAddress_1( device ) ; 43 | 44 | if( path == NULL ){ 45 | 46 | return 20 ; 47 | } 48 | }else{ 49 | path = StringCopy_2( device ) ; 50 | } 51 | 52 | mapping_name = path + StringLastIndexOfChar_1( path,'/' ) + 1 ; 53 | }else{ 54 | str = String( UUID ) ; 55 | StringRemoveString( str,"\"" ) ; 56 | mapping_name = StringSubChar( str,4,'-' ) ; 57 | } 58 | 59 | /* 60 | * zuluCryptEXECloseVolume() is defined in ../zuluCrypt-cli/bin/close_volume.c 61 | */ 62 | st = zuluCryptEXECloseVolume( device,mapping_name,uid ) ; 63 | 64 | StringDelete( &str ) ; 65 | 66 | StringFree( path ) ; 67 | 68 | return st ; 69 | } 70 | -------------------------------------------------------------------------------- /zuluMount-gui.1: -------------------------------------------------------------------------------- 1 | 2 | .TH zuluMount-gui 1 3 | 4 | .br 5 | .SH NAME 6 | zuluMount-gui - Graphical front end for zuluCrypt-cli 7 | .br 8 | .SH SUMMARY 9 | zuluMount-gui is a GUI front end to zuluCrypt-cli 10 | .br 11 | copyright: 2011-2013 Ink Francis,mhogomchungu@gmail.com 12 | .br 13 | license : GPLv2+ 14 | .br 15 | options: 16 | .br 17 | -d path to where a volume to be auto unlocked/mounted is located 18 | .br 19 | -m tool to use to open a default file manager(default tool is xdg-open) 20 | .br 21 | -e start the application without showing the GUI 22 | .br 23 | .br 24 | .SH LAST EDIT 25 | Last change: Mon Apr 8 20:03:01 EDT 2013 26 | 27 | -------------------------------------------------------------------------------- /zuluMount-gui/events.h: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright (c) 2013-2015 4 | * name : Francis Banyikwa 5 | * email: mhogomchungu@gmail.com 6 | * This program is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 2 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program. If not, see . 18 | */ 19 | #ifndef AUTO_MOUNT_H 20 | #define AUTO_MOUNT_H 21 | 22 | #include 23 | #include 24 | 25 | #include "task.hpp" 26 | 27 | class QObject ; 28 | class events ; 29 | class volumeProperty ; 30 | 31 | class events : public QObject 32 | { 33 | Q_OBJECT 34 | public: 35 | explicit events( QObject * parent,std::function< void() > ) ; 36 | ~events() ; 37 | void stop() ; 38 | void start() ; 39 | signals: 40 | void volumeRemoved( QString ) ; 41 | void volumeMiniProperties( volumeProperty * ) ; 42 | private: 43 | void run() ; 44 | QObject * m_parent ; 45 | std::function< void() > m_function ; 46 | Task::future< void > * m_task = nullptr ; 47 | }; 48 | 49 | #endif // AUTO_MOUNT_H 50 | -------------------------------------------------------------------------------- /zuluMount-gui/file.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mhogomchungu/zuluCrypt/5e6a307b9540ea9d9f6bf05ffb35509f94ae9dc9/zuluMount-gui/file.png -------------------------------------------------------------------------------- /zuluMount-gui/folder.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mhogomchungu/zuluCrypt/5e6a307b9540ea9d9f6bf05ffb35509f94ae9dc9/zuluMount-gui/folder.png -------------------------------------------------------------------------------- /zuluMount-gui/icon.qrc: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | zuluCrypt.png 6 | zuluMount.png 7 | passphrase.png 8 | keyfile.png 9 | module.png 10 | folder.png 11 | file.png 12 | partition.png 13 | 14 | 15 | -------------------------------------------------------------------------------- /zuluMount-gui/keyfile-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mhogomchungu/zuluCrypt/5e6a307b9540ea9d9f6bf05ffb35509f94ae9dc9/zuluMount-gui/keyfile-1.png -------------------------------------------------------------------------------- /zuluMount-gui/keyfile.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mhogomchungu/zuluCrypt/5e6a307b9540ea9d9f6bf05ffb35509f94ae9dc9/zuluMount-gui/keyfile.png -------------------------------------------------------------------------------- /zuluMount-gui/main.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright (c) 2012-2015 4 | * name : Francis Banyikwa 5 | * email: mhogomchungu@gmail.com 6 | * This program is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 2 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program. If not, see . 18 | */ 19 | 20 | #include 21 | #include "zulumount.h" 22 | #include "../zuluCrypt-gui/utility.h" 23 | 24 | int main( int argc,char * argv[] ) 25 | { 26 | QSettings m( "zuluCrypt","zuluMount" ) ; 27 | 28 | utility::setSettingsObject( &m ) ; 29 | 30 | utility::setHDPI( "zuluMount" ) ; 31 | 32 | QApplication a( argc,argv ) ; 33 | 34 | #if QT_VERSION >= QT_VERSION_CHECK( 5,7,0 ) 35 | 36 | a.setDesktopFileName( "zuluMount" ) ; 37 | #endif 38 | return utility::startApplication( "zuluMount",[ & ](){ 39 | 40 | zuluMount e ; 41 | 42 | utility::invokeMethod( &e,&zuluMount::Show ) ; 43 | 44 | return a.exec() ; 45 | } ) ; 46 | } 47 | -------------------------------------------------------------------------------- /zuluMount-gui/module.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mhogomchungu/zuluCrypt/5e6a307b9540ea9d9f6bf05ffb35509f94ae9dc9/zuluMount-gui/module.png -------------------------------------------------------------------------------- /zuluMount-gui/monitor_mountinfo.h: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright (c) 2012-2015 4 | * name : Francis Banyikwa 5 | * email: mhogomchungu@gmail.com 6 | * This program is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 2 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program. If not, see . 18 | */ 19 | 20 | 21 | #ifndef MONITOR_MOUNTINFO_H 22 | #define MONITOR_MOUNTINFO_H 23 | 24 | #include 25 | #include 26 | 27 | #include 28 | #include 29 | 30 | #include "task.hpp" 31 | 32 | class QObject ; 33 | class volumeProperty ; 34 | 35 | class monitor_mountinfo : public QObject 36 | { 37 | Q_OBJECT 38 | public: 39 | monitor_mountinfo( QObject * parent,bool,std::function< void() > ) ; 40 | std::function< void() > stop() ; 41 | void announceEvents( bool ) ; 42 | void start( void ) ; 43 | ~monitor_mountinfo() ; 44 | signals: 45 | void gotEvent() ; 46 | void volumeRemoved( QString ) ; 47 | void volumeMiniProperties( volumeProperty * ) ; 48 | void volumeMiniProperties_0( volumeProperty * ) ; 49 | private: 50 | void run( void ) ; 51 | 52 | QObject * m_parent ; 53 | 54 | std::function< void() > m_stop ; 55 | 56 | bool m_announceChanges ; 57 | bool m_announceEvents ; 58 | 59 | Task::future< void > * m_task = nullptr ; 60 | }; 61 | 62 | #endif // MONITOR_MOUNTINFO_H 63 | -------------------------------------------------------------------------------- /zuluMount-gui/oneinstance.h: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | * 4 | * Copyright (c) 2012-2015 5 | * name : Francis Banyikwa 6 | * email: mhogomchungu@gmail.com 7 | * This program is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU General Public License as published by 9 | * the Free Software Foundation, either version 2 of the License, or 10 | * (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU General Public License 18 | * along with this program. If not, see . 19 | */ 20 | 21 | #ifndef ONEINSTANCE_H 22 | #define ONEINSTANCE_H 23 | 24 | #include 25 | #include 26 | #include 27 | #include 28 | 29 | #include 30 | 31 | class oneinstance : public QObject 32 | { 33 | Q_OBJECT 34 | public: 35 | static void instance( QObject * a, 36 | const QString& b, 37 | const QString& c, 38 | std::function< void( const QString& ) > d, 39 | std::function< void( int ) > e, 40 | std::function< void( const QString& ) > f ) 41 | { 42 | new oneinstance( a,b,c,std::move( d ),std::move( e ),std::move( f ) ) ; 43 | } 44 | oneinstance( QObject *, 45 | const QString&, 46 | const QString&, 47 | std::function< void( const QString& ) >, 48 | std::function< void( int ) >, 49 | std::function< void( const QString& ) > ) ; 50 | ~oneinstance() ; 51 | private: 52 | void connected( void ) ; 53 | void gotConnection( void ) ; 54 | void errorOnConnect( QLocalSocket::LocalSocketError ) ; 55 | void start( void ) ; 56 | QLocalServer m_localServer ; 57 | QLocalSocket m_localSocket ; 58 | QString m_serverPath ; 59 | QString m_argument ; 60 | std::function< void( const QString& ) > m_start ; 61 | std::function< void( int ) > m_exit ; 62 | std::function< void( const QString& ) > m_event ; 63 | }; 64 | 65 | #endif // ONEINSTANCE_H 66 | -------------------------------------------------------------------------------- /zuluMount-gui/partition.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mhogomchungu/zuluCrypt/5e6a307b9540ea9d9f6bf05ffb35509f94ae9dc9/zuluMount-gui/partition.png -------------------------------------------------------------------------------- /zuluMount-gui/passphrase.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mhogomchungu/zuluCrypt/5e6a307b9540ea9d9f6bf05ffb35509f94ae9dc9/zuluMount-gui/passphrase.png -------------------------------------------------------------------------------- /zuluMount-gui/veracryptpimdialog.h: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright (c) 2015 4 | * name : Francis Banyikwa 5 | * email: mhogomchungu@gmail.com 6 | * This program is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 2 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program. If not, see . 18 | */ 19 | 20 | 21 | #ifndef VERACRYPTPIMDIALOG_H 22 | #define VERACRYPTPIMDIALOG_H 23 | 24 | #include 25 | #include 26 | 27 | #include 28 | #include 29 | 30 | #include 31 | 32 | class QCloseEvent ; 33 | 34 | namespace Ui { 35 | class VeraCryptPIMDialog ; 36 | } 37 | 38 | class VeraCryptPIMDialog : public QDialog 39 | { 40 | Q_OBJECT 41 | public: 42 | static VeraCryptPIMDialog& instance( QWidget * parent,std::function< void( int ) > function ) 43 | { 44 | return *( new VeraCryptPIMDialog( parent,std::move( function ) ) ) ; 45 | } 46 | explicit VeraCryptPIMDialog( QWidget * parent,std::function< void( int ) > ) ; 47 | ~VeraCryptPIMDialog() ; 48 | private: 49 | void pbSet() ; 50 | void pbCancel() ; 51 | void Show() ; 52 | void Hide() ; 53 | void closeEvent( QCloseEvent * ) ; 54 | bool eventFilter( QObject * watched,QEvent * event ) ; 55 | Ui::VeraCryptPIMDialog * m_ui ; 56 | std::function< void( int ) > m_function ; 57 | }; 58 | 59 | #endif // VERACRYPTPIMDIALOG_H 60 | -------------------------------------------------------------------------------- /zuluMount-gui/veracryptpimdialog.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | VeraCryptPIMDialog 4 | 5 | 6 | 7 | 0 8 | 0 9 | 480 10 | 182 11 | 12 | 13 | 14 | VeraCrypt PIM value 15 | 16 | 17 | 18 | 19 | 139 20 | 150 21 | 101 22 | 31 23 | 24 | 25 | 26 | &Set 27 | 28 | 29 | 30 | 31 | 32 | 239 33 | 150 34 | 101 35 | 31 36 | 37 | 38 | 39 | &Cancel 40 | 41 | 42 | 43 | 44 | 45 | 20 46 | 10 47 | 451 48 | 91 49 | 50 | 51 | 52 | TextLabel 53 | 54 | 55 | Qt::AlignCenter 56 | 57 | 58 | 59 | 60 | 61 | 20 62 | 110 63 | 441 64 | 31 65 | 66 | 67 | 68 | QLineEdit::Password 69 | 70 | 71 | 72 | 73 | 74 | 75 | -------------------------------------------------------------------------------- /zuluMount-gui/volumeproperty.h: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright (c) 2014-2015 4 | * name : Francis Banyikwa 5 | * email: mhogomchungu@gmail.com 6 | * This program is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 2 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program. If not, see . 18 | */ 19 | #ifndef VOLUMEENTRYPROPERTIES_H 20 | #define VOLUMEENTRYPROPERTIES_H 21 | 22 | #include 23 | #include 24 | 25 | #include 26 | 27 | #include 28 | 29 | #include "../zuluCrypt-gui/utility.h" 30 | 31 | class volumeProperty 32 | { 33 | public: 34 | static bool encryptedFolder( const QString& e,bool f ) ; 35 | 36 | volumeProperty( const QStringList& l = QStringList(),bool isSystem = false ) ; 37 | volumeProperty( const std::initializer_list& l,bool isSystem = false ) ; 38 | 39 | const QString& volumeName() const ; 40 | const QString& mountPoint() const ; 41 | const QString& fileSystem() const ; 42 | const QString& label() const ; 43 | const QString& volumeSize() const ; 44 | const QString& spaceUsedPercentage() const ; 45 | 46 | bool isSystem() const ; 47 | bool isEmpty() const ; 48 | bool isNotEmpty() const ; 49 | bool isValid() const ; 50 | bool encryptedVolume() const ; 51 | bool mounted() const ; 52 | QStringList entryList() const ; 53 | volumeProperty& setMountPoint( const QString& m ) ; 54 | private: 55 | void setValues( const QStringList& l,bool isSystem ) ; 56 | 57 | QString m_volume ; 58 | QString m_mountPoint ; 59 | QString m_fileSystem ; 60 | QString m_label ; 61 | QString m_volumeSize ; 62 | QString m_usedSpacePercentage ; 63 | bool m_isSystem = true ; 64 | }; 65 | 66 | #endif // VOLUMEENTRYPROPERTIES_H 67 | -------------------------------------------------------------------------------- /zuluMount-gui/zuluCrypt-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mhogomchungu/zuluCrypt/5e6a307b9540ea9d9f6bf05ffb35509f94ae9dc9/zuluMount-gui/zuluCrypt-1.png -------------------------------------------------------------------------------- /zuluMount-gui/zuluCrypt.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mhogomchungu/zuluCrypt/5e6a307b9540ea9d9f6bf05ffb35509f94ae9dc9/zuluMount-gui/zuluCrypt.png -------------------------------------------------------------------------------- /zuluMount-gui/zuluMount.nicolas.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mhogomchungu/zuluCrypt/5e6a307b9540ea9d9f6bf05ffb35509f94ae9dc9/zuluMount-gui/zuluMount.nicolas.png -------------------------------------------------------------------------------- /zuluMount-gui/zuluMount.papirus.dark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mhogomchungu/zuluCrypt/5e6a307b9540ea9d9f6bf05ffb35509f94ae9dc9/zuluMount-gui/zuluMount.papirus.dark.png -------------------------------------------------------------------------------- /zuluMount-gui/zuluMount.papirus.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mhogomchungu/zuluCrypt/5e6a307b9540ea9d9f6bf05ffb35509f94ae9dc9/zuluMount-gui/zuluMount.papirus.png -------------------------------------------------------------------------------- /zuluMount-gui/zuluMount.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mhogomchungu/zuluCrypt/5e6a307b9540ea9d9f6bf05ffb35509f94ae9dc9/zuluMount-gui/zuluMount.png -------------------------------------------------------------------------------- /zuluMount-gui/zuluMount.pro: -------------------------------------------------------------------------------- 1 | #------------------------------------------------- 2 | # 3 | # Project created by QtCreator 2012-08-03T05:17:03 4 | # 5 | #------------------------------------------------- 6 | 7 | QT += core gui 8 | 9 | TARGET = zuluMount-gui 10 | TEMPLATE = app 11 | 12 | 13 | SOURCES += main.cpp\ 14 | zulumount.cpp\ 15 | keydialog.cpp \ 16 | ../zuluCrypt-gui/dialogmsg.cpp \ 17 | ../zuluCrypt-gui/userfont.cpp \ 18 | ../zuluCrypt-gui/tablewidget.cpp \ 19 | mountpartition.cpp \ 20 | ../zuluCrypt-gui/socketsendkey.cpp \ 21 | oneinstance.cpp \ 22 | ../zuluCrypt-gui/utility.cpp \ 23 | events.cpp \ 24 | monitor_mountinfo.cpp \ 25 | task.cpp \ 26 | deviceoffset.cpp \ 27 | mountoptions.cpp \ 28 | volumepropery.cpp \ 29 | zulumounttask.cpp \ 30 | veracryptpimdialog.cpp 31 | 32 | HEADERS += zulumount.h\ 33 | keydialog.h \ 34 | ../zuluCrypt-gui/dialogmsg.h\ 35 | ../zuluCrypt-gui/userfont.h \ 36 | ../zuluCrypt-gui/tablewidget.h \ 37 | mountpartition.h \ 38 | ../zuluCrypt-gui/socketsendkey.h \ 39 | oneinstance.h \ 40 | ../zuluCrypt-gui/utility.h \ 41 | events.h \ 42 | monitor_mountinfo.h \ 43 | task.h \ 44 | deviceoffset.h \ 45 | mountoptions.h \ 46 | volumepropery.h \ 47 | zulumounttask.h \ 48 | veracryptpimdialog.h 49 | 50 | TRANSLATIONS = ../translations/zuluMount/en_US.ts \ 51 | ../translations/zuluMount/fr_FR.ts \ 52 | ../translations/zuluMount/de_DE.ts \ 53 | ../translations/zuluMount/ar_SA.ts \ 54 | 55 | FORMS += zulumount.ui\ 56 | ../zuluCrypt-gui/dialogmsg.ui \ 57 | keydialog.ui \ 58 | mountpartition.ui \ 59 | deviceoffset.ui \ 60 | mountoptions.ui \ 61 | veracryptpimdialog.ui 62 | 63 | RESOURCES += \ 64 | icon.qrc 65 | 66 | INCLUDEPATH +=/home/ink/projects/build/zuluCrypt /home/local/KDE4/include /home/local/QT/include 67 | 68 | LIBS += -lzuluCryptPluginManager -lQtNetwork -lkwalletbackend -L/home/local/KDE4/lib -llxqtwallet 69 | -------------------------------------------------------------------------------- /zuluMount-gui/zuluMount.xcf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mhogomchungu/zuluCrypt/5e6a307b9540ea9d9f6bf05ffb35509f94ae9dc9/zuluMount-gui/zuluMount.xcf -------------------------------------------------------------------------------- /zuluMount-gui/zulumounttask.h: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright (c) 2014-2015 4 | * name : Francis Banyikwa 5 | * email: mhogomchungu@gmail.com 6 | * This program is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 2 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program. If not, see . 18 | */ 19 | 20 | #ifndef ZULUMOUNTTASK_H 21 | #define ZULUMOUNTTASK_H 22 | 23 | #include "volumeproperty.h" 24 | #include "task.hpp" 25 | #include "../zuluCrypt-gui/utility.h" 26 | 27 | #include 28 | #include 29 | #include 30 | 31 | struct volumeStatus 32 | { 33 | QString volumeName ; 34 | bool volumeRemoved ; 35 | volumeProperty * entry ; 36 | }; 37 | 38 | namespace zuluMountTask 39 | { 40 | enum class devices 41 | { 42 | device,dm_device,md_device 43 | }; 44 | 45 | struct event 46 | { 47 | zuluMountTask::devices deviceType ; 48 | bool added ; 49 | QString volumeName ; 50 | }; 51 | 52 | Task::future< QString >& volumeProperties( const QString& volume,const QString& volumeType ) ; 53 | Task::future< QVector< volumeProperty > >& updateVolumeList() ; 54 | Task::future< volumeProperty >& getVolumeProperties( const QString& e ) ; 55 | Task::future< utility::Task >& unmountVolume( const QString& volumePath, 56 | const QString& volumeType, 57 | const QString& powerOffCommand = QString() ) ; 58 | 59 | utility::Task volumeUnmount( const QString& volumePath, 60 | const QString& volumeType, 61 | const QString& powerOffCommand = QString() ) ; 62 | 63 | void checkUnMount( const QString& ) ; 64 | 65 | volumeStatus volumeMiniProperties( const QString& volume ) ; 66 | volumeStatus deviceProperties( const zuluMountTask::event& ) ; 67 | 68 | QStringList mountedVolumeList() ; 69 | QStringList hiddenVolumeList() ; 70 | 71 | void addVolumeToHiddenVolumeList( const QString& ) ; 72 | void removeVolumeFromHiddenVolumeList( const QString& ) ; 73 | } 74 | 75 | #endif // ZULUMOUNTTASK_H 76 | -------------------------------------------------------------------------------- /zuluPolkit/main.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright ( c ) 2017 4 | * name : Francis Banyikwa 5 | * email: mhogomchungu@gmail.com 6 | * This program is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 2 of the License, or 9 | * ( at your option ) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program. If not, see . 18 | */ 19 | 20 | #include 21 | #include 22 | #include 23 | 24 | #include "zulupolkit.h" 25 | 26 | int main( int argc,char * argv[] ) 27 | { 28 | QCoreApplication a( argc,argv ) ; 29 | 30 | auto s = QCoreApplication::arguments() ; 31 | 32 | if( s.last().startsWith( "fork" ) ){ 33 | 34 | s.removeLast() ; 35 | 36 | auto exe = s.first() ; 37 | 38 | s.removeFirst() ; 39 | 40 | if( QProcess::startDetached( exe,s ) ){ 41 | 42 | return 0 ; 43 | }else{ 44 | return 1 ; 45 | } 46 | }else{ 47 | zuluPolkit e( s ) ; 48 | 49 | QMetaObject::invokeMethod( &e,"start",Qt::QueuedConnection ) ; 50 | 51 | return a.exec(); 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /zuluPolkit/zulupolkit.h: -------------------------------------------------------------------------------- 1 | #ifndef ZULUPOLKIT_H 2 | #define ZULUPOLKIT_H 3 | 4 | /* 5 | * 6 | * Copyright ( c ) 2017 7 | * name : Francis Banyikwa 8 | * email: mhogomchungu@gmail.com 9 | * This program is free software: you can redistribute it and/or modify 10 | * it under the terms of the GNU General Public License as published by 11 | * the Free Software Foundation, either version 2 of the License, or 12 | * ( at your option ) any later version. 13 | * 14 | * This program is distributed in the hope that it will be useful, 15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 | * GNU General Public License for more details. 18 | * 19 | * You should have received a copy of the GNU General Public License 20 | * along with this program. If not, see . 21 | */ 22 | 23 | #include 24 | #include 25 | #include 26 | #include 27 | #include 28 | 29 | class zuluPolkit : public QObject 30 | { 31 | Q_OBJECT 32 | public: 33 | zuluPolkit( const QStringList& ) ; 34 | ~zuluPolkit() ; 35 | private slots: 36 | void start() ; 37 | void gotConnection() ; 38 | private: 39 | QStringList m_arguments ; 40 | QString readStdin() ; 41 | QString m_cookie ; 42 | QLocalServer m_server ; 43 | QString m_socketPath ; 44 | }; 45 | 46 | #endif // ZULUPOLKIT_H 47 | -------------------------------------------------------------------------------- /zuluSafe-cli.1: -------------------------------------------------------------------------------- 1 | 2 | .TH zuluSafe-cli 1 3 | 4 | .br 5 | .SH NAME 6 | zuluSafe-cli - command line tool that manages encrypted and unencrypted volumes 7 | 8 | .SH DESCRIPTION 9 | This is a simple tool for secure storage of files in a wallet.Added files to the wallet 10 | will be stored in a secured file located at \"~/.config/lxqt/wallets/zuluSafe/YYY.lwt\" where YYY is\n\ 11 | wallet name" 12 | .br 13 | 14 | .SH USAGE 15 | usage: see examples below 16 | 17 | .br 18 | options: 19 | .br 20 | To add a file to a wallet,run : zuluSafe-cli --add 21 | .br 22 | To delete a file in a wallet,run : zuluSafe-cli --delete 23 | .br 24 | To get a file from the wallet,run : zuluSafe-cli --get 25 | .br 26 | To add all files in a folder,run : zuluSafe-cli --add-all 27 | .br 28 | To get a list of files in the wallet,run : zuluSafe-cli --list 29 | .br 30 | To get all files from the wallet,run : zuluSafe-cli --get-all 31 | .br 32 | To get a list of wallets,run : zuluSafe-cli --wallets 33 | .br 34 | 35 | .SH COPYRIGHT 36 | Copyright (c) 2011-2014 37 | .br 38 | name : Francis Banyikwa 39 | .br 40 | email: mhogomchungu@gmail.com 41 | .br 42 | .br 43 | 44 | This program is free software: you can redistribute it and/or modify 45 | it under the terms of the GNU General Public License as published by 46 | the Free Software Foundation, either version 2 of the License, or 47 | (at your option) any later version. 48 | This program is distributed in the hope that it will be useful, 49 | but WITHOUT ANY WARRANTY; without even the implied warranty of 50 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 51 | GNU General Public License for more details. 52 | You should have received a copy of the GNU General Public License 53 | along with this program. If not, see . 54 | .br 55 | 56 | .SH LAST EDIT 57 | Sun Jan 19 14:59:24 EST 2014 58 | -------------------------------------------------------------------------------- /zuluSafe/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | if(${CMAKE_VERSION} VERSION_GREATER "3.26") 2 | cmake_minimum_required(VERSION 3.26.0) 3 | else() 4 | cmake_minimum_required(VERSION 3.0.2) 5 | endif() 6 | 7 | include_directories( ${PROJECT_BINARY_DIR} ) 8 | include_directories( ${PROJECT_SRC_DIR}/zuluSafe ) 9 | 10 | add_executable( zuluSafe-cli zuluSafe.c zuluwallet.c ) 11 | 12 | find_file( GCRYPT_INCLUDE_FILE gcrypt.h ) 13 | 14 | find_library( GCRYPT_LIBRARY gcrypt ) 15 | 16 | if( NOT GCRYPT_INCLUDE_FILE ) 17 | MESSAGE( FATAL_ERROR "could not find gcrypt header file" ) 18 | else() 19 | MESSAGE( STATUS "found gcrypt header file: ${GCRYPT_INCLUDE_FILE}" ) 20 | endif() 21 | 22 | set_target_properties( zuluSafe-cli PROPERTIES COMPILE_FLAGS "-D_FILE_OFFSET_BITS=64 -Wextra -Wall -s -fPIE -pthread -pedantic " ) 23 | set_target_properties( zuluSafe-cli PROPERTIES LINK_FLAGS "-pie" ) 24 | TARGET_LINK_LIBRARIES( zuluSafe-cli "${GCRYPT_LIBRARY}" ) 25 | 26 | install(TARGETS zuluSafe-cli RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE ) 27 | --------------------------------------------------------------------------------