added debugging to extractor. #1399

This commit is contained in:
clinton-hall 2018-12-05 21:28:59 +13:00
commit e2accb9ec2
3 changed files with 184 additions and 180 deletions

View file

@ -1,90 +1,90 @@
7-Zip 7-Zip
~~~~~ ~~~~~
License for use and distribution License for use and distribution
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
7-Zip Copyright (C) 1999-2018 Igor Pavlov. 7-Zip Copyright (C) 1999-2018 Igor Pavlov.
The licenses for files are: The licenses for files are:
1) 7z.dll: 1) 7z.dll:
- The "GNU LGPL" as main license for most of the code - The "GNU LGPL" as main license for most of the code
- The "GNU LGPL" with "unRAR license restriction" for some code - The "GNU LGPL" with "unRAR license restriction" for some code
- The "BSD 3-clause License" for some code - The "BSD 3-clause License" for some code
2) All other files: the "GNU LGPL". 2) All other files: the "GNU LGPL".
Redistributions in binary form must reproduce related license information from this file. Redistributions in binary form must reproduce related license information from this file.
Note: Note:
You can use 7-Zip on any computer, including a computer in a commercial You can use 7-Zip on any computer, including a computer in a commercial
organization. You don't need to register or pay for 7-Zip. organization. You don't need to register or pay for 7-Zip.
GNU LGPL information GNU LGPL information
-------------------- --------------------
This library is free software; you can redistribute it and/or This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version. version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful, This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details. Lesser General Public License for more details.
You can receive a copy of the GNU Lesser General Public License from You can receive a copy of the GNU Lesser General Public License from
http://www.gnu.org/ http://www.gnu.org/
BSD 3-clause License BSD 3-clause License
-------------------- --------------------
The "BSD 3-clause License" is used for the code in 7z.dll that implements LZFSE data decompression. The "BSD 3-clause License" is used for the code in 7z.dll that implements LZFSE data decompression.
That code was derived from the code in the "LZFSE compression library" developed by Apple Inc, That code was derived from the code in the "LZFSE compression library" developed by Apple Inc,
that also uses the "BSD 3-clause License": that also uses the "BSD 3-clause License":
---- ----
Copyright (c) 2015-2016, Apple Inc. All rights reserved. Copyright (c) 2015-2016, Apple Inc. All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer
in the documentation and/or other materials provided with the distribution. in the documentation and/or other materials provided with the distribution.
3. Neither the name of the copyright holder(s) nor the names of any contributors may be used to endorse or promote products derived 3. Neither the name of the copyright holder(s) nor the names of any contributors may be used to endorse or promote products derived
from this software without specific prior written permission. from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
---- ----
unRAR license restriction unRAR license restriction
------------------------- -------------------------
The decompression engine for RAR archives was developed using source The decompression engine for RAR archives was developed using source
code of unRAR program. code of unRAR program.
All copyrights to original unRAR code are owned by Alexander Roshal. All copyrights to original unRAR code are owned by Alexander Roshal.
The license for original unRAR code has the following restriction: The license for original unRAR code has the following restriction:
The unRAR sources cannot be used to re-create the RAR compression algorithm, The unRAR sources cannot be used to re-create the RAR compression algorithm,
which is proprietary. Distribution of modified unRAR sources in separate form which is proprietary. Distribution of modified unRAR sources in separate form
or as a part of other software is permitted, provided that it is clearly or as a part of other software is permitted, provided that it is clearly
stated in the documentation and source comments that the code may stated in the documentation and source comments that the code may
not be used to develop a RAR (WinRAR) compatible archiver. not be used to develop a RAR (WinRAR) compatible archiver.
-- --
Igor Pavlov Igor Pavlov

View file

@ -1,90 +1,90 @@
7-Zip 7-Zip
~~~~~ ~~~~~
License for use and distribution License for use and distribution
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
7-Zip Copyright (C) 1999-2018 Igor Pavlov. 7-Zip Copyright (C) 1999-2018 Igor Pavlov.
The licenses for files are: The licenses for files are:
1) 7z.dll: 1) 7z.dll:
- The "GNU LGPL" as main license for most of the code - The "GNU LGPL" as main license for most of the code
- The "GNU LGPL" with "unRAR license restriction" for some code - The "GNU LGPL" with "unRAR license restriction" for some code
- The "BSD 3-clause License" for some code - The "BSD 3-clause License" for some code
2) All other files: the "GNU LGPL". 2) All other files: the "GNU LGPL".
Redistributions in binary form must reproduce related license information from this file. Redistributions in binary form must reproduce related license information from this file.
Note: Note:
You can use 7-Zip on any computer, including a computer in a commercial You can use 7-Zip on any computer, including a computer in a commercial
organization. You don't need to register or pay for 7-Zip. organization. You don't need to register or pay for 7-Zip.
GNU LGPL information GNU LGPL information
-------------------- --------------------
This library is free software; you can redistribute it and/or This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version. version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful, This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details. Lesser General Public License for more details.
You can receive a copy of the GNU Lesser General Public License from You can receive a copy of the GNU Lesser General Public License from
http://www.gnu.org/ http://www.gnu.org/
BSD 3-clause License BSD 3-clause License
-------------------- --------------------
The "BSD 3-clause License" is used for the code in 7z.dll that implements LZFSE data decompression. The "BSD 3-clause License" is used for the code in 7z.dll that implements LZFSE data decompression.
That code was derived from the code in the "LZFSE compression library" developed by Apple Inc, That code was derived from the code in the "LZFSE compression library" developed by Apple Inc,
that also uses the "BSD 3-clause License": that also uses the "BSD 3-clause License":
---- ----
Copyright (c) 2015-2016, Apple Inc. All rights reserved. Copyright (c) 2015-2016, Apple Inc. All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer
in the documentation and/or other materials provided with the distribution. in the documentation and/or other materials provided with the distribution.
3. Neither the name of the copyright holder(s) nor the names of any contributors may be used to endorse or promote products derived 3. Neither the name of the copyright holder(s) nor the names of any contributors may be used to endorse or promote products derived
from this software without specific prior written permission. from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
---- ----
unRAR license restriction unRAR license restriction
------------------------- -------------------------
The decompression engine for RAR archives was developed using source The decompression engine for RAR archives was developed using source
code of unRAR program. code of unRAR program.
All copyrights to original unRAR code are owned by Alexander Roshal. All copyrights to original unRAR code are owned by Alexander Roshal.
The license for original unRAR code has the following restriction: The license for original unRAR code has the following restriction:
The unRAR sources cannot be used to re-create the RAR compression algorithm, The unRAR sources cannot be used to re-create the RAR compression algorithm,
which is proprietary. Distribution of modified unRAR sources in separate form which is proprietary. Distribution of modified unRAR sources in separate form
or as a part of other software is permitted, provided that it is clearly or as a part of other software is permitted, provided that it is clearly
stated in the documentation and source comments that the code may stated in the documentation and source comments that the code may
not be used to develop a RAR (WinRAR) compatible archiver. not be used to develop a RAR (WinRAR) compatible archiver.
-- --
Igor Pavlov Igor Pavlov

View file

@ -80,6 +80,8 @@ def extract(filePath, outputDestination):
else: else:
if ext[1] in EXTRACT_COMMANDS: if ext[1] in EXTRACT_COMMANDS:
cmd = EXTRACT_COMMANDS[ext[1]] cmd = EXTRACT_COMMANDS[ext[1]]
core.logger.debug("EXTRACTOR: cmd: {cmd} set for file: {file}".format
(cmd=cmd, file=filePath))
else: else:
core.logger.debug("EXTRACTOR: Unknown file type: {ext}".format core.logger.debug("EXTRACTOR: Unknown file type: {ext}".format
(ext=ext[1])) (ext=ext[1]))
@ -87,6 +89,8 @@ def extract(filePath, outputDestination):
# Create outputDestination folder # Create outputDestination folder
core.makeDir(outputDestination) core.makeDir(outputDestination)
core.logger.debug("EXTRACTOR: output folder: {folder} exists".format
(folder=outputDestination))
if core.PASSWORDSFILE != "" and os.path.isfile(os.path.normpath(core.PASSWORDSFILE)): if core.PASSWORDSFILE != "" and os.path.isfile(os.path.normpath(core.PASSWORDSFILE)):
passwords = [line.strip() for line in open(os.path.normpath(core.PASSWORDSFILE))] passwords = [line.strip() for line in open(os.path.normpath(core.PASSWORDSFILE))]