Compare commits

...

320 Commits

Author SHA1 Message Date
Matt Nadareski
4807520169 This doesn't need private set 2026-01-30 22:32:44 -05:00
Matt Nadareski
91da3068b6 Clean up now-empty region 2026-01-30 22:31:25 -05:00
Matt Nadareski
c9316651c5 Use auto properties for static check lists 2026-01-30 22:30:59 -05:00
Matt Nadareski
2b3917a1ee These can't be null anymore 2026-01-30 22:15:34 -05:00
Matt Nadareski
efef8d494e More cleanup 2026-01-27 09:30:58 -05:00
Matt Nadareski
6c1efccb00 Fix incorrect formatting issue 2026-01-25 17:30:54 -05:00
Matt Nadareski
0d2f81773d Add editorconfig, fix issues 2026-01-25 17:27:42 -05:00
Morlit55
7058c7a150 More info on Dinamic Multimedia Protection (#404)
* More info on Dinamic Multimedia Protection

Added comments regarding related DRM and patents for Dinamic Multimedia Protection.

* Removed MPO references

MPO ring protection has since been proven to be unrelated.
2026-01-23 11:54:59 -05:00
HeroponRikiBestest
417c1f8208 Fix scanning for Solidshield 3.0.0.0 DLLs. (#403)
* Fix scanning for Solidshield 3.0.0.0 DLLs.

* Add curly braces for multiline if
2026-01-10 16:10:58 -05:00
HeroponRikiBestest
82fc850b57 minor starforce fix (#402)
* minor starforce fix

* combine regex checks
2025-12-29 22:58:12 -05:00
HeroponRikiBestest
973b0118b6 Fix minor nested json issue (#398) 2025-12-02 12:15:39 -05:00
HeroponRikiBestest
c2368661cb Fix oversight where Scanner.cs won't scan for files if an archive extracts to one or more directories (#397)
* Scanner.cs won't scan for files if an archive extracts to a directory

* use fsentries
2025-11-29 14:48:47 -05:00
Matt Nadareski
05bddd6005 Bump version 2025-11-25 08:40:36 -05:00
Matt Nadareski
777232301d Update Serialization to 2.2.1 2025-11-25 07:56:38 -05:00
Matt Nadareski
41a705c343 Add support for .NET 10 2025-11-24 11:57:17 -05:00
HeroponRikiBestest
805beb3418 Improve starforce keyless detection (#396) 2025-11-17 22:00:44 -05:00
HeroponRikiBestest
cc7592e07a consistent alpharom stylization (#395)
I forgot that Alpha-ROM is stylized with a dash. Mainly PRing so it'll also be consistent with how it already is on redump.
2025-11-17 12:29:26 -05:00
HeroponRikiBestest
41ad8adf6e Small TAGES and AlphaROM improvements (#394)
* Small improvement to early TAGES detection to eliminate small handful of false positives. Also threw in a note about alpharom

* Improve alpharom handling

* Initial round of fixes
2025-11-16 15:55:32 -05:00
HeroponRikiBestest
201badd434 Update RC dictionary name now that one of the entries is in redump (#393) 2025-11-14 07:28:46 -05:00
Matt Nadareski
f58003b3fc Ensure JSON added to help print 2025-11-13 13:59:25 -05:00
Matt Nadareski
ff8976a67a Restore warning not as error 2025-11-10 13:09:49 -05:00
Matt Nadareski
dc968c2d15 Bump version 2025-11-10 13:07:37 -05:00
Matt Nadareski
3726abb209 Cleanup 2025-11-10 12:57:08 -05:00
HeroponRikiBestest
ac8dfb833c Fixes last minute issue with json parsing (#392)
* fix

* add comment back

* slight simplification

* Remove newline

* Remove newline

* Fix
2025-11-10 12:45:56 -05:00
Matt Nadareski
f0673046dc Minor cleanup from last commit 2025-11-10 09:53:53 -05:00
Matt Nadareski
d9fa073c0f Minor cleanup from last commit 2025-11-10 09:53:25 -05:00
HeroponRikiBestest
95a20fb30d Add nested json output for protectionscan (#391)
* Attempt nested for real this time

* forgot to include handling the base path

* Reverted unnecesssary changes

* Remove unneeded net6.0 gating

* Add comments

* Finish comments

* Might as well safeguard if no protections are returned.

* Use object instead of dynamic

* Remove weird empty string root node handling

* remove uneeded ref

* Modify comment accordingly

* Merge regular and nested json writing

* Simplify object value checking

* change flag handling

Co-authored-by: Matt Nadareski <mnadareski@outlook.com>

* Initial fixes

* Invert if-else to de-nest main logic

* minor formatting fixes

* Improved Json output

* Remove unnecessary comments

* That's just a string

* Slight improvement

* Simplify casting

* attept further simplification

* Further

* Reduce nesting using inversion and continue

* Further simplified logic

* Replace my code with sabre's

* De-nest using continue

* newline

* Remove all instances where it can end in a directory seperator

---------

Co-authored-by: Matt Nadareski <mnadareski@outlook.com>
2025-11-10 09:48:22 -05:00
Matt Nadareski
dd1e49662f Cleanup 2025-11-07 22:14:28 -05:00
HeroponRikiBestest
78947616b1 Add json output for protectionscan (#390)
* actual first pr

* Initial fixes

* Second round of fixes

* Final fix
2025-11-07 22:07:08 -05:00
Matt Nadareski
ba56b9aff6 Add file-only flag for scans 2025-11-07 10:51:02 -05:00
Matt Nadareski
3b287c6f7b Mid 2025-11-07 09:46:34 -05:00
Matt Nadareski
dcdf0bcf40 Automatic cleanup 2025-11-07 08:24:22 -05:00
Matt Nadareski
d2eebd0f00 Cleanup 2025-11-07 07:40:33 -05:00
HeroponRikiBestest
a281e8325e Initial ISO Protection Detection (#389)
* Initial

* Laserlock in

* This is a better way to read the string

* That array copy wasn't needed either

* Use static filetype method, rename filetype.iso

* Initial Codelok ISO scanning

* Comments with redump IDs

* Add redump examples to laserlock

* Change for testing

* Small comment

* TAGES

* halfway through safedisc

* Safedisc done

* Fix 1

* Major oversights in puredata fixed

* Finish SecuROM

* ProtectDiSC done

* Alpharom done

* Finish StarForce, initial PR review ready

* Wait, that would be really bad

* One more for the road.

* Small finding

* Small fix for finding

* Notes on finding

* Several minor fixes, decisions

* what do you MEAN it returns true if there are no elements in the array

* Future todo

* Update packages

* Rebase

* Fix runisochecks

* First round of fixes

* Second round of fixes

* Tests attempt 1

* Make checks work

* Individual test attempt 1

* Final tests

---------

Co-authored-by: Matt Nadareski <mnadareski@outlook.com>
2025-11-07 07:22:28 -05:00
Matt Nadareski
9f5b292035 Fix MPQ note 2025-11-06 21:05:55 -05:00
Matt Nadareski
466689dcbc Clean up holdover logic 2025-11-06 13:43:49 -05:00
Matt Nadareski
5b0bf2e7e4 Update packages 2025-11-06 08:22:09 -05:00
Matt Nadareski
cc8dfb8478 Update rolling tag 2025-10-26 20:29:55 -04:00
Matt Nadareski
82412fce9a Add more ProtectCD/DVD checks (fixes #387) 2025-10-21 14:06:09 -04:00
HeroponRikiBestest
1a67decd7b Minor Release Control update (#386)
* Minor Release Control update

Added russian Gothic 4, updated international gothic 4 now that a redump entry exists, noted 2 other versions known to exist.

* Minor comment formatting
2025-10-16 19:58:48 -04:00
Matt Nadareski
f1afb6d60b Bump version 2025-10-07 16:00:04 -04:00
Matt Nadareski
5e812daf01 Fix debug flag use 2025-10-07 14:56:53 -04:00
Matt Nadareski
ab508eebe8 Use main feature pattern 2025-10-07 13:44:27 -04:00
Matt Nadareski
31792fab48 Update packages 2025-10-07 13:33:55 -04:00
Matt Nadareski
010f792b1a Add minor identifier for NSIS 2025-10-07 09:45:50 -04:00
Matt Nadareski
a3118cee68 Use CommandLine library for executable 2025-10-06 09:43:15 -04:00
Matt Nadareski
daa72eb970 Bump version 2025-10-05 17:32:27 -04:00
Matt Nadareski
a42328ef60 Update Serialization to 2.0.1 2025-10-05 17:26:01 -04:00
Matt Nadareski
7f2dd26d9b Require exact versions for build 2025-09-30 11:12:41 -04:00
Matt Nadareski
871ac97a3a Bump version 2025-09-29 14:18:10 -04:00
Matt Nadareski
5e11048e18 Remove compiler flags that weren't working 2025-09-29 12:44:52 -04:00
Matt Nadareski
19e696bf15 Use an assumption to help trim for now 2025-09-29 08:33:33 -04:00
Matt Nadareski
ddf8c393df Use AddD reader instead of manual 2025-09-29 08:29:30 -04:00
Matt Nadareski
d234549099 Use constant for AddD 2025-09-29 08:26:37 -04:00
Matt Nadareski
5899dd99f3 Reduce AddD search window 2025-09-29 08:24:08 -04:00
Matt Nadareski
f50f9f741d Update Serialization to 2.0.0 2025-09-29 08:01:50 -04:00
Matt Nadareski
09f5b28de7 More Clickteam notes 2025-09-27 21:34:11 -04:00
Matt Nadareski
f71a007b35 Add notes about Clickteam 2025-09-27 21:02:08 -04:00
Matt Nadareski
d6a89c8905 Partially revert and clarify 2025-09-26 21:45:01 -04:00
Matt Nadareski
1b4f363b08 Couple of PECompact things 2025-09-26 21:41:15 -04:00
Matt Nadareski
8abdaa4218 Add a couple more NSIS notes 2025-09-26 21:35:33 -04:00
Matt Nadareski
454bfa9f4f Check overlay for NSIS 2025-09-26 21:31:59 -04:00
Matt Nadareski
8534cda9c5 Add comment for NSIS 2025-09-26 21:28:37 -04:00
Matt Nadareski
b285127cee Intel Installation Framework is extractable 2025-09-26 21:24:47 -04:00
Matt Nadareski
8a6179ea11 Add newly found Shrinker section name 2025-09-26 20:59:19 -04:00
Matt Nadareski
d07e46c5f7 Add a Gentee note 2025-09-26 20:54:59 -04:00
Matt Nadareski
ee5ed5e833 Add some notes about EXECryptor 2025-09-26 20:51:29 -04:00
Matt Nadareski
7fcdfce152 Add notes about ApecSoft 2025-09-26 20:39:22 -04:00
Matt Nadareski
f1d7ee89cb Remove TODO 2025-09-26 20:05:58 -04:00
Matt Nadareski
1765e4da16 Clean up remarks, add SFX trailing name 2025-09-26 08:35:25 -04:00
Matt Nadareski
2a7455252e Add more Advanced Installer notes 2025-09-25 21:53:19 -04:00
Matt Nadareski
057ce3c4cc Add more Advanced Installer notes 2025-09-25 21:44:08 -04:00
Matt Nadareski
7e7d166ed8 Add note for Advanced Installer 2025-09-25 21:02:54 -04:00
Matt Nadareski
0872e0ff49 Bump version 2025-09-24 13:07:03 -04:00
Matt Nadareski
c0a590db63 Use package-provided IProgress to avoid conflict 2025-09-24 13:06:27 -04:00
Matt Nadareski
50b4eb99e3 Bump version 2025-09-24 12:38:01 -04:00
Matt Nadareski
08a90d52a8 Update packages 2025-09-24 12:14:31 -04:00
Matt Nadareski
d41cd63ad7 Use "proper" namespace since it's public 2025-09-22 21:05:39 -04:00
Matt Nadareski
c12d3fbe15 Progress doesn't need to be hindered 2025-09-22 21:04:17 -04:00
Matt Nadareski
4db1c57830 Internalize Func for .NET Framework 2.0 2025-09-22 21:01:23 -04:00
Matt Nadareski
1e1da59ba0 Bump verison 2025-09-22 09:36:40 -04:00
Matt Nadareski
4a94c80ec1 Move constructor closer to use 2025-09-22 08:58:43 -04:00
Matt Nadareski
cb4c4cb3fb Make exception handling less broad 2025-09-22 08:56:58 -04:00
Matt Nadareski
8008705366 Move BurnOut reference to Special Thanks 2025-09-21 19:01:27 -04:00
Matt Nadareski
20888a22db Unify file endings again 2025-09-21 19:00:36 -04:00
Matt Nadareski
b06512e292 Slight documentation cleanup 2025-09-21 18:59:29 -04:00
Matt Nadareski
18ce24400a Unify file endings again 2025-09-21 18:55:55 -04:00
Matt Nadareski
31d85360e9 These shoutouts have been replaced by references in Models 2025-09-21 17:49:15 -04:00
Matt Nadareski
53c8ec1dcf Whitespace and usings cleanup 2025-09-21 15:30:18 -04:00
Matt Nadareski
c68f126210 How did all of this whitespace slip through? 2025-09-21 15:13:23 -04:00
Matt Nadareski
03016f3399 Try 16 2025-09-21 14:27:35 -04:00
Matt Nadareski
778064b3a5 Remove now-duplicated extensions 2025-09-21 13:32:45 -04:00
Matt Nadareski
4ed619ee30 Update Serialization to 1.9.5 2025-09-21 12:54:25 -04:00
Matt Nadareski
df52d08406 Update readme, remove unused cases 2025-09-21 10:33:32 -04:00
Matt Nadareski
66d48ed1cd Inlclude Serialization directly in ProtectionScan 2025-09-21 10:05:07 -04:00
Matt Nadareski
79680135b7 Update Serialization to 1.9.4 2025-09-21 09:46:47 -04:00
Matt Nadareski
84b9b46744 Set these properties because MPQ is funny like that 2025-09-21 09:39:55 -04:00
Matt Nadareski
33e83b9f52 Try this 2025-09-20 23:24:37 -04:00
Matt Nadareski
57759a3bef Update packages 2025-09-20 22:47:30 -04:00
Matt Nadareski
9caa91736c Add notes to relevant places about entry point 2025-09-20 20:29:57 -04:00
HeroponRikiBestest
3ffbeddcbe Add versioning to FrontLine ProActive (#385)
* Fix version

* sf
2025-09-20 20:00:55 -04:00
Matt Nadareski
6a5afd8d2c Another round of cleanup and normalization 2025-09-20 19:18:08 -04:00
Matt Nadareski
0afd189fe0 Align ContainsSection checks 2025-09-20 18:55:05 -04:00
Matt Nadareski
cc87d44e3f Make packer and protection code more consistent 2025-09-20 18:41:58 -04:00
Matt Nadareski
981a5bb7b5 Introduce OptionalEndsWith 2025-09-20 18:03:09 -04:00
Matt Nadareski
4afea551ba Make packers code more consistent 2025-09-20 17:59:20 -04:00
Matt Nadareski
5f9f21ae14 Replace things that are marked for replacement 2025-09-20 17:48:51 -04:00
Matt Nadareski
4c4c72fd98 Only check one section at a time in RenderWare 2025-09-20 17:42:01 -04:00
Matt Nadareski
821a853975 Use IO extensions where appropriate 2025-09-20 17:40:03 -04:00
Matt Nadareski
34a3050e27 None of this needs to account for nulls 2025-09-20 17:37:59 -04:00
Matt Nadareski
5c1a1364a1 Minor addition of usings 2025-09-20 17:35:31 -04:00
HeroponRikiBestest
d1f1c1f728 Process some extra securom DLLs, PA versioning (#384)
* Process a few extra securom things

* Forgot to remove copy paste

* move out of helper
2025-09-20 17:31:29 -04:00
Matt Nadareski
d969dd691b Remove some unnecessary null handling, use arrays 2025-09-20 17:24:25 -04:00
Matt Nadareski
13e4d86135 Remove one now-invalid NoWarn 2025-09-20 17:18:48 -04:00
Matt Nadareski
d37b400566 These are no longer needed 2025-09-20 17:17:27 -04:00
Matt Nadareski
da4188a49b One more early return 2025-09-20 16:56:41 -04:00
Matt Nadareski
a85998ebf6 Filter out invalid types first 2025-09-20 16:55:54 -04:00
Matt Nadareski
bd934c0af3 Formatting change to match current standards 2025-09-20 16:51:03 -04:00
Matt Nadareski
14dae3dd73 Rearrange code to be safer and more efficient 2025-09-20 16:50:41 -04:00
Matt Nadareski
80cd7dffdb Put these in a region 2025-09-20 16:45:06 -04:00
Matt Nadareski
a0bbd0be32 Tests should care about how many there are 2025-09-20 16:44:09 -04:00
Matt Nadareski
3bd9eadfe2 Add note that most extensions are going away 2025-09-20 16:28:11 -04:00
Matt Nadareski
c537f9dac9 Non-depth constructor unneeded now 2025-09-20 16:24:21 -04:00
Matt Nadareski
64b65b0f59 Initial checkpoint should use depth too 2025-09-20 16:23:59 -04:00
Matt Nadareski
36c858fac1 A couple more debug places to avoid confusion 2025-09-20 16:23:04 -04:00
Matt Nadareski
30361a9af7 This should never have to clear anything 2025-09-20 16:21:12 -04:00
Matt Nadareski
d6708a0cbe Scan even partial extractions, simplify branches 2025-09-20 16:20:17 -04:00
Matt Nadareski
9639f40e55 No reason for these to use inline null checks 2025-09-20 16:15:54 -04:00
Matt Nadareski
7fa41ba945 Revert extra check, forgot about un-wrappered types 2025-09-20 16:13:45 -04:00
Matt Nadareski
e1a659af5f Simplify double assignment 2025-09-20 16:12:21 -04:00
Matt Nadareski
bca5ec48d5 Exit early on invalid wrappers 2025-09-20 16:03:36 -04:00
Matt Nadareski
303fa314e6 Formatting faux pas 2025-09-20 16:01:58 -04:00
Matt Nadareski
cbcc11547c This should have a debug statement too 2025-09-20 16:01:44 -04:00
Matt Nadareski
10286e8380 Use extension for slightly easier reading 2025-09-20 16:00:54 -04:00
Matt Nadareski
a4ddc014ee Better debug logging 2025-09-20 16:00:03 -04:00
Matt Nadareski
61d186cae3 Slight tweak to logic direction and formatting 2025-09-20 15:58:52 -04:00
Matt Nadareski
799489d079 Reduce unnecessary code separation 2025-09-20 15:29:13 -04:00
Matt Nadareski
9eb74a411c SecuROM cleanup 2025-09-20 14:27:28 -04:00
HeroponRikiBestest
f263781250 Add Matroschka processing (#381)
* Make matroschka changes

* Catch some nullable values

* Use var more

* Trim path until models update

* Improve hashing string implementation.

* Change file reading

* change to keep up with serialization

* First round of fixes.

* Reverted to TryGetValue

* Small formatting fixes

* change to packageType

* Fixed glaring oversight on my part

* ungate full output

* *grumble grumble*
2025-09-20 14:22:00 -04:00
Matt Nadareski
6e7ef785ff Fix tests 2025-09-20 11:05:56 -04:00
Matt Nadareski
aef4495168 Update Serialization to 1.9.2 2025-09-20 11:00:09 -04:00
Matt Nadareski
2c0885383e Bound overlay checking in GetV4Version 2025-09-19 11:35:36 -04:00
Matt Nadareski
04355d851a Add SafeDisc 1.35.000 remnants hashes 2025-09-18 13:11:05 -04:00
Matt Nadareski
2cc72e2059 Add a couple ActiveMark notes 2025-09-08 20:10:29 -04:00
Matt Nadareski
6f61ee19b1 Add embedded gzip detection 2025-09-08 20:10:20 -04:00
Matt Nadareski
7784e0cfef Add Zylom Wrapper detection 2025-09-08 19:38:53 -04:00
Matt Nadareski
a55e490e73 Add Reflexive Arcade path checks 2025-09-08 18:46:26 -04:00
Matt Nadareski
d316edf8d0 Be smarter about SecuROM v4 2025-09-08 18:38:12 -04:00
Matt Nadareski
9af871c0ff Search for AddD header in SecuROM 2025-09-08 18:35:21 -04:00
Matt Nadareski
6cb86512c3 Organize StarForce, get rid of all Model calls 2025-09-08 17:58:48 -04:00
Matt Nadareski
d6a3a37d49 Add investigation notes about weird SF version 2025-09-08 17:51:43 -04:00
Matt Nadareski
281e7b419a Fix SF comment 2025-09-08 17:45:20 -04:00
Matt Nadareski
fd6de0d10c Add yuPlay Launcher detection 2025-09-08 17:11:06 -04:00
Matt Nadareski
760434309b Add StarForce Crypto detection (fixes #338) 2025-09-08 17:05:16 -04:00
HeroponRikiBestest
11034a7a7c Move PA Module detection into its own helper method. (#379)
* Move PA Module detection into its own helper method.

* Fix review changes.
2025-09-08 14:57:41 -04:00
HeroponRikiBestest
a76a8d0839 Add check for modified securom product activation. (#372)
* Added check for modified securom product activation. Marked as draft because it relies on a recent infotool fix in order to function properly.

* Fix variable name change post-rebase.

* Use wrapper exporttable, remove unneeded dependancies.
2025-09-08 12:07:43 -04:00
Matt Nadareski
de35586f30 Fix this because I didn't 2025-09-08 11:51:01 -04:00
Matt Nadareski
d29dec3904 Return all detected embedded types 2025-09-08 09:25:45 -04:00
Matt Nadareski
d8b0588d6e Add embedded UHA support 2025-09-08 09:14:22 -04:00
Matt Nadareski
5c7ea889be Add Reflexive Arcade Installer detection (fixes #102) 2025-09-08 08:44:18 -04:00
Matt Nadareski
846000cb3f Include BZip2 and XZ in embedded file checks 2025-09-08 08:30:18 -04:00
Matt Nadareski
d1398791f5 Add Ghost Installer detection (fixes #103) 2025-09-08 08:27:40 -04:00
Matt Nadareski
999c5c473e Fix a couple of formatting inconsistencies 2025-09-08 07:55:13 -04:00
Matt Nadareski
6e334c8770 Add Smart Install Maker detection (fixes #101) 2025-09-08 07:27:26 -04:00
Matt Nadareski
42dd33c8bd Add Create Install 2003 detection, add resource checks (fixes #96) 2025-09-07 21:17:37 -04:00
Matt Nadareski
4420021cbe Add Gentee note 2025-09-07 21:08:17 -04:00
Matt Nadareski
d8049792f1 Add Spoon Installer detection (fixes #98) 2025-09-07 21:07:00 -04:00
Matt Nadareski
86c4639d52 Minor cleanup 2025-09-07 13:04:30 -04:00
Matt Nadareski
abfcc52fd2 Tweak a couple more Uniloc 2025-09-07 12:44:04 -04:00
Matt Nadareski
06f84db092 Add a couple more Uniloc filenames 2025-09-07 12:39:06 -04:00
Matt Nadareski
ef03ca3a03 Undo launch change 2025-09-07 12:36:49 -04:00
Matt Nadareski
28783c83cf Add Hudson huPPPX detection 2025-09-07 12:36:37 -04:00
Matt Nadareski
e497540bdc Add Ubisoft Orbit detection (fixes #316) 2025-09-07 11:41:57 -04:00
Matt Nadareski
7b8c006f4d Add MPRESS detection (fixes #206) 2025-09-07 11:37:09 -04:00
Matt Nadareski
4b697c7d20 Fix inconsistency in interface implementations 2025-09-07 11:15:26 -04:00
Matt Nadareski
bef5749b5e Add PKLITE32 detection (fixes #100) 2025-09-07 11:09:43 -04:00
Matt Nadareski
0d371d0f3c Add GP-Install detection (fixes #99) 2025-09-07 11:04:28 -04:00
Matt Nadareski
fa67d370c0 Add GkWare SFX detection (fixes #97) 2025-09-07 11:00:55 -04:00
Matt Nadareski
a89124883c Add Uniloc SoftAnchor detection (fixes #85) 2025-09-07 10:34:33 -04:00
Matt Nadareski
2690536fda Remove now-unused .gitmodules 2025-09-06 20:15:43 -04:00
Matt Nadareski
8e8c43e304 I like this better 2025-09-06 17:13:59 -04:00
Matt Nadareski
edc32af47c Slight tweak to wording 2025-09-06 17:11:54 -04:00
Matt Nadareski
57685f0682 Protected readonly makes way more sense 2025-09-06 15:49:45 -04:00
Matt Nadareski
dd7f120ddc Add .NET Standard 2.x to builds 2025-09-06 15:38:36 -04:00
Matt Nadareski
16ca7e7920 None of this needs to be public 2025-09-06 15:20:59 -04:00
Matt Nadareski
397294ac63 Remove now-unused compatibility item 2025-09-06 15:18:27 -04:00
Matt Nadareski
1afbd2d484 Options object no longer makes sense 2025-09-06 15:17:33 -04:00
Matt Nadareski
7d39a6165e Take advantage of Impl and make depth incremental 2025-09-06 15:12:51 -04:00
Matt Nadareski
785f5cfde1 Don't expose ProtectionDictionary anymore 2025-09-06 12:55:09 -04:00
Matt Nadareski
f5b1868eec Move some things around 2025-09-06 12:40:06 -04:00
Matt Nadareski
8fedbb8f77 Remove extractable interfaces to avoid conflicts 2025-09-06 12:32:21 -04:00
Matt Nadareski
9af64f23a5 Make AACS a bit easier to follow 2025-09-06 12:20:39 -04:00
Matt Nadareski
3558ceb890 Missed one NE 2025-09-06 11:59:10 -04:00
Matt Nadareski
bd1166cbab Undo the wrapped NE issues 2025-09-06 11:58:04 -04:00
Matt Nadareski
6361398b1b Use extractable wrappers where appropriate 2025-09-06 11:56:46 -04:00
Matt Nadareski
e87a0ff8ec Wrapper-based extractables are now thinner 2025-09-06 11:48:32 -04:00
Matt Nadareski
00db772594 Simplify using new base class 2025-09-06 11:35:37 -04:00
Matt Nadareski
8043201be7 Introduce typed IExtractable 2025-09-06 11:05:47 -04:00
Matt Nadareski
3a5e7004a3 Don't reopen the stream unnecessarily 2025-09-06 10:58:46 -04:00
Matt Nadareski
168231cc94 Don't reinvent the wheel 2025-09-06 10:56:36 -04:00
Matt Nadareski
a11c7dc9d5 Fix tests for file types with default values 2025-09-06 10:51:00 -04:00
Matt Nadareski
038910b744 Remove now-incorrect things from the factory 2025-09-06 10:48:11 -04:00
Matt Nadareski
4d85ba2d31 Only some executables are extractable 2025-09-06 10:46:57 -04:00
Matt Nadareski
46feb3e568 Create wrapper-centric methods 2025-09-06 10:40:26 -04:00
Matt Nadareski
821b91a555 Start making Detectable a bit better 2025-09-06 10:01:09 -04:00
Matt Nadareski
43b3c72a02 Start rearranging things 2025-09-06 09:53:34 -04:00
Matt Nadareski
e9c1e9b7e7 Make these private static 2025-09-06 09:03:35 -04:00
Matt Nadareski
6ea98f5dc4 Consolidate detectable Executable checks 2025-09-06 09:03:05 -04:00
Matt Nadareski
5ef9c4cd8a Remove temporary code 2025-09-06 08:58:35 -04:00
Matt Nadareski
2597575500 Update Nuget packages 2025-09-06 08:49:21 -04:00
Matt Nadareski
523e670cc5 ONE MORE TIME 2025-09-03 11:24:21 -04:00
Matt Nadareski
ed6d3c1f3e NewExecutable is just a magnet for issues 2025-09-03 11:12:36 -04:00
Matt Nadareski
0efc6aef10 This can fail? 2025-09-03 10:51:29 -04:00
Matt Nadareski
b1600ad7d2 Make ReadArbitraryRange safer to handle 2025-09-03 10:41:53 -04:00
Matt Nadareski
6904674785 Temporarily migrate more code 2025-09-03 09:33:44 -04:00
Matt Nadareski
6da9e9c931 Use direct assignment 2025-09-03 09:04:21 -04:00
Matt Nadareski
b4a94cf247 Limit strings to 16KiB 2025-09-03 08:58:48 -04:00
Matt Nadareski
f81e46670a Remove UTF-8 strings from check 2025-09-03 08:42:22 -04:00
Matt Nadareski
cc7040c3cb That were dumb 2025-09-03 08:35:41 -04:00
Matt Nadareski
c70f0d72d2 Downstream potential fixes for testing 2025-09-03 08:35:19 -04:00
Matt Nadareski
d2ed0a822a Clean up configuration files 2025-09-03 08:35:04 -04:00
Matt Nadareski
e21a6e78d7 Smarter executable scanning, maybe 2025-09-02 22:18:42 -04:00
Matt Nadareski
138842318a Let's try to be fancy 2025-09-02 22:04:02 -04:00
Matt Nadareski
e883f0c7d4 Different visual indicator of extracted file scans 2025-09-02 21:52:06 -04:00
Matt Nadareski
03f96238a5 Clean up a couple things that might cause issues? 2025-09-02 21:38:51 -04:00
Matt Nadareski
60cd67e22e Fix executable test 2025-09-02 20:31:30 -04:00
Matt Nadareski
c0e82fa021 Handle extractable executables properly 2025-09-02 20:28:38 -04:00
Matt Nadareski
cc826fdc60 Fix all broken tests from previous update 2025-09-02 20:21:53 -04:00
Matt Nadareski
77ad6e791a The update 2025-09-02 20:18:01 -04:00
Matt Nadareski
55e368e23a Remove ExtractionTool and all references 2025-08-29 14:05:07 -04:00
Matt Nadareski
a82d1e729c Remove vestigial content files 2025-08-28 14:50:23 -04:00
Matt Nadareski
5958dac739 Remove commented code 2025-08-26 06:56:11 -04:00
Matt Nadareski
29bd888052 Order of operations 2025-08-26 06:53:08 -04:00
Matt Nadareski
1b2c62da9a Use file part count, not partial files 2025-08-26 06:41:07 -04:00
Matt Nadareski
c95890aae5 Handle archive parts 2025-08-25 22:20:19 -04:00
Matt Nadareski
58022ec328 Fix MPQ on x64, notes 2025-08-25 21:26:33 -04:00
Matt Nadareski
692da62dee Remove libmspack4n submodule 2025-08-25 20:39:18 -04:00
Matt Nadareski
91aea728ac Weird note, checks out 2025-08-25 13:54:47 -04:00
Matt Nadareski
c408f349fe Add notes about migrated code 2025-08-25 13:50:15 -04:00
Matt Nadareski
de85426f04 Remove restriction from RAR 2025-08-25 13:25:11 -04:00
Matt Nadareski
43649851ca Downstream changes from Serialization for now 2025-08-25 13:24:22 -04:00
Matt Nadareski
9b49f7c597 Add note about upcoming changes 2025-08-23 11:35:27 -04:00
Matt Nadareski
0f186634f2 See which extractors need BOS file types 2025-08-23 11:32:55 -04:00
Matt Nadareski
e24172245e Wise can be NE too 2025-08-23 10:56:50 -04:00
Matt Nadareski
5e40c7a37e Func-y 2025-07-31 14:28:12 -04:00
Matt Nadareski
0bf1be23c4 Remove MinAsyncBridge requirement 2025-07-31 14:21:34 -04:00
Matt Nadareski
06e51247e1 Remove Net35.Actions requirement 2025-07-31 14:15:40 -04:00
Matt Nadareski
251bf9ca6d Order is important 2025-07-31 12:48:48 -04:00
Matt Nadareski
fe5f114290 General cleanup 2025-07-31 12:45:07 -04:00
Matt Nadareski
8f2d20dcfa Fix reference to PE TradeName 2025-07-31 09:26:12 -04:00
Matt Nadareski
8e516f3b6b Sync include debug flag for CFB extraction 2025-07-31 09:19:40 -04:00
Matt Nadareski
ad449c2e33 Exception debugging should use Error stream 2025-07-31 09:14:21 -04:00
Matt Nadareski
ddbd396b6b Use correct mask for v3 CFB files 2025-07-30 16:56:21 -04:00
Matt Nadareski
b2b9083221 Fix DIFAT assumptions for directory entries 2025-07-30 16:28:43 -04:00
Matt Nadareski
d71cb413fd Fix parsing of large DIFAT tables in CFB 2025-07-30 15:46:22 -04:00
Matt Nadareski
8e745db34e Fix MS-CAB block continuation 2025-07-30 15:18:27 -04:00
Matt Nadareski
93a6ab5b19 Fix spanned blocks, previously skipped 2025-07-30 14:54:38 -04:00
Matt Nadareski
edd990bc89 Wrap MS-ZIP compression in case of failure 2025-07-30 14:21:20 -04:00
Matt Nadareski
fb1310a5a9 Move more things in removal region for CFB 2025-07-30 11:38:36 -04:00
Matt Nadareski
a818a8af0a Fix deserialization issue for CFB 2025-07-30 11:36:10 -04:00
Matt Nadareski
589214ea38 Fix most CFB extraction issues, remove OpenMcdf 2025-07-30 11:30:33 -04:00
Matt Nadareski
892fd945bb Reencode string properly 2025-07-30 08:20:00 -04:00
Matt Nadareski
7a72961ee5 Add removal notes for CFB helpers 2025-07-30 08:11:00 -04:00
Matt Nadareski
b745038829 Update some nuget packages (non-ST) 2025-07-29 21:59:51 -04:00
Matt Nadareski
58b5b5228a Normalize extraction methods 2025-07-29 21:31:35 -04:00
Matt Nadareski
0725f4ba0f Use Serialization implementation of BFPK extraction 2025-07-29 20:35:06 -04:00
Matt Nadareski
6e0063cd1f More graceful handling of MS-CAB sets 2025-07-29 11:48:28 -04:00
Matt Nadareski
78373dd620 Split out MS-ZIP handling for cleaner code 2025-07-29 11:38:30 -04:00
Matt Nadareski
fa74963a75 Only derive the compression type once per folder 2025-07-29 11:26:28 -04:00
Matt Nadareski
7331f8f576 Remove redundant check 2025-07-29 08:30:40 -04:00
Matt Nadareski
6f4e7138fb Split out MS-CAB ExtractFile logic 2025-07-29 08:28:37 -04:00
Matt Nadareski
28b2eaa029 Fix assumption about MS-CAB sets 2025-07-29 08:03:33 -04:00
Matt Nadareski
0585f0a3cb Temproarily port MS-CAB extract code back from Serialization 2025-07-28 21:41:35 -04:00
Matt Nadareski
12e8349ab1 Pad short MS-ZIP blocks 2025-07-28 16:28:13 -04:00
Matt Nadareski
3c05bece9e Better message 2025-07-28 16:14:29 -04:00
Matt Nadareski
dc1944b768 Add tracking for MS-ZIP issues 2025-07-28 16:11:08 -04:00
Matt Nadareski
fd489c5b46 Fix incorrect spacing 2025-07-28 15:24:06 -04:00
Matt Nadareski
7ce4c252e2 Add notes about ported methods 2025-07-28 15:22:47 -04:00
Matt Nadareski
d54c88a01d Don't use MemoryStream.ToArray 2025-07-28 15:16:57 -04:00
Matt Nadareski
6a4d5bddeb Ensure memory streams are scoped in MS-CAB 2025-07-28 15:13:38 -04:00
Matt Nadareski
aca01e2058 Fix(?) Windows-only path for MS-CAB 2025-07-28 14:31:48 -04:00
Matt Nadareski
e93bab29fa Fix output path issues for MS-CAB 2025-07-28 14:26:13 -04:00
Matt Nadareski
ca87c48cd7 Fix issue with determining compression type in MS-CAB 2025-07-28 14:26:03 -04:00
Matt Nadareski
0d215d0817 Enhance GetDataBlocks 2025-07-28 14:04:32 -04:00
Matt Nadareski
d86dbf47b5 Add MS-CAB GetDataBlocks helper 2025-07-28 13:55:07 -04:00
Matt Nadareski
7cb318ce6d Fix build warning 2025-07-28 13:33:47 -04:00
Matt Nadareski
18b89543ef Add MS-CAB OpenNext and OpenPrevious helpers 2025-07-28 13:25:33 -04:00
Matt Nadareski
be50d1343e Add MS-CAB DecompressBlocks helper 2025-07-28 13:18:10 -04:00
Matt Nadareski
32c9ea7838 Add MS-CAB GetFiles helper 2025-07-28 13:14:33 -04:00
Matt Nadareski
cf7a68602b Add MS-CAB GetFolderIndex helper 2025-07-28 13:09:08 -04:00
Matt Nadareski
f2fe2623c6 Add note for MS-CAB 2025-07-28 12:33:11 -04:00
HeroponRikiBestest
249a17be1f Add branching and specific SharpCompress calls for solid vs non-solid archives in order to extract solid archives properly. (#375)
* Add branching for solid vs non-solid archives in order to extract solid archives properly.

* Change comments on sevenzip, reuse archive-level solid flag for rar

* Fully simplify identifying if archive is solid.

* Finish implementing first round of feedback.

* Fix second round of formatting issues.

* Final formatting fixes.
2025-07-11 23:13:00 -04:00
HeroponRikiBestest
dff15ef799 Fixes .hdr+.cab installshield cabinet files not being extracted by BOS when relative paths are provided. (#374)
* Fixes .hdr+.cab installshield cabinet files not being extracted when relative paths are provided.

* Fix for unit tests empty file string.

* Better fix for unit test failures, due to https://learn.microsoft.com/en-us/dotnet/api/system.io.path.getfullpath?view=net-9.0 listing several more exceptions than the other functions, most of which I would not imagine should be directly handled.

* Removed try-catch fullpath obtaining, added getting fullpath in scanner via filestream name instead.

* Undid previous changes again, re-added path assertion at request, added assert.throws exception for empty paths in the unit tests
2025-07-04 14:34:31 -04:00
Matt Nadareski
c0c94fd78d Get full path for each input for programs 2025-06-30 07:28:33 -04:00
HeroponRikiBestest
af43748766 Improve detection for cd/dvd-cops version string (#368)
* Improve detection for cd/dvd-cops version string

* I forgot to include the regex compensation for comma version number cases

* Pasted comment wrong previously

* Implemented Sabre's review fixes, also added check for Codefree
2025-05-13 10:59:39 -04:00
Matt Nadareski
d28d8b5a2b Update Nuget packages 2025-05-12 08:28:02 -04:00
Matt Nadareski
0edc380059 Fix brackets from last commit 2025-05-06 15:53:20 -04:00
HeroponRikiBestest
2311dd9cc8 Add EA Game Authorization Management checking to paul.dll (#366)
* Add EA Game Authorization Management checking to paul.dll

Checks if PA is using EA Game Authorization Management

* Fix if else
2025-05-06 15:51:40 -04:00
HeroponRikiBestest
f87ce49f7e make paul.dll internal name check non-case-sensitive (#365)
* make paul.dll internal name check non-case-sensitive

Sometimes the internal name is in all caps, like http://redump.org/disc/115608/ and http://redump.org/disc/47171/

* Added proper import for ignore case

Forgot it wasn't covered by system.text
2025-05-06 15:22:11 -04:00
HeroponRikiBestest
928e93a7da Fix my own Frontline Proactive sample comment spacing because it was bothering me so much I couldn't go to bed (#363) 2025-04-20 20:36:35 -04:00
HeroponRikiBestest
75517a5f83 Add PACE Anti-Piracy InterLok detection (#362)
* Add detection class and test class for PACE Anti-Piracy Interlok

* Remove unnecessary empty lines after end of class.

* Added missing null check for pex section strings.

* Add newline above getversion

* GetFirstSectionStrings assigned to variable.

* Change getversion in InterLok to use regex.

* Final? getversion regex cleanup
2025-04-19 23:08:49 -04:00
HeroponRikiBestest
cfe9825af7 Add detection for FrontLine ProActive (#361)
* Add detection for FrontLine ProActive

* Wrap samples onto newlines

Wrap samples onto newlines
2025-04-19 22:35:22 -04:00
HeroponRikiBestest
1ff1281c8f Add rcpacker detection (#360)
Some late securom Release Control games call what'd usually be the matrosch section "rcpacker", as in Release Control packer. Not detected at the moment because of this, and given the name, should only refer to Securom Release Control. Games affected by this include all currently dumped in redump versions of FIFA 13 and Mass Effect 3 with Release Control.
2025-03-28 19:50:10 -04:00
TheRogueArchivist
c9194f18ef Begin SafeDisc 4 documentation (#354)
* Begin SafeDisc 4 documentation

Starting off with just 4.00.000 since this needed a bit more groundwork to establish with the AuthServ checks.

* Add SafeDisc 4.00.001

* Add SafeDisc 4.00.002+4.00.003

* Add SafeDisc 4.50.000 notes

* Document SafeDisc 4.60.000-4.80.000

Also add new comment about the unknown version of SecDrv.

* Document SafeDisc 4.81.000

Found a new clcd16 file, which hasn't happened in a long time

* Document SafeDisc 4.85.000 and 4.90.000

Improve some comments and detections for other versions as well.

* Document the remaining SafeDisc 4 versions

Still needs some mild cleanup

* Add SafeDisc 4.91.000 clcd32 hash

* Add SD4/Lite notes
2025-03-25 10:05:04 -04:00
Matt Nadareski
60a3a74862 Fix how conditions are used for references 2025-02-25 21:21:32 -05:00
Matt Nadareski
7a96e8cfe3 Don't crash if writing fails 2025-01-29 11:06:13 -05:00
HeroponRikiBestest
9fee74f2a6 Move Crunch to its own Packer, improve SmartE detection. (#353)
* Move Crunch to its own Packer, improve SmartE detection.

* Fix formatting by removing brackets

Co-authored-by: Matt Nadareski <mnadareski@outlook.com>

* Remove named section checks, minor formatting fixes

* Add newline before summary.

* Remove empty returns.

* Remove unnecessary newline

* Change Crunch to use IExtractableExecutable

* Remove unnecessary whitespace.

* Add tests for Crunch.

---------

Co-authored-by: Matt Nadareski <mnadareski@outlook.com>
2025-01-13 23:17:57 -05:00
HeroponRikiBestest
63a5a25a17 Add missed "Check disc for physical ring" in copy-X return (#352)
Caught by noigeaR, crucial to communicate since some tivola discs have dummy files but no ring (and thus no copy-X), either as remnants, or seemingly as future preparation for copy-X
2025-01-13 10:33:28 -05:00
Matt Nadareski
610078b47c Bump version 2024-12-31 13:25:24 -05:00
Matt Nadareski
ff450a9bcf Update Serialization to 1.8.6 2024-12-30 22:56:12 -05:00
TheRogueArchivist
6661c48428 Don't check files with ".srdata" section for Denuvo (#351)
Prone to too many false positives.
2024-12-30 22:16:55 -05:00
Matt Nadareski
f2a07fc088 Update copyright 2024-12-30 21:41:27 -05:00
Matt Nadareski
e34ea5faca Remove unnecessary action step 2024-12-30 21:40:52 -05:00
Matt Nadareski
11ed09caf2 Update Serialization to 1.8.5 2024-12-30 21:00:53 -05:00
HeroponRikiBestest
f5615d7713 Removed secondary ASPack 1.08.04 check due to false positives. (#350) 2024-12-30 20:32:35 -05:00
Matt Nadareski
2df4144f23 Add new SolidShield activation manager description (fixes #348) 2024-12-29 15:17:35 -05:00
HeroponRikiBestest
5f5dc7d0de Improve Hexalock detection slightly (#347)
* Improve Hexalock detection via checking different known sections for mfint.dll

* Add sabre's suggestion

Improve code with sabre's code suggestion

Co-authored-by: Matt Nadareski <mnadareski@outlook.com>

* Add extra check for instances in UPX executables.

* Add newlines between if blocks.

---------

Co-authored-by: Matt Nadareski <mnadareski@outlook.com>
2024-12-29 14:40:24 -05:00
TheRogueArchivist
d505707dee Add sources for SafeDisc 3 (#346)
Add sources for SafeDisc 3, and add the corresponding clcd32.dll hashes
2024-12-27 07:51:00 -05:00
Matt Nadareski
5e7342477a Ensure .NET versions are installed for testing 2024-12-19 10:54:47 -05:00
Matt Nadareski
35b1bb817e Add flag for SafeGetFiles 2024-12-19 00:02:53 -05:00
392 changed files with 6902 additions and 9580 deletions

167
.editorconfig Normal file
View File

@@ -0,0 +1,167 @@
# top-most EditorConfig file
root = true
# C# files
[*.cs]
# Indentation and spacing
charset = utf-8
indent_size = 4
indent_style = space
tab_width = 4
trim_trailing_whitespace = true
# New line preferences
end_of_line = lf
insert_final_newline = true
max_line_length = unset
# using directive preferences
csharp_using_directive_placement = outside_namespace
dotnet_diagnostic.IDE0005.severity = error
# Code-block preferences
csharp_style_namespace_declarations = block_scoped
csharp_style_prefer_method_group_conversion = true
csharp_style_prefer_top_level_statements = false
# Expression-level preferences
csharp_prefer_simple_default_expression = true
csharp_style_inlined_variable_declaration = true
csharp_style_unused_value_assignment_preference = discard_variable
csharp_style_unused_value_expression_statement_preference = discard_variable
dotnet_diagnostic.IDE0001.severity = warning
dotnet_diagnostic.IDE0002.severity = warning
dotnet_diagnostic.IDE0004.severity = warning
dotnet_diagnostic.IDE0010.severity = error
dotnet_diagnostic.IDE0051.severity = warning
dotnet_diagnostic.IDE0052.severity = warning
dotnet_diagnostic.IDE0072.severity = warning
dotnet_diagnostic.IDE0080.severity = warning
dotnet_diagnostic.IDE0100.severity = error
dotnet_diagnostic.IDE0110.severity = error
dotnet_diagnostic.IDE0120.severity = warning
dotnet_diagnostic.IDE0121.severity = warning
dotnet_diagnostic.IDE0240.severity = error
dotnet_diagnostic.IDE0241.severity = error
dotnet_style_coalesce_expression = true
dotnet_style_namespace_match_folder = false
dotnet_style_null_propagation = true
dotnet_style_prefer_auto_properties = true
dotnet_style_prefer_collection_expression = when_types_loosely_match
dotnet_style_prefer_is_null_check_over_reference_equality_method = true
dotnet_style_prefer_compound_assignment = true
csharp_style_prefer_simple_property_accessors = true
dotnet_style_prefer_simplified_interpolation = true
dotnet_style_prefer_simplified_boolean_expressions = true
csharp_style_prefer_unbound_generic_type_in_nameof = true
# Field preferences
dotnet_diagnostic.IDE0044.severity = warning
dotnet_style_readonly_field = true
# Language keyword vs. framework types preferences
dotnet_diagnostic.IDE0049.severity = error
dotnet_style_predefined_type_for_locals_parameters_members = true
dotnet_style_predefined_type_for_member_access = true
# Modifier preferences
csharp_prefer_static_local_function = true
csharp_style_prefer_readonly_struct = true
dotnet_diagnostic.IDE0036.severity = warning
dotnet_diagnostic.IDE0040.severity = error
dotnet_diagnostic.IDE0380.severity = error
dotnet_style_require_accessibility_modifiers = always
# New-line preferences
dotnet_diagnostic.IDE2000.severity = warning
dotnet_diagnostic.IDE2002.severity = warning
dotnet_diagnostic.IDE2003.severity = warning
dotnet_diagnostic.IDE2004.severity = warning
dotnet_diagnostic.IDE2005.severity = warning
dotnet_diagnostic.IDE2006.severity = warning
csharp_style_allow_blank_line_after_colon_in_constructor_initializer_experimental = false
csharp_style_allow_blank_line_after_token_in_arrow_expression_clause_experimental = false
csharp_style_allow_blank_line_after_token_in_conditional_expression_experimental = false
csharp_style_allow_blank_lines_between_consecutive_braces_experimental = false
dotnet_style_allow_multiple_blank_lines_experimental = false
dotnet_style_allow_statement_immediately_after_block_experimental = false
# Null-checking preferences
csharp_style_conditional_delegate_call = true
# Parameter preferences
dotnet_code_quality_unused_parameters = all
dotnet_diagnostic.IDE0280.severity = error
# Parentheses preferences
dotnet_diagnostic.IDE0047.severity = warning
dotnet_diagnostic.IDE0048.severity = warning
dotnet_style_parentheses_in_arithmetic_binary_operators = always_for_clarity
dotnet_style_parentheses_in_other_binary_operators = always_for_clarity
dotnet_style_parentheses_in_other_operators = always_for_clarity
dotnet_style_parentheses_in_relational_binary_operators = always_for_clarity
# Pattern-matching preferences
dotnet_diagnostic.IDE0019.severity = warning
dotnet_diagnostic.IDE0020.severity = warning
dotnet_diagnostic.IDE0038.severity = warning
dotnet_diagnostic.IDE0066.severity = none
dotnet_diagnostic.IDE0083.severity = warning
dotnet_diagnostic.IDE0260.severity = warning
csharp_style_pattern_matching_over_as_with_null_check = true
csharp_style_pattern_matching_over_is_with_cast_check = true
csharp_style_prefer_not_pattern = true
csharp_style_prefer_pattern_matching = true
# this. and Me. preferences
dotnet_style_qualification_for_event = false
dotnet_style_qualification_for_field = false
dotnet_style_qualification_for_method = false
dotnet_style_qualification_for_property = false
# var preferences
csharp_style_var_for_built_in_types = false
csharp_style_var_when_type_is_apparent = true
# .NET formatting options
dotnet_separate_import_directive_groups = false
dotnet_sort_system_directives_first = true
# C# formatting options
csharp_indent_block_contents = true
csharp_indent_braces = false
csharp_indent_case_contents = true
csharp_indent_case_contents_when_block = false
csharp_indent_labels = one_less_than_current
csharp_indent_switch_labels = true
csharp_new_line_before_catch = true
csharp_new_line_before_else = true
csharp_new_line_before_finally = true
csharp_new_line_before_members_in_anonymous_types = true
csharp_new_line_before_members_in_object_initializers = true
csharp_new_line_before_open_brace = all
csharp_new_line_between_query_expression_clauses = true
csharp_preserve_single_line_blocks = true
csharp_preserve_single_line_statements = true
csharp_space_after_cast = false
csharp_space_after_colon_in_inheritance_clause = true
csharp_space_after_comma = true
csharp_space_after_dot = false
csharp_space_after_keywords_in_control_flow_statements = true
csharp_space_after_semicolon_in_for_statement = true
csharp_space_around_binary_operators = before_and_after
csharp_space_around_declaration_statements = false
csharp_space_before_colon_in_inheritance_clause = true
csharp_space_before_comma = false
csharp_space_before_dot = false
csharp_space_before_open_square_brackets = false
csharp_space_before_semicolon_in_for_statement = false
csharp_space_between_empty_square_brackets = false
csharp_space_between_method_call_empty_parameter_list_parentheses = false
csharp_space_between_method_call_name_and_opening_parenthesis = false
csharp_space_between_method_call_parameter_list_parentheses = false
csharp_space_between_method_declaration_empty_parameter_list_parentheses = false
csharp_space_between_method_declaration_parameter_list_parentheses = false
csharp_space_between_parentheses = false
csharp_space_between_square_brackets = false

View File

@@ -1,43 +1,48 @@
name: Build and Test
on:
push:
branches: [ "master" ]
push:
branches: ["master"]
jobs:
build:
runs-on: ubuntu-latest
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: 9.0.x
- name: Run tests
run: dotnet test
- name: Run publish script
run: ./publish-nix.sh -d
steps:
- uses: actions/checkout@v5
with:
fetch-depth: 0
- name: Upload package
uses: actions/upload-artifact@v4
with:
name: 'Nuget Package'
path: "*.nupkg,*.snupkg"
- name: Setup .NET
uses: actions/setup-dotnet@v5
with:
dotnet-version: |
8.0.x
9.0.x
10.0.x
- name: Upload to rolling
uses: ncipollo/release-action@v1.14.0
with:
allowUpdates: True
artifacts: "*.nupkg,*.snupkg,*.zip"
body: 'Last built commit: ${{ github.sha }}'
name: 'Rolling Release'
prerelease: True
replacesArtifacts: True
tag: "rolling"
updateOnlyUnreleased: True
- name: Run tests
run: dotnet test
- name: Run publish script
run: ./publish-nix.sh -d
- name: Update rolling tag
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
git tag -f rolling
git push origin :refs/tags/rolling || true
git push origin rolling --force
- name: Upload to rolling
uses: ncipollo/release-action@v1.20.0
with:
allowUpdates: True
artifacts: "*.nupkg,*.snupkg,*.zip"
body: "Last built commit: ${{ github.sha }}"
name: "Rolling Release"
prerelease: True
replacesArtifacts: True
tag: "rolling"
updateOnlyUnreleased: True

View File

@@ -3,18 +3,21 @@ name: Build PR
on: [pull_request]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: 9.0.x
- name: Build
run: dotnet build
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- name: Run tests
run: dotnet test
- name: Setup .NET
uses: actions/setup-dotnet@v5
with:
dotnet-version: |
8.0.x
9.0.x
10.0.x
- name: Build
run: dotnet build
- name: Run tests
run: dotnet test

9
.gitmodules vendored
View File

@@ -1,9 +0,0 @@
[submodule "BinaryObjectScanner/_EXTERNAL/stormlibsharp"]
path = BinaryObjectScanner/_EXTERNAL/stormlibsharp
url = https://github.com/robpaveza/stormlibsharp.git
[submodule "BinaryObjectScanner/_EXTERNAL/libmspack4n"]
path = BinaryObjectScanner/_EXTERNAL/libmspack4n
url = https://github.com/activescott/libmspack4n.git
[submodule "BinaryObjectScanner/_EXTERNAL/LessIO"]
path = BinaryObjectScanner/_EXTERNAL/LessIO
url = https://github.com/activescott/LessIO.git

18
.vscode/launch.json vendored
View File

@@ -10,25 +10,13 @@
"request": "launch",
"preLaunchTask": "build",
// If you have changed target frameworks, make sure to update the program path.
"program": "${workspaceFolder}/ProtectionScan/bin/Debug/net9.0/ProtectionScan.dll",
"program": "${workspaceFolder}/ProtectionScan/bin/Debug/net10.0/ProtectionScan.dll",
"args": [],
"cwd": "${workspaceFolder}/ProtectionScan",
// For more information about the 'console' field, see https://aka.ms/VSCode-CS-LaunchJson-Console
"console": "internalConsole",
"stopAtEntry": false
},
{
"name": ".NET Core Launch (ExtractionTool)",
"type": "coreclr",
"request": "launch",
"preLaunchTask": "build",
// If you have changed target frameworks, make sure to update the program path.
"program": "${workspaceFolder}/ExtractionTool/bin/Debug/net9.0/ExtractionTool.dll",
"args": [],
"cwd": "${workspaceFolder}/ExtractionTool",
// For more information about the 'console' field, see https://aka.ms/VSCode-CS-LaunchJson-Console
"console": "internalConsole",
"stopAtEntry": false
"stopAtEntry": false,
"justMyCode": false,
},
{
"name": ".NET Core Attach",

View File

@@ -1,3 +0,0 @@
{
"dotnet.defaultSolution": "BinaryObjectScanner.sln"
}

View File

@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>net6.0;net8.0;net9.0</TargetFrameworks>
<TargetFrameworks>net8.0;net9.0;net10.0</TargetFrameworks>
<IsPackable>false</IsPackable>
<LangVersion>latest</LangVersion>
<Nullable>enable</Nullable>
@@ -12,14 +12,14 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="coverlet.collector" Version="6.0.2">
<PackageReference Include="coverlet.collector" Version="6.0.4">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.12.0" />
<PackageReference Include="SabreTools.Serialization" Version="1.8.4" />
<PackageReference Include="xunit" Version="2.9.2" />
<PackageReference Include="xunit.runner.visualstudio" Version="3.0.0">
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="18.0.1" />
<PackageReference Include="SabreTools.Serialization" Version="[2.2.1]" />
<PackageReference Include="xunit" Version="2.9.3" />
<PackageReference Include="xunit.runner.visualstudio" Version="3.1.5">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>

View File

@@ -1,7 +1,8 @@
using System.Collections.Generic;
using BinaryObjectScanner.Data;
using Xunit;
namespace BinaryObjectScanner.Test
namespace BinaryObjectScanner.Test.Data
{
public class ProtectionDictionaryTests
{
@@ -41,4 +42,4 @@ namespace BinaryObjectScanner.Test
#endregion
}
}
}

View File

@@ -9,7 +9,7 @@ namespace BinaryObjectScanner.Test.Data
public void ContentCheckClasses_Populated()
{
var actual = StaticChecks.ContentCheckClasses;
Assert.NotEmpty(actual);
Assert.Equal(6, actual.Length);
}
[Fact]
@@ -30,21 +30,21 @@ namespace BinaryObjectScanner.Test.Data
public void NewExecutableCheckClasses_Populated()
{
var actual = StaticChecks.NewExecutableCheckClasses;
Assert.NotEmpty(actual);
Assert.Equal(7, actual.Length);
}
[Fact]
public void PathCheckClasses_Populated()
{
var actual = StaticChecks.PathCheckClasses;
Assert.NotEmpty(actual);
Assert.Equal(68, actual.Length);
}
[Fact]
public void PortableExecutableCheckClasses_Populated()
{
var actual = StaticChecks.PortableExecutableCheckClasses;
Assert.NotEmpty(actual);
Assert.Equal(105, actual.Length);
}
}
}
}

View File

@@ -1,5 +1,3 @@
using System;
using System.Collections.Generic;
using Xunit;
namespace BinaryObjectScanner.Test
@@ -33,300 +31,5 @@ namespace BinaryObjectScanner.Test
}
#endregion
#region IterateWithAction
[Fact]
public void IterateWithAction_EmptyEnumerable_Success()
{
List<string> set = new List<string>();
Action<string> action = (s) => s.ToLowerInvariant();
set.IterateWithAction(action);
Assert.Empty(set);
}
[Fact]
public void IterateWithAction_EmptyAction_Success()
{
List<string> set = ["a", "b", "c"];
Action<string> action = (s) => { };
set.IterateWithAction(action);
Assert.Equal(3, set.Count);
}
[Fact]
public void IterateWithAction_Valid_Success()
{
List<string> set = ["a", "b", "c"];
List<string> actual = new List<string>();
Action<string> action = (s) =>
{
lock (actual)
{
actual.Add(s.ToUpperInvariant());
}
};
set.IterateWithAction(action);
Assert.Equal(3, set.Count);
Assert.Equal(3, actual.Count);
}
#endregion
#region OptionalContains
[Fact]
public void OptionalContains_NullStringNoComparison_False()
{
string? str = null;
string prefix = "prefix";
bool actual = str.OptionalContains(prefix);
Assert.False(actual);
}
[Fact]
public void OptionalContains_NullStringComparison_False()
{
string? str = null;
string prefix = "prefix";
bool actual = str.OptionalContains(prefix, StringComparison.OrdinalIgnoreCase);
Assert.False(actual);
}
[Fact]
public void OptionalContains_EmptyStringNoComparison_False()
{
string? str = string.Empty;
string prefix = "prefix";
bool actual = str.OptionalContains(prefix);
Assert.False(actual);
}
[Fact]
public void OptionalContains_EmptyStringComparison_False()
{
string? str = string.Empty;
string prefix = "prefix";
bool actual = str.OptionalContains(prefix, StringComparison.OrdinalIgnoreCase);
Assert.False(actual);
}
[Fact]
public void OptionalContains_NoMatchNoComparison_False()
{
string? str = "postfix";
string prefix = "prefix";
bool actual = str.OptionalContains(prefix);
Assert.False(actual);
}
[Fact]
public void OptionalContains_NoMatchComparison_False()
{
string? str = "postfix";
string prefix = "prefix";
bool actual = str.OptionalContains(prefix, StringComparison.OrdinalIgnoreCase);
Assert.False(actual);
}
[Fact]
public void OptionalContains_MatchesNoComparison_True()
{
string? str = "prefix";
string prefix = "prefix";
bool actual = str.OptionalContains(prefix);
Assert.True(actual);
}
[Fact]
public void OptionalContains_MatchesComparison_True()
{
string? str = "prefix";
string prefix = "prefix";
bool actual = str.OptionalContains(prefix, StringComparison.OrdinalIgnoreCase);
Assert.True(actual);
}
#endregion
#region OptionalEquals
[Fact]
public void OptionalEquals_NullStringNoComparison_False()
{
string? str = null;
string prefix = "prefix";
bool actual = str.OptionalEquals(prefix);
Assert.False(actual);
}
[Fact]
public void OptionalEquals_NullStringComparison_False()
{
string? str = null;
string prefix = "prefix";
bool actual = str.OptionalEquals(prefix, StringComparison.OrdinalIgnoreCase);
Assert.False(actual);
}
[Fact]
public void OptionalEquals_EmptyStringNoComparison_False()
{
string? str = string.Empty;
string prefix = "prefix";
bool actual = str.OptionalEquals(prefix);
Assert.False(actual);
}
[Fact]
public void OptionalEquals_EmptyStringComparison_False()
{
string? str = string.Empty;
string prefix = "prefix";
bool actual = str.OptionalEquals(prefix, StringComparison.OrdinalIgnoreCase);
Assert.False(actual);
}
[Fact]
public void OptionalEquals_NoMatchNoComparison_False()
{
string? str = "postfix";
string prefix = "prefix";
bool actual = str.OptionalEquals(prefix);
Assert.False(actual);
}
[Fact]
public void OptionalEquals_NoMatchComparison_False()
{
string? str = "postfix";
string prefix = "prefix";
bool actual = str.OptionalEquals(prefix, StringComparison.OrdinalIgnoreCase);
Assert.False(actual);
}
[Fact]
public void OptionalEquals_MatchesNoComparison_True()
{
string? str = "prefix";
string prefix = "prefix";
bool actual = str.OptionalEquals(prefix);
Assert.True(actual);
}
[Fact]
public void OptionalEquals_MatchesComparison_True()
{
string? str = "prefix";
string prefix = "prefix";
bool actual = str.OptionalEquals(prefix, StringComparison.OrdinalIgnoreCase);
Assert.True(actual);
}
#endregion
#region OptionalStartsWith
[Fact]
public void OptionalStartsWith_NullStringNoComparison_False()
{
string? str = null;
string prefix = "prefix";
bool actual = str.OptionalStartsWith(prefix);
Assert.False(actual);
}
[Fact]
public void OptionalStartsWith_NullStringComparison_False()
{
string? str = null;
string prefix = "prefix";
bool actual = str.OptionalStartsWith(prefix, StringComparison.OrdinalIgnoreCase);
Assert.False(actual);
}
[Fact]
public void OptionalStartsWith_EmptyStringNoComparison_False()
{
string? str = string.Empty;
string prefix = "prefix";
bool actual = str.OptionalStartsWith(prefix);
Assert.False(actual);
}
[Fact]
public void OptionalStartsWith_EmptyStringComparison_False()
{
string? str = string.Empty;
string prefix = "prefix";
bool actual = str.OptionalStartsWith(prefix, StringComparison.OrdinalIgnoreCase);
Assert.False(actual);
}
[Fact]
public void OptionalStartsWith_NoMatchNoComparison_False()
{
string? str = "postfix";
string prefix = "prefix";
bool actual = str.OptionalStartsWith(prefix);
Assert.False(actual);
}
[Fact]
public void OptionalStartsWith_NoMatchComparison_False()
{
string? str = "postfix";
string prefix = "prefix";
bool actual = str.OptionalStartsWith(prefix, StringComparison.OrdinalIgnoreCase);
Assert.False(actual);
}
[Fact]
public void OptionalStartsWith_MatchesNoComparison_True()
{
string? str = "prefix";
string prefix = "prefix";
bool actual = str.OptionalStartsWith(prefix);
Assert.True(actual);
}
[Fact]
public void OptionalStartsWith_MatchesComparison_True()
{
string? str = "prefix";
string prefix = "prefix";
bool actual = str.OptionalStartsWith(prefix, StringComparison.OrdinalIgnoreCase);
Assert.True(actual);
}
#endregion
}
}
}

View File

@@ -1,124 +0,0 @@
using System;
using System.Collections.Generic;
using BinaryObjectScanner.Interfaces;
using SabreTools.Serialization.Wrappers;
using Xunit;
namespace BinaryObjectScanner.Test
{
public class FactoryTests
{
#region CreateDetectable
private static readonly List<WrapperType> _detectableTypes =
[
WrapperType.AACSMediaKeyBlock,
WrapperType.BDPlusSVM,
//WrapperType.CIA,
WrapperType.Executable,
WrapperType.LDSCRYPT,
//WrapperType.N3DS,
//WrapperType.Nitro,
WrapperType.PlayJAudioFile,
WrapperType.RealArcadeInstaller,
WrapperType.RealArcadeMezzanine,
WrapperType.SFFS,
WrapperType.Textfile,
];
[Theory]
[MemberData(nameof(GenerateIDetectableTestData))]
public void CreateDetectableTests(WrapperType type, bool expectNull)
{
IDetectable? actual = Factory.CreateDetectable(type);
if (expectNull)
Assert.Null(actual);
else
Assert.NotNull(actual);
}
public static List<object?[]> GenerateIDetectableTestData()
{
var testData = new List<object?[]>() { new object?[] { null, true } };
foreach (WrapperType type in Enum.GetValues(typeof(WrapperType)))
{
if (_detectableTypes.Contains(type))
testData.Add([type, false]);
else
testData.Add([type, true]);
}
return testData;
}
#endregion
#region CreateExtractable
private static readonly List<WrapperType> _extractableTypes =
[
WrapperType.BFPK,
WrapperType.BSP,
WrapperType.BZip2,
WrapperType.CFB,
//WrapperType.CIA,
//WrapperType.Executable,
WrapperType.GCF,
WrapperType.GZIP,
WrapperType.InstallShieldArchiveV3,
WrapperType.InstallShieldCAB,
WrapperType.LZKWAJ,
WrapperType.LZQBasic,
WrapperType.LZSZDD,
WrapperType.MicrosoftCAB,
WrapperType.MoPaQ,
//WrapperType.N3DS,
//WrapperType.NCF,
//WrapperType.Nitro,
WrapperType.PAK,
WrapperType.PFF,
WrapperType.PKZIP,
//WrapperType.PlayJAudioFile,
//WrapperType.Quantum,
WrapperType.RAR,
WrapperType.SevenZip,
WrapperType.SFFS,
WrapperType.SGA,
WrapperType.TapeArchive,
WrapperType.VBSP,
WrapperType.VPK,
WrapperType.WAD,
WrapperType.XZ,
WrapperType.XZP,
];
[Theory]
[MemberData(nameof(GenerateIExtractableTestData))]
public void CreateExtractableTests(WrapperType type, bool expectNull)
{
IExtractable? actual = Factory.CreateExtractable(type);
if (expectNull)
Assert.Null(actual);
else
Assert.NotNull(actual);
}
public static List<object?[]> GenerateIExtractableTestData()
{
var testData = new List<object?[]>();
foreach (WrapperType type in Enum.GetValues(typeof(WrapperType)))
{
if (_extractableTypes.Contains(type))
testData.Add([type, false]);
else
testData.Add([type, true]);
}
return testData;
}
#endregion
}
}

View File

@@ -6,26 +6,28 @@ namespace BinaryObjectScanner.Test.FileType
{
public class AACSMediaKeyBlockTests
{
private static readonly SabreTools.Serialization.Wrappers.AACSMediaKeyBlock wrapper
= new(new SabreTools.Data.Models.AACS.MediaKeyBlock(), new MemoryStream(new byte[1024]));
[Fact]
public void DetectFile_EmptyString_Null()
{
string file = string.Empty;
var detectable = new AACSMediaKeyBlock();
var detectable = new AACSMediaKeyBlock(wrapper);
string? actual = detectable.Detect(file, includeDebug: false);
Assert.Null(actual);
}
[Fact]
public void DetectStream_EmptyStream_Null()
public void DetectStream_EmptyStream_DefaultValue()
{
Stream? stream = new MemoryStream();
string file = string.Empty;
var detectable = new AACSMediaKeyBlock();
var detectable = new AACSMediaKeyBlock(wrapper);
string? actual = detectable.Detect(stream, file, includeDebug: false);
Assert.Null(actual);
Assert.Equal("AACS (Unknown Version)", actual);
}
}
}

View File

@@ -6,26 +6,28 @@ namespace BinaryObjectScanner.Test.FileType
{
public class BDPlusSVMTests
{
private static readonly SabreTools.Serialization.Wrappers.BDPlusSVM wrapper
= new(new SabreTools.Data.Models.BDPlus.SVM(), new MemoryStream(new byte[1024]));
[Fact]
public void DetectFile_EmptyString_Null()
{
string file = string.Empty;
var detectable = new BDPlusSVM();
var detectable = new BDPlusSVM(wrapper);
string? actual = detectable.Detect(file, includeDebug: false);
Assert.Null(actual);
}
[Fact]
public void DetectStream_EmptyStream_Null()
public void DetectStream_EmptyStream_DefaultValue()
{
Stream? stream = new MemoryStream();
string file = string.Empty;
var detectable = new BDPlusSVM();
var detectable = new BDPlusSVM(wrapper);
string? actual = detectable.Detect(stream, file, includeDebug: false);
Assert.Null(actual);
Assert.Equal("BD+ 0000-00-00", actual);
}
}
}

View File

@@ -1,68 +0,0 @@
using System.IO;
using BinaryObjectScanner.FileType;
using Xunit;
namespace BinaryObjectScanner.Test.FileType
{
public class BFPKTests
{
[Fact]
public void ExtractFile_EmptyString_False()
{
string file = string.Empty;
string outDir = string.Empty;
var extractable = new BFPK();
bool actual = extractable.Extract(file, outDir, includeDebug: false);
Assert.False(actual);
}
[Fact]
public void ExtractStream_Null_False()
{
Stream? stream = null;
string file = string.Empty;
string outDir = string.Empty;
var extractable = new BFPK();
bool actual = extractable.Extract(stream, file, outDir, includeDebug: false);
Assert.False(actual);
}
[Fact]
public void ExtractStream_Empty_False()
{
Stream? stream = new MemoryStream();
string file = string.Empty;
string outDir = string.Empty;
var extractable = new BFPK();
bool actual = extractable.Extract(stream, file, outDir, includeDebug: false);
Assert.False(actual);
}
[Fact]
public void ExtractAll_EmptyModel_False()
{
var model = new SabreTools.Models.BFPK.Archive();
var data = new MemoryStream();
var item = new SabreTools.Serialization.Wrappers.BFPK(model, data);
string outputDirectory = string.Empty;
bool actual = BFPK.ExtractAll(item, outputDirectory);
Assert.False(actual);
}
[Fact]
public void ExtractFile_EmptyModel_False()
{
var model = new SabreTools.Models.BFPK.Archive();
var data = new MemoryStream();
var item = new SabreTools.Serialization.Wrappers.BFPK(model, data);
string outputDirectory = string.Empty;
bool actual = BFPK.ExtractFile(item, 0, outputDirectory);
Assert.False(actual);
}
}
}

View File

@@ -1,44 +0,0 @@
using System.IO;
using BinaryObjectScanner.FileType;
using Xunit;
namespace BinaryObjectScanner.Test.FileType
{
public class BSPTests
{
[Fact]
public void ExtractFile_EmptyString_False()
{
string file = string.Empty;
string outDir = string.Empty;
var extractable = new BSP();
bool actual = extractable.Extract(file, outDir, includeDebug: false);
Assert.False(actual);
}
[Fact]
public void ExtractStream_Null_False()
{
Stream? stream = null;
string file = string.Empty;
string outDir = string.Empty;
var extractable = new BSP();
bool actual = extractable.Extract(stream, file, outDir, includeDebug: false);
Assert.False(actual);
}
[Fact]
public void ExtractStream_Empty_False()
{
Stream? stream = new MemoryStream();
string file = string.Empty;
string outDir = string.Empty;
var extractable = new BSP();
bool actual = extractable.Extract(stream, file, outDir, includeDebug: false);
Assert.False(actual);
}
}
}

View File

@@ -1,44 +0,0 @@
using System.IO;
using BinaryObjectScanner.FileType;
using Xunit;
namespace BinaryObjectScanner.Test.FileType
{
public class BZip2Tests
{
[Fact]
public void ExtractFile_EmptyString_False()
{
string file = string.Empty;
string outDir = string.Empty;
var extractable = new BZip2();
bool actual = extractable.Extract(file, outDir, includeDebug: false);
Assert.False(actual);
}
[Fact]
public void ExtractStream_Null_False()
{
Stream? stream = null;
string file = string.Empty;
string outDir = string.Empty;
var extractable = new BZip2();
bool actual = extractable.Extract(stream, file, outDir, includeDebug: false);
Assert.False(actual);
}
[Fact]
public void ExtractStream_Empty_False()
{
Stream? stream = new MemoryStream();
string file = string.Empty;
string outDir = string.Empty;
var extractable = new BZip2();
bool actual = extractable.Extract(stream, file, outDir, includeDebug: false);
Assert.False(actual);
}
}
}

View File

@@ -1,44 +0,0 @@
using System.IO;
using BinaryObjectScanner.FileType;
using Xunit;
namespace BinaryObjectScanner.Test.FileType
{
public class CFBTests
{
[Fact]
public void ExtractFile_EmptyString_False()
{
string file = string.Empty;
string outDir = string.Empty;
var extractable = new CFB();
bool actual = extractable.Extract(file, outDir, includeDebug: false);
Assert.False(actual);
}
[Fact]
public void ExtractStream_Null_False()
{
Stream? stream = null;
string file = string.Empty;
string outDir = string.Empty;
var extractable = new CFB();
bool actual = extractable.Extract(stream, file, outDir, includeDebug: false);
Assert.False(actual);
}
[Fact]
public void ExtractStream_Empty_False()
{
Stream? stream = new MemoryStream();
string file = string.Empty;
string outDir = string.Empty;
var extractable = new CFB();
bool actual = extractable.Extract(stream, file, outDir, includeDebug: false);
Assert.False(actual);
}
}
}

View File

@@ -0,0 +1,34 @@
using System.IO;
using BinaryObjectScanner.FileType;
using Xunit;
namespace BinaryObjectScanner.Test.FileType
{
public class DiskImageTests
{
private static readonly SabreTools.Serialization.Wrappers.ISO9660 wrapper
= new(new SabreTools.Data.Models.ISO9660.Volume(), new MemoryStream(new byte[1024]));
[Fact]
public void DetectFile_EmptyString_Null()
{
string file = string.Empty;
var detectable = new ISO9660(wrapper);
string? actual = detectable.Detect(file, includeDebug: false);
Assert.Null(actual);
}
[Fact]
public void DetectStream_EmptyStream_Empty()
{
Stream? stream = new MemoryStream();
string file = string.Empty;
var detectable = new ISO9660(wrapper);
string? actual = detectable.Detect(stream, file, includeDebug: false);
Assert.NotNull(actual);
Assert.Empty(actual);
}
}
}

View File

@@ -1,43 +0,0 @@
using System;
using System.IO;
using BinaryObjectScanner.FileType;
using Xunit;
namespace BinaryObjectScanner.Test.FileType
{
public class ExecutableTests
{
[Fact]
public void DetectFile_EmptyString_Null()
{
string file = string.Empty;
var detectable = new Executable();
string? actual = detectable.Detect(file, includeDebug: false);
Assert.Null(actual);
}
[Fact]
public void DetectStream_EmptyStream_Null()
{
Stream? stream = new MemoryStream();
string file = string.Empty;
var detectable = new Executable();
string? actual = detectable.Detect(stream, file, includeDebug: false);
Assert.Null(actual);
}
[Fact]
public void DetectDict_EmptyStream_Empty()
{
Stream? stream = new MemoryStream();
string file = string.Empty;
Func<string, ProtectionDictionary>? getProtections = null;
var detectable = new Executable();
ProtectionDictionary actual = detectable.DetectDict(stream, file, getProtections, includeDebug: false);
Assert.Empty(actual);
}
}
}

View File

@@ -1,44 +0,0 @@
using System.IO;
using BinaryObjectScanner.FileType;
using Xunit;
namespace BinaryObjectScanner.Test.FileType
{
public class GCFTests
{
[Fact]
public void ExtractFile_EmptyString_False()
{
string file = string.Empty;
string outDir = string.Empty;
var extractable = new GCF();
bool actual = extractable.Extract(file, outDir, includeDebug: false);
Assert.False(actual);
}
[Fact]
public void ExtractStream_Null_False()
{
Stream? stream = null;
string file = string.Empty;
string outDir = string.Empty;
var extractable = new GCF();
bool actual = extractable.Extract(stream, file, outDir, includeDebug: false);
Assert.False(actual);
}
[Fact]
public void ExtractStream_Empty_False()
{
Stream? stream = new MemoryStream();
string file = string.Empty;
string outDir = string.Empty;
var extractable = new GCF();
bool actual = extractable.Extract(stream, file, outDir, includeDebug: false);
Assert.False(actual);
}
}
}

View File

@@ -1,44 +0,0 @@
using System.IO;
using BinaryObjectScanner.FileType;
using Xunit;
namespace BinaryObjectScanner.Test.FileType
{
public class GZIPTests
{
[Fact]
public void ExtractFile_EmptyString_False()
{
string file = string.Empty;
string outDir = string.Empty;
var extractable = new GZIP();
bool actual = extractable.Extract(file, outDir, includeDebug: false);
Assert.False(actual);
}
[Fact]
public void ExtractStream_Null_False()
{
Stream? stream = null;
string file = string.Empty;
string outDir = string.Empty;
var extractable = new GZIP();
bool actual = extractable.Extract(stream, file, outDir, includeDebug: false);
Assert.False(actual);
}
[Fact]
public void ExtractStream_Empty_False()
{
Stream? stream = new MemoryStream();
string file = string.Empty;
string outDir = string.Empty;
var extractable = new GZIP();
bool actual = extractable.Extract(stream, file, outDir, includeDebug: false);
Assert.False(actual);
}
}
}

View File

@@ -1,44 +0,0 @@
using System.IO;
using BinaryObjectScanner.FileType;
using Xunit;
namespace BinaryObjectScanner.Test.FileType
{
public class InstallShieldArchiveV3Tests
{
[Fact]
public void ExtractFile_EmptyString_False()
{
string file = string.Empty;
string outDir = string.Empty;
var extractable = new InstallShieldArchiveV3();
bool actual = extractable.Extract(file, outDir, includeDebug: false);
Assert.False(actual);
}
[Fact]
public void ExtractStream_Null_False()
{
Stream? stream = null;
string file = string.Empty;
string outDir = string.Empty;
var extractable = new InstallShieldArchiveV3();
bool actual = extractable.Extract(stream, file, outDir, includeDebug: false);
Assert.False(actual);
}
[Fact]
public void ExtractStream_Empty_False()
{
Stream? stream = new MemoryStream();
string file = string.Empty;
string outDir = string.Empty;
var extractable = new InstallShieldArchiveV3();
bool actual = extractable.Extract(stream, file, outDir, includeDebug: false);
Assert.False(actual);
}
}
}

View File

@@ -1,44 +0,0 @@
using System.IO;
using BinaryObjectScanner.FileType;
using Xunit;
namespace BinaryObjectScanner.Test.FileType
{
public class InstallShieldCABTests
{
[Fact]
public void ExtractFile_EmptyString_False()
{
string file = string.Empty;
string outDir = string.Empty;
var extractable = new InstallShieldCAB();
bool actual = extractable.Extract(file, outDir, includeDebug: false);
Assert.False(actual);
}
[Fact]
public void ExtractStream_Null_False()
{
Stream? stream = null;
string file = string.Empty;
string outDir = string.Empty;
var extractable = new InstallShieldCAB();
bool actual = extractable.Extract(stream, file, outDir, includeDebug: false);
Assert.False(actual);
}
[Fact]
public void ExtractStream_Empty_False()
{
Stream? stream = new MemoryStream();
string file = string.Empty;
string outDir = string.Empty;
var extractable = new InstallShieldCAB();
bool actual = extractable.Extract(stream, file, outDir, includeDebug: false);
Assert.False(actual);
}
}
}

View File

@@ -6,11 +6,14 @@ namespace BinaryObjectScanner.Test.FileType
{
public class LDSCRYPTTests
{
private static readonly SabreTools.Serialization.Wrappers.LDSCRYPT wrapper
= new(new SabreTools.Data.Models.LDSCRYPT.EncryptedFile(), new MemoryStream(new byte[1024]));
[Fact]
public void DetectFile_EmptyString_Null()
{
string file = string.Empty;
var detectable = new LDSCRYPT();
var detectable = new LDSCRYPT(wrapper);
string? actual = detectable.Detect(file, includeDebug: false);
Assert.Null(actual);
@@ -21,11 +24,10 @@ namespace BinaryObjectScanner.Test.FileType
{
Stream? stream = new MemoryStream();
string file = string.Empty;
var detectable = new LDSCRYPT();
var detectable = new LDSCRYPT(wrapper);
string? actual = detectable.Detect(stream, file, includeDebug: false);
Assert.Null(actual);
Assert.Equal("LDSCRYPT", actual);
}
}
}

View File

@@ -1,44 +0,0 @@
using System.IO;
using BinaryObjectScanner.FileType;
using Xunit;
namespace BinaryObjectScanner.Test.FileType
{
public class LZKWAJTests
{
[Fact]
public void ExtractFile_EmptyString_False()
{
string file = string.Empty;
string outDir = string.Empty;
var extractable = new LZKWAJ();
bool actual = extractable.Extract(file, outDir, includeDebug: false);
Assert.False(actual);
}
[Fact]
public void ExtractStream_Null_False()
{
Stream? stream = null;
string file = string.Empty;
string outDir = string.Empty;
var extractable = new LZKWAJ();
bool actual = extractable.Extract(stream, file, outDir, includeDebug: false);
Assert.False(actual);
}
[Fact]
public void ExtractStream_Empty_False()
{
Stream? stream = new MemoryStream();
string file = string.Empty;
string outDir = string.Empty;
var extractable = new LZKWAJ();
bool actual = extractable.Extract(stream, file, outDir, includeDebug: false);
Assert.False(actual);
}
}
}

View File

@@ -1,44 +0,0 @@
using System.IO;
using BinaryObjectScanner.FileType;
using Xunit;
namespace BinaryObjectScanner.Test.FileType
{
public class LZQBasicTests
{
[Fact]
public void ExtractFile_EmptyString_False()
{
string file = string.Empty;
string outDir = string.Empty;
var extractable = new LZQBasic();
bool actual = extractable.Extract(file, outDir, includeDebug: false);
Assert.False(actual);
}
[Fact]
public void ExtractStream_Null_False()
{
Stream? stream = null;
string file = string.Empty;
string outDir = string.Empty;
var extractable = new LZQBasic();
bool actual = extractable.Extract(stream, file, outDir, includeDebug: false);
Assert.False(actual);
}
[Fact]
public void ExtractStream_Empty_False()
{
Stream? stream = new MemoryStream();
string file = string.Empty;
string outDir = string.Empty;
var extractable = new LZQBasic();
bool actual = extractable.Extract(stream, file, outDir, includeDebug: false);
Assert.False(actual);
}
}
}

View File

@@ -1,44 +0,0 @@
using System.IO;
using BinaryObjectScanner.FileType;
using Xunit;
namespace BinaryObjectScanner.Test.FileType
{
public class LZSZDDTests
{
[Fact]
public void ExtractFile_EmptyString_False()
{
string file = string.Empty;
string outDir = string.Empty;
var extractable = new LZSZDD();
bool actual = extractable.Extract(file, outDir, includeDebug: false);
Assert.False(actual);
}
[Fact]
public void ExtractStream_Null_False()
{
Stream? stream = null;
string file = string.Empty;
string outDir = string.Empty;
var extractable = new LZSZDD();
bool actual = extractable.Extract(stream, file, outDir, includeDebug: false);
Assert.False(actual);
}
[Fact]
public void ExtractStream_Empty_False()
{
Stream? stream = new MemoryStream();
string file = string.Empty;
string outDir = string.Empty;
var extractable = new LZSZDD();
bool actual = extractable.Extract(stream, file, outDir, includeDebug: false);
Assert.False(actual);
}
}
}

View File

@@ -0,0 +1,34 @@
using System.IO;
using BinaryObjectScanner.FileType;
using Xunit;
namespace BinaryObjectScanner.Test.FileType
{
public class LinearExecutableTests
{
private static readonly SabreTools.Serialization.Wrappers.LinearExecutable wrapper
= new(new SabreTools.Data.Models.LinearExecutable.Executable(), new MemoryStream(new byte[1024]));
[Fact]
public void DetectFile_EmptyString_Null()
{
string file = string.Empty;
var detectable = new LinearExecutable(wrapper);
string? actual = detectable.Detect(file, includeDebug: false);
Assert.Null(actual);
}
[Fact]
public void DetectStream_EmptyStream_Empty()
{
Stream? stream = new MemoryStream();
string file = string.Empty;
var detectable = new LinearExecutable(wrapper);
string? actual = detectable.Detect(stream, file, includeDebug: false);
Assert.NotNull(actual);
Assert.Empty(actual);
}
}
}

View File

@@ -1,44 +0,0 @@
using System.IO;
using BinaryObjectScanner.FileType;
using Xunit;
namespace BinaryObjectScanner.Test.FileType
{
public class MPQTests
{
[Fact]
public void ExtractFile_EmptyString_False()
{
string file = string.Empty;
string outDir = string.Empty;
var extractable = new MPQ();
bool actual = extractable.Extract(file, outDir, includeDebug: false);
Assert.False(actual);
}
[Fact]
public void ExtractStream_Null_False()
{
Stream? stream = null;
string file = string.Empty;
string outDir = string.Empty;
var extractable = new MPQ();
bool actual = extractable.Extract(stream, file, outDir, includeDebug: false);
Assert.False(actual);
}
[Fact]
public void ExtractStream_Empty_False()
{
Stream? stream = new MemoryStream();
string file = string.Empty;
string outDir = string.Empty;
var extractable = new MPQ();
bool actual = extractable.Extract(stream, file, outDir, includeDebug: false);
Assert.False(actual);
}
}
}

View File

@@ -0,0 +1,34 @@
using System.IO;
using BinaryObjectScanner.FileType;
using Xunit;
namespace BinaryObjectScanner.Test.FileType
{
public class MSDOSTests
{
private static readonly SabreTools.Serialization.Wrappers.MSDOS wrapper
= new(new SabreTools.Data.Models.MSDOS.Executable(), new MemoryStream(new byte[1024]));
[Fact]
public void DetectFile_EmptyString_Null()
{
string file = string.Empty;
var detectable = new MSDOS(wrapper);
string? actual = detectable.Detect(file, includeDebug: false);
Assert.Null(actual);
}
[Fact]
public void DetectStream_EmptyStream_Empty()
{
Stream? stream = new MemoryStream();
string file = string.Empty;
var detectable = new MSDOS(wrapper);
string? actual = detectable.Detect(stream, file, includeDebug: false);
Assert.NotNull(actual);
Assert.Empty(actual);
}
}
}

View File

@@ -1,44 +0,0 @@
using System.IO;
using BinaryObjectScanner.FileType;
using Xunit;
namespace BinaryObjectScanner.Test.FileType
{
public class MicrosoftCABTests
{
[Fact]
public void ExtractFile_EmptyString_False()
{
string file = string.Empty;
string outDir = string.Empty;
var extractable = new MicrosoftCAB();
bool actual = extractable.Extract(file, outDir, includeDebug: false);
Assert.False(actual);
}
[Fact]
public void ExtractStream_Null_False()
{
Stream? stream = null;
string file = string.Empty;
string outDir = string.Empty;
var extractable = new MicrosoftCAB();
bool actual = extractable.Extract(stream, file, outDir, includeDebug: false);
Assert.False(actual);
}
[Fact]
public void ExtractStream_Empty_False()
{
Stream? stream = new MemoryStream();
string file = string.Empty;
string outDir = string.Empty;
var extractable = new MicrosoftCAB();
bool actual = extractable.Extract(stream, file, outDir, includeDebug: false);
Assert.False(actual);
}
}
}

View File

@@ -0,0 +1,34 @@
using System.IO;
using BinaryObjectScanner.FileType;
using Xunit;
namespace BinaryObjectScanner.Test.FileType
{
public class NewExecutableTests
{
private static readonly SabreTools.Serialization.Wrappers.NewExecutable wrapper
= new(new SabreTools.Data.Models.NewExecutable.Executable(), new MemoryStream(new byte[1024]));
[Fact]
public void DetectFile_EmptyString_Null()
{
string file = string.Empty;
var detectable = new NewExecutable(wrapper);
string? actual = detectable.Detect(file, includeDebug: false);
Assert.Null(actual);
}
[Fact]
public void DetectStream_EmptyStream_Empty()
{
Stream? stream = new MemoryStream();
string file = string.Empty;
var detectable = new NewExecutable(wrapper);
string? actual = detectable.Detect(stream, file, includeDebug: false);
Assert.NotNull(actual);
Assert.Empty(actual);
}
}
}

View File

@@ -1,44 +0,0 @@
using System.IO;
using BinaryObjectScanner.FileType;
using Xunit;
namespace BinaryObjectScanner.Test.FileType
{
public class PAKTests
{
[Fact]
public void ExtractFile_EmptyString_False()
{
string file = string.Empty;
string outDir = string.Empty;
var extractable = new PAK();
bool actual = extractable.Extract(file, outDir, includeDebug: false);
Assert.False(actual);
}
[Fact]
public void ExtractStream_Null_False()
{
Stream? stream = null;
string file = string.Empty;
string outDir = string.Empty;
var extractable = new PAK();
bool actual = extractable.Extract(stream, file, outDir, includeDebug: false);
Assert.False(actual);
}
[Fact]
public void ExtractStream_Empty_False()
{
Stream? stream = new MemoryStream();
string file = string.Empty;
string outDir = string.Empty;
var extractable = new PAK();
bool actual = extractable.Extract(stream, file, outDir, includeDebug: false);
Assert.False(actual);
}
}
}

View File

@@ -1,44 +0,0 @@
using System.IO;
using BinaryObjectScanner.FileType;
using Xunit;
namespace BinaryObjectScanner.Test.FileType
{
public class PFFTests
{
[Fact]
public void ExtractFile_EmptyString_False()
{
string file = string.Empty;
string outDir = string.Empty;
var extractable = new PFF();
bool actual = extractable.Extract(file, outDir, includeDebug: false);
Assert.False(actual);
}
[Fact]
public void ExtractStream_Null_False()
{
Stream? stream = null;
string file = string.Empty;
string outDir = string.Empty;
var extractable = new PFF();
bool actual = extractable.Extract(stream, file, outDir, includeDebug: false);
Assert.False(actual);
}
[Fact]
public void ExtractStream_Empty_False()
{
Stream? stream = new MemoryStream();
string file = string.Empty;
string outDir = string.Empty;
var extractable = new PFF();
bool actual = extractable.Extract(stream, file, outDir, includeDebug: false);
Assert.False(actual);
}
}
}

View File

@@ -1,79 +0,0 @@
using System.IO;
using BinaryObjectScanner.FileType;
using Xunit;
namespace BinaryObjectScanner.Test.FileType
{
public class PKZIPTests
{
[Fact]
public void ExtractFile_EmptyString_False()
{
string file = string.Empty;
string outDir = string.Empty;
var extractable = new PKZIP();
bool actual = extractable.Extract(file, outDir, includeDebug: false);
Assert.False(actual);
}
[Fact]
public void ExtractFile_LookForHeader_EmptyString_False()
{
string file = string.Empty;
string outDir = string.Empty;
var extractable = new PKZIP();
bool actual = extractable.Extract(file, outDir, lookForHeader: true, includeDebug: false);
Assert.False(actual);
}
[Fact]
public void ExtractStream_Null_False()
{
Stream? stream = null;
string file = string.Empty;
string outDir = string.Empty;
var extractable = new PKZIP();
bool actual = extractable.Extract(stream, file, outDir, includeDebug: false);
Assert.False(actual);
}
[Fact]
public void ExtractStream_LookForHeader_Null_False()
{
Stream? stream = null;
string file = string.Empty;
string outDir = string.Empty;
var extractable = new PKZIP();
bool actual = extractable.Extract(stream, file, outDir, lookForHeader: true, includeDebug: false);
Assert.False(actual);
}
[Fact]
public void ExtractStream_Empty_False()
{
Stream? stream = new MemoryStream();
string file = string.Empty;
string outDir = string.Empty;
var extractable = new PKZIP();
bool actual = extractable.Extract(stream, file, outDir, includeDebug: false);
Assert.False(actual);
}
[Fact]
public void ExtractStream_LookForHeader_Empty_False()
{
Stream? stream = new MemoryStream();
string file = string.Empty;
string outDir = string.Empty;
var extractable = new PKZIP();
bool actual = extractable.Extract(stream, file, outDir, lookForHeader: true, includeDebug: false);
Assert.False(actual);
}
}
}

View File

@@ -6,26 +6,28 @@ namespace BinaryObjectScanner.Test.FileType
{
public class PLJTests
{
private static readonly SabreTools.Serialization.Wrappers.PlayJAudioFile wrapper
= new(new SabreTools.Data.Models.PlayJ.AudioFile(), new MemoryStream(new byte[1024]));
[Fact]
public void DetectFile_EmptyString_Null()
{
string file = string.Empty;
var detectable = new PLJ();
var detectable = new PLJ(wrapper);
string? actual = detectable.Detect(file, includeDebug: false);
Assert.Null(actual);
}
[Fact]
public void DetectStream_EmptyStream_Null()
public void DetectStream_EmptyStream_DefaultValue()
{
Stream? stream = new MemoryStream();
string file = string.Empty;
var detectable = new PLJ();
var detectable = new PLJ(wrapper);
string? actual = detectable.Detect(stream, file, includeDebug: false);
Assert.Null(actual);
Assert.Equal("PlayJ Audio File", actual);
}
}
}

View File

@@ -0,0 +1,34 @@
using System.IO;
using BinaryObjectScanner.FileType;
using Xunit;
namespace BinaryObjectScanner.Test.FileType
{
public class PortableExecutableTests
{
private static readonly SabreTools.Serialization.Wrappers.PortableExecutable wrapper
= new(new SabreTools.Data.Models.PortableExecutable.Executable(), new MemoryStream(new byte[1024]));
[Fact]
public void DetectFile_EmptyString_Null()
{
string file = string.Empty;
var detectable = new PortableExecutable(wrapper);
string? actual = detectable.Detect(file, includeDebug: false);
Assert.Null(actual);
}
[Fact]
public void DetectStream_EmptyStream_Empty()
{
Stream? stream = new MemoryStream();
string file = string.Empty;
var detectable = new PortableExecutable(wrapper);
string? actual = detectable.Detect(stream, file, includeDebug: false);
Assert.NotNull(actual);
Assert.Empty(actual);
}
}
}

View File

@@ -1,68 +0,0 @@
using System.IO;
using BinaryObjectScanner.FileType;
using Xunit;
namespace BinaryObjectScanner.Test.FileType
{
public class QuantumTests
{
[Fact]
public void ExtractFile_EmptyString_False()
{
string file = string.Empty;
string outDir = string.Empty;
var extractable = new Quantum();
bool actual = extractable.Extract(file, outDir, includeDebug: false);
Assert.False(actual);
}
[Fact]
public void ExtractStream_Null_False()
{
Stream? stream = null;
string file = string.Empty;
string outDir = string.Empty;
var extractable = new Quantum();
bool actual = extractable.Extract(stream, file, outDir, includeDebug: false);
Assert.False(actual);
}
[Fact]
public void ExtractStream_Empty_False()
{
Stream? stream = new MemoryStream();
string file = string.Empty;
string outDir = string.Empty;
var extractable = new Quantum();
bool actual = extractable.Extract(stream, file, outDir, includeDebug: false);
Assert.False(actual);
}
[Fact]
public void ExtractAll_EmptyModel_False()
{
var model = new SabreTools.Models.Quantum.Archive();
var data = new MemoryStream();
var item = new SabreTools.Serialization.Wrappers.Quantum(model, data);
string outputDirectory = string.Empty;
bool actual = Quantum.ExtractAll(item, outputDirectory);
Assert.False(actual);
}
[Fact]
public void ExtractFile_EmptyModel_False()
{
var model = new SabreTools.Models.Quantum.Archive();
var data = new MemoryStream();
var item = new SabreTools.Serialization.Wrappers.Quantum(model, data);
string outputDirectory = string.Empty;
bool actual = Quantum.ExtractFile(item, 0, outputDirectory);
Assert.False(actual);
}
}
}

View File

@@ -1,79 +0,0 @@
using System.IO;
using BinaryObjectScanner.FileType;
using Xunit;
namespace BinaryObjectScanner.Test.FileType
{
public class RARTests
{
[Fact]
public void ExtractFile_EmptyString_False()
{
string file = string.Empty;
string outDir = string.Empty;
var extractable = new RAR();
bool actual = extractable.Extract(file, outDir, includeDebug: false);
Assert.False(actual);
}
[Fact]
public void ExtractFile_LookForHeader_EmptyString_False()
{
string file = string.Empty;
string outDir = string.Empty;
var extractable = new RAR();
bool actual = extractable.Extract(file, outDir, lookForHeader: true, includeDebug: false);
Assert.False(actual);
}
[Fact]
public void ExtractStream_Null_False()
{
Stream? stream = null;
string file = string.Empty;
string outDir = string.Empty;
var extractable = new RAR();
bool actual = extractable.Extract(stream, file, outDir, includeDebug: false);
Assert.False(actual);
}
[Fact]
public void ExtractStream_LookForHeader_Null_False()
{
Stream? stream = null;
string file = string.Empty;
string outDir = string.Empty;
var extractable = new RAR();
bool actual = extractable.Extract(stream, file, outDir, lookForHeader: true, includeDebug: false);
Assert.False(actual);
}
[Fact]
public void ExtractStream_Empty_False()
{
Stream? stream = new MemoryStream();
string file = string.Empty;
string outDir = string.Empty;
var extractable = new RAR();
bool actual = extractable.Extract(stream, file, outDir, includeDebug: false);
Assert.False(actual);
}
[Fact]
public void ExtractStream_LookForHeader_Empty_False()
{
Stream? stream = new MemoryStream();
string file = string.Empty;
string outDir = string.Empty;
var extractable = new RAR();
bool actual = extractable.Extract(stream, file, outDir, lookForHeader: true, includeDebug: false);
Assert.False(actual);
}
}
}

View File

@@ -6,11 +6,14 @@ namespace BinaryObjectScanner.Test.FileType
{
public class RealArcadeInstallerTests
{
private static readonly SabreTools.Serialization.Wrappers.RealArcadeInstaller wrapper
= new(new SabreTools.Data.Models.RealArcade.RgsFile(), new MemoryStream(new byte[1024]));
[Fact]
public void DetectFile_EmptyString_Null()
{
string file = string.Empty;
var detectable = new RealArcadeInstaller();
var detectable = new RealArcadeInstaller(wrapper);
string? actual = detectable.Detect(file, includeDebug: false);
Assert.Null(actual);
@@ -21,11 +24,10 @@ namespace BinaryObjectScanner.Test.FileType
{
Stream? stream = new MemoryStream();
string file = string.Empty;
var detectable = new RealArcadeInstaller();
var detectable = new RealArcadeInstaller(wrapper);
string? actual = detectable.Detect(stream, file, includeDebug: false);
Assert.Null(actual);
Assert.Equal("RealArcade Installer", actual);
}
}
}

View File

@@ -6,11 +6,14 @@ namespace BinaryObjectScanner.Test.FileType
{
public class RealArcadeMezzanineTests
{
private static readonly SabreTools.Serialization.Wrappers.RealArcadeMezzanine wrapper
= new(new SabreTools.Data.Models.RealArcade.Mezzanine(), new MemoryStream(new byte[1024]));
[Fact]
public void DetectFile_EmptyString_Null()
{
string file = string.Empty;
var detectable = new RealArcadeMezzanine();
var detectable = new RealArcadeMezzanine(wrapper);
string? actual = detectable.Detect(file, includeDebug: false);
Assert.Null(actual);
@@ -21,11 +24,10 @@ namespace BinaryObjectScanner.Test.FileType
{
Stream? stream = new MemoryStream();
string file = string.Empty;
var detectable = new RealArcadeMezzanine();
var detectable = new RealArcadeMezzanine(wrapper);
string? actual = detectable.Detect(stream, file, includeDebug: false);
Assert.Null(actual);
Assert.Equal("RealArcade Mezzanine", actual);
}
}
}

View File

@@ -6,11 +6,14 @@ namespace BinaryObjectScanner.Test.FileType
{
public class SFFSTests
{
private static readonly SabreTools.Serialization.Wrappers.SFFS wrapper
= new(new SabreTools.Data.Models.StarForce.FileSystem(), new MemoryStream(new byte[1024]));
[Fact]
public void DetectFile_EmptyString_Null()
{
string file = string.Empty;
var detectable = new SFFS();
var detectable = new SFFS(wrapper);
string? actual = detectable.Detect(file, includeDebug: false);
Assert.Null(actual);
@@ -21,45 +24,10 @@ namespace BinaryObjectScanner.Test.FileType
{
Stream? stream = new MemoryStream();
string file = string.Empty;
var detectable = new SFFS();
var detectable = new SFFS(wrapper);
string? actual = detectable.Detect(stream, file, includeDebug: false);
Assert.Null(actual);
}
[Fact]
public void ExtractFile_EmptyString_False()
{
string file = string.Empty;
string outDir = string.Empty;
var extractable = new SFFS();
bool actual = extractable.Extract(file, outDir, includeDebug: false);
Assert.False(actual);
}
[Fact]
public void ExtractStream_Null_False()
{
Stream? stream = null;
string file = string.Empty;
string outDir = string.Empty;
var extractable = new SFFS();
bool actual = extractable.Extract(stream, file, outDir, includeDebug: false);
Assert.False(actual);
}
[Fact]
public void ExtractStream_Empty_False()
{
Stream? stream = new MemoryStream();
string file = string.Empty;
string outDir = string.Empty;
var extractable = new SFFS();
bool actual = extractable.Extract(stream, file, outDir, includeDebug: false);
Assert.False(actual);
Assert.Equal("StarForce Filesystem Container", actual);
}
}
}

View File

@@ -1,44 +0,0 @@
using System.IO;
using BinaryObjectScanner.FileType;
using Xunit;
namespace BinaryObjectScanner.Test.FileType
{
public class SGATests
{
[Fact]
public void ExtractFile_EmptyString_False()
{
string file = string.Empty;
string outDir = string.Empty;
var extractable = new SGA();
bool actual = extractable.Extract(file, outDir, includeDebug: false);
Assert.False(actual);
}
[Fact]
public void ExtractStream_Null_False()
{
Stream? stream = null;
string file = string.Empty;
string outDir = string.Empty;
var extractable = new SGA();
bool actual = extractable.Extract(stream, file, outDir, includeDebug: false);
Assert.False(actual);
}
[Fact]
public void ExtractStream_Empty_False()
{
Stream? stream = new MemoryStream();
string file = string.Empty;
string outDir = string.Empty;
var extractable = new SGA();
bool actual = extractable.Extract(stream, file, outDir, includeDebug: false);
Assert.False(actual);
}
}
}

View File

@@ -1,79 +0,0 @@
using System.IO;
using BinaryObjectScanner.FileType;
using Xunit;
namespace BinaryObjectScanner.Test.FileType
{
public class SevenZipTests
{
[Fact]
public void ExtractFile_EmptyString_False()
{
string file = string.Empty;
string outDir = string.Empty;
var extractable = new SevenZip();
bool actual = extractable.Extract(file, outDir, includeDebug: false);
Assert.False(actual);
}
[Fact]
public void ExtractFile_LookForHeader_EmptyString_False()
{
string file = string.Empty;
string outDir = string.Empty;
var extractable = new SevenZip();
bool actual = extractable.Extract(file, outDir, lookForHeader: true, includeDebug: false);
Assert.False(actual);
}
[Fact]
public void ExtractStream_Null_False()
{
Stream? stream = null;
string file = string.Empty;
string outDir = string.Empty;
var extractable = new SevenZip();
bool actual = extractable.Extract(stream, file, outDir, includeDebug: false);
Assert.False(actual);
}
[Fact]
public void ExtractStream_LookForHeader_Null_False()
{
Stream? stream = null;
string file = string.Empty;
string outDir = string.Empty;
var extractable = new SevenZip();
bool actual = extractable.Extract(stream, file, outDir, lookForHeader: true, includeDebug: false);
Assert.False(actual);
}
[Fact]
public void ExtractStream_Empty_False()
{
Stream? stream = new MemoryStream();
string file = string.Empty;
string outDir = string.Empty;
var extractable = new SevenZip();
bool actual = extractable.Extract(stream, file, outDir, includeDebug: false);
Assert.False(actual);
}
[Fact]
public void ExtractStream_LookForHeader_Empty_False()
{
Stream? stream = new MemoryStream();
string file = string.Empty;
string outDir = string.Empty;
var extractable = new SevenZip();
bool actual = extractable.Extract(stream, file, outDir, lookForHeader: true, includeDebug: false);
Assert.False(actual);
}
}
}

View File

@@ -1,46 +0,0 @@
using System.IO;
using BinaryObjectScanner.FileType;
using Xunit;
namespace BinaryObjectScanner.Test.FileType
{
public class TapeArchiveTests
{
[Fact]
public void ExtractFile_EmptyString_False()
{
string file = string.Empty;
string outDir = string.Empty;
var extractable = new TapeArchive();
bool actual = extractable.Extract(file, outDir, includeDebug: false);
Assert.False(actual);
}
[Fact]
public void ExtractStream_Null_False()
{
Stream? stream = null;
string file = string.Empty;
string outDir = string.Empty;
var extractable = new TapeArchive();
bool actual = extractable.Extract(stream, file, outDir, includeDebug: false);
Assert.False(actual);
}
[Fact]
public void ExtractStream_Empty_True()
{
Stream? stream = new MemoryStream();
string file = string.Empty;
string outDir = string.Empty;
var extractable = new TapeArchive();
bool actual = extractable.Extract(stream, file, outDir, includeDebug: false);
// Unexpected result -- Empty file recognized as valid in SharpCompress
Assert.True(actual);
}
}
}

View File

@@ -28,4 +28,3 @@ namespace BinaryObjectScanner.Test.FileType
}
}
}

View File

@@ -1,44 +0,0 @@
using System.IO;
using BinaryObjectScanner.FileType;
using Xunit;
namespace BinaryObjectScanner.Test.FileType
{
public class VBSPTests
{
[Fact]
public void ExtractFile_EmptyString_False()
{
string file = string.Empty;
string outDir = string.Empty;
var extractable = new VBSP();
bool actual = extractable.Extract(file, outDir, includeDebug: false);
Assert.False(actual);
}
[Fact]
public void ExtractStream_Null_False()
{
Stream? stream = null;
string file = string.Empty;
string outDir = string.Empty;
var extractable = new VBSP();
bool actual = extractable.Extract(stream, file, outDir, includeDebug: false);
Assert.False(actual);
}
[Fact]
public void ExtractStream_Empty_False()
{
Stream? stream = new MemoryStream();
string file = string.Empty;
string outDir = string.Empty;
var extractable = new VBSP();
bool actual = extractable.Extract(stream, file, outDir, includeDebug: false);
Assert.False(actual);
}
}
}

View File

@@ -1,44 +0,0 @@
using System.IO;
using BinaryObjectScanner.FileType;
using Xunit;
namespace BinaryObjectScanner.Test.FileType
{
public class VPKTests
{
[Fact]
public void ExtractFile_EmptyString_False()
{
string file = string.Empty;
string outDir = string.Empty;
var extractable = new VPK();
bool actual = extractable.Extract(file, outDir, includeDebug: false);
Assert.False(actual);
}
[Fact]
public void ExtractStream_Null_False()
{
Stream? stream = null;
string file = string.Empty;
string outDir = string.Empty;
var extractable = new VPK();
bool actual = extractable.Extract(stream, file, outDir, includeDebug: false);
Assert.False(actual);
}
[Fact]
public void ExtractStream_Empty_False()
{
Stream? stream = new MemoryStream();
string file = string.Empty;
string outDir = string.Empty;
var extractable = new VPK();
bool actual = extractable.Extract(stream, file, outDir, includeDebug: false);
Assert.False(actual);
}
}
}

View File

@@ -1,44 +0,0 @@
using System.IO;
using BinaryObjectScanner.FileType;
using Xunit;
namespace BinaryObjectScanner.Test.FileType
{
public class WAD3Tests
{
[Fact]
public void ExtractFile_EmptyString_False()
{
string file = string.Empty;
string outDir = string.Empty;
var extractable = new WAD3();
bool actual = extractable.Extract(file, outDir, includeDebug: false);
Assert.False(actual);
}
[Fact]
public void ExtractStream_Null_False()
{
Stream? stream = null;
string file = string.Empty;
string outDir = string.Empty;
var extractable = new WAD3();
bool actual = extractable.Extract(stream, file, outDir, includeDebug: false);
Assert.False(actual);
}
[Fact]
public void ExtractStream_Empty_False()
{
Stream? stream = new MemoryStream();
string file = string.Empty;
string outDir = string.Empty;
var extractable = new WAD3();
bool actual = extractable.Extract(stream, file, outDir, includeDebug: false);
Assert.False(actual);
}
}
}

View File

@@ -1,44 +0,0 @@
using System.IO;
using BinaryObjectScanner.FileType;
using Xunit;
namespace BinaryObjectScanner.Test.FileType
{
public class XZPTests
{
[Fact]
public void ExtractFile_EmptyString_False()
{
string file = string.Empty;
string outDir = string.Empty;
var extractable = new XZP();
bool actual = extractable.Extract(file, outDir, includeDebug: false);
Assert.False(actual);
}
[Fact]
public void ExtractStream_Null_False()
{
Stream? stream = null;
string file = string.Empty;
string outDir = string.Empty;
var extractable = new XZP();
bool actual = extractable.Extract(stream, file, outDir, includeDebug: false);
Assert.False(actual);
}
[Fact]
public void ExtractStream_Empty_False()
{
Stream? stream = new MemoryStream();
string file = string.Empty;
string outDir = string.Empty;
var extractable = new XZP();
bool actual = extractable.Extract(stream, file, outDir, includeDebug: false);
Assert.False(actual);
}
}
}

View File

@@ -1,44 +0,0 @@
using System.IO;
using BinaryObjectScanner.FileType;
using Xunit;
namespace BinaryObjectScanner.Test.FileType
{
public class XZTests
{
[Fact]
public void ExtractFile_EmptyString_False()
{
string file = string.Empty;
string outDir = string.Empty;
var extractable = new XZ();
bool actual = extractable.Extract(file, outDir, includeDebug: false);
Assert.False(actual);
}
[Fact]
public void ExtractStream_Null_False()
{
Stream? stream = null;
string file = string.Empty;
string outDir = string.Empty;
var extractable = new XZ();
bool actual = extractable.Extract(stream, file, outDir, includeDebug: false);
Assert.False(actual);
}
[Fact]
public void ExtractStream_Empty_False()
{
Stream? stream = new MemoryStream();
string file = string.Empty;
string outDir = string.Empty;
var extractable = new XZ();
bool actual = extractable.Extract(stream, file, outDir, includeDebug: false);
Assert.False(actual);
}
}
}

View File

@@ -10,13 +10,13 @@ namespace BinaryObjectScanner.Test.GameEngine
public void CheckPortableExecutableTest()
{
string file = "filename";
SabreTools.Models.PortableExecutable.Executable model = new();
Stream source = new MemoryStream();
SabreTools.Serialization.Wrappers.PortableExecutable pex = new(model, source);
SabreTools.Data.Models.PortableExecutable.Executable model = new();
Stream source = new MemoryStream(new byte[1024]);
SabreTools.Serialization.Wrappers.PortableExecutable exe = new(model, source);
var checker = new RenderWare();
string? actual = checker.CheckExecutable(file, pex, includeDebug: false);
string? actual = checker.CheckExecutable(file, exe, includeDebug: false);
Assert.Null(actual);
}
}
}
}

View File

@@ -10,27 +10,13 @@ namespace BinaryObjectScanner.Test.Packer
public void CheckPortableExecutableTest()
{
string file = "filename";
SabreTools.Models.PortableExecutable.Executable model = new();
Stream source = new MemoryStream();
SabreTools.Serialization.Wrappers.PortableExecutable pex = new(model, source);
SabreTools.Data.Models.PortableExecutable.Executable model = new();
Stream source = new MemoryStream(new byte[1024]);
SabreTools.Serialization.Wrappers.PortableExecutable exe = new(model, source);
var checker = new ASPack();
string? actual = checker.CheckExecutable(file, pex, includeDebug: false);
string? actual = checker.CheckExecutable(file, exe, includeDebug: false);
Assert.Null(actual);
}
[Fact]
public void ExtractPortableExecutableTest()
{
string file = "filename";
SabreTools.Models.PortableExecutable.Executable model = new();
Stream source = new MemoryStream();
SabreTools.Serialization.Wrappers.PortableExecutable pex = new(model, source);
string outputDir = string.Empty;
var checker = new ASPack();
bool actual = checker.Extract(file, pex, outputDir, includeDebug: false);
Assert.False(actual);
}
}
}
}

View File

@@ -10,27 +10,13 @@ namespace BinaryObjectScanner.Test.Packer
public void CheckPortableExecutableTest()
{
string file = "filename";
SabreTools.Models.PortableExecutable.Executable model = new();
Stream source = new MemoryStream();
SabreTools.Serialization.Wrappers.PortableExecutable pex = new(model, source);
SabreTools.Data.Models.PortableExecutable.Executable model = new();
Stream source = new MemoryStream(new byte[1024]);
SabreTools.Serialization.Wrappers.PortableExecutable exe = new(model, source);
var checker = new AdvancedInstaller();
string? actual = checker.CheckExecutable(file, pex, includeDebug: false);
string? actual = checker.CheckExecutable(file, exe, includeDebug: false);
Assert.Null(actual);
}
[Fact]
public void ExtractPortableExecutableTest()
{
string file = "filename";
SabreTools.Models.PortableExecutable.Executable model = new();
Stream source = new MemoryStream();
SabreTools.Serialization.Wrappers.PortableExecutable pex = new(model, source);
string outputDir = string.Empty;
var checker = new AdvancedInstaller();
bool actual = checker.Extract(file, pex, outputDir, includeDebug: false);
Assert.False(actual);
}
}
}
}

View File

@@ -10,27 +10,13 @@ namespace BinaryObjectScanner.Test.Packer
public void CheckPortableExecutableTest()
{
string file = "filename";
SabreTools.Models.PortableExecutable.Executable model = new();
Stream source = new MemoryStream();
SabreTools.Serialization.Wrappers.PortableExecutable pex = new(model, source);
SabreTools.Data.Models.PortableExecutable.Executable model = new();
Stream source = new MemoryStream(new byte[1024]);
SabreTools.Serialization.Wrappers.PortableExecutable exe = new(model, source);
var checker = new AutoPlayMediaStudio();
string? actual = checker.CheckExecutable(file, pex, includeDebug: false);
string? actual = checker.CheckExecutable(file, exe, includeDebug: false);
Assert.Null(actual);
}
[Fact]
public void ExtractPortableExecutableTest()
{
string file = "filename";
SabreTools.Models.PortableExecutable.Executable model = new();
Stream source = new MemoryStream();
SabreTools.Serialization.Wrappers.PortableExecutable pex = new(model, source);
string outputDir = string.Empty;
var checker = new AutoPlayMediaStudio();
bool actual = checker.Extract(file, pex, outputDir, includeDebug: false);
Assert.False(actual);
}
}
}
}

View File

@@ -10,27 +10,13 @@ namespace BinaryObjectScanner.Test.Packer
public void CheckPortableExecutableTest()
{
string file = "filename";
SabreTools.Models.PortableExecutable.Executable model = new();
Stream source = new MemoryStream();
SabreTools.Serialization.Wrappers.PortableExecutable pex = new(model, source);
SabreTools.Data.Models.PortableExecutable.Executable model = new();
Stream source = new MemoryStream(new byte[1024]);
SabreTools.Serialization.Wrappers.PortableExecutable exe = new(model, source);
var checker = new CExe();
string? actual = checker.CheckExecutable(file, pex, includeDebug: false);
string? actual = checker.CheckExecutable(file, exe, includeDebug: false);
Assert.Null(actual);
}
[Fact]
public void ExtractPortableExecutableTest()
{
string file = "filename";
SabreTools.Models.PortableExecutable.Executable model = new();
Stream source = new MemoryStream();
SabreTools.Serialization.Wrappers.PortableExecutable pex = new(model, source);
string outputDir = string.Empty;
var checker = new CExe();
bool actual = checker.Extract(file, pex, outputDir, includeDebug: false);
Assert.False(actual);
}
}
}
}

View File

@@ -0,0 +1,22 @@
using System.IO;
using BinaryObjectScanner.Packer;
using Xunit;
namespace BinaryObjectScanner.Test.Packer
{
public class CrunchTests
{
[Fact]
public void CheckPortableExecutableTest()
{
string file = "filename";
SabreTools.Data.Models.PortableExecutable.Executable model = new();
Stream source = new MemoryStream(new byte[1024]);
SabreTools.Serialization.Wrappers.PortableExecutable exe = new(model, source);
var checker = new Crunch();
string? actual = checker.CheckExecutable(file, exe, includeDebug: false);
Assert.Null(actual);
}
}
}

View File

@@ -10,27 +10,13 @@ namespace BinaryObjectScanner.Test.Packer
public void CheckPortableExecutableTest()
{
string file = "filename";
SabreTools.Models.PortableExecutable.Executable model = new();
Stream source = new MemoryStream();
SabreTools.Serialization.Wrappers.PortableExecutable pex = new(model, source);
SabreTools.Data.Models.PortableExecutable.Executable model = new();
Stream source = new MemoryStream(new byte[1024]);
SabreTools.Serialization.Wrappers.PortableExecutable exe = new(model, source);
var checker = new DotFuscator();
string? actual = checker.CheckExecutable(file, pex, includeDebug: false);
string? actual = checker.CheckExecutable(file, exe, includeDebug: false);
Assert.Null(actual);
}
[Fact]
public void ExtractPortableExecutableTest()
{
string file = "filename";
SabreTools.Models.PortableExecutable.Executable model = new();
Stream source = new MemoryStream();
SabreTools.Serialization.Wrappers.PortableExecutable pex = new(model, source);
string outputDir = string.Empty;
var checker = new DotFuscator();
bool actual = checker.Extract(file, pex, outputDir, includeDebug: false);
Assert.False(actual);
}
}
}
}

View File

@@ -10,27 +10,13 @@ namespace BinaryObjectScanner.Test.Packer
public void CheckPortableExecutableTest()
{
string file = "filename";
SabreTools.Models.PortableExecutable.Executable model = new();
Stream source = new MemoryStream();
SabreTools.Serialization.Wrappers.PortableExecutable pex = new(model, source);
SabreTools.Data.Models.PortableExecutable.Executable model = new();
Stream source = new MemoryStream(new byte[1024]);
SabreTools.Serialization.Wrappers.PortableExecutable exe = new(model, source);
var checker = new DotNetReactor();
string? actual = checker.CheckExecutable(file, pex, includeDebug: false);
string? actual = checker.CheckExecutable(file, exe, includeDebug: false);
Assert.Null(actual);
}
[Fact]
public void ExtractPortableExecutableTest()
{
string file = "filename";
SabreTools.Models.PortableExecutable.Executable model = new();
Stream source = new MemoryStream();
SabreTools.Serialization.Wrappers.PortableExecutable pex = new(model, source);
string outputDir = string.Empty;
var checker = new DotNetReactor();
bool actual = checker.Extract(file, pex, outputDir, includeDebug: false);
Assert.False(actual);
}
}
}
}

View File

@@ -21,27 +21,13 @@ namespace BinaryObjectScanner.Test.Packer
public void CheckPortableExecutableTest()
{
string file = "filename";
SabreTools.Models.PortableExecutable.Executable model = new();
Stream source = new MemoryStream();
SabreTools.Serialization.Wrappers.PortableExecutable pex = new(model, source);
SabreTools.Data.Models.PortableExecutable.Executable model = new();
Stream source = new MemoryStream(new byte[1024]);
SabreTools.Serialization.Wrappers.PortableExecutable exe = new(model, source);
var checker = new EXEStealth();
string? actual = checker.CheckExecutable(file, pex, includeDebug: false);
string? actual = checker.CheckExecutable(file, exe, includeDebug: false);
Assert.Null(actual);
}
[Fact]
public void ExtractPortableExecutableTest()
{
string file = "filename";
SabreTools.Models.PortableExecutable.Executable model = new();
Stream source = new MemoryStream();
SabreTools.Serialization.Wrappers.PortableExecutable pex = new(model, source);
string outputDir = string.Empty;
var checker = new EXEStealth();
bool actual = checker.Extract(file, pex, outputDir, includeDebug: false);
Assert.False(actual);
}
}
}
}

View File

@@ -1,36 +0,0 @@
using System.IO;
using BinaryObjectScanner.Packer;
using Xunit;
namespace BinaryObjectScanner.Test.Packer
{
public class EmbeddedArchiveTests
{
[Fact]
public void CheckPortableExecutableTest()
{
string file = "filename";
SabreTools.Models.PortableExecutable.Executable model = new();
Stream source = new MemoryStream();
SabreTools.Serialization.Wrappers.PortableExecutable pex = new(model, source);
var checker = new EmbeddedArchive();
string? actual = checker.CheckExecutable(file, pex, includeDebug: false);
Assert.Null(actual);
}
[Fact]
public void ExtractPortableExecutableTest()
{
string file = "filename";
SabreTools.Models.PortableExecutable.Executable model = new();
Stream source = new MemoryStream();
SabreTools.Serialization.Wrappers.PortableExecutable pex = new(model, source);
string outputDir = string.Empty;
var checker = new EmbeddedArchive();
bool actual = checker.Extract(file, pex, outputDir, includeDebug: false);
Assert.False(actual);
}
}
}

View File

@@ -1,36 +0,0 @@
using System.IO;
using BinaryObjectScanner.Packer;
using Xunit;
namespace BinaryObjectScanner.Test.Packer
{
public class EmbeddedExecutableTests
{
[Fact]
public void CheckPortableExecutableTest()
{
string file = "filename";
SabreTools.Models.PortableExecutable.Executable model = new();
Stream source = new MemoryStream();
SabreTools.Serialization.Wrappers.PortableExecutable pex = new(model, source);
var checker = new EmbeddedExecutable();
string? actual = checker.CheckExecutable(file, pex, includeDebug: false);
Assert.Null(actual);
}
[Fact]
public void ExtractPortableExecutableTest()
{
string file = "filename";
SabreTools.Models.PortableExecutable.Executable model = new();
Stream source = new MemoryStream();
SabreTools.Serialization.Wrappers.PortableExecutable pex = new(model, source);
string outputDir = string.Empty;
var checker = new EmbeddedExecutable();
bool actual = checker.Extract(file, pex, outputDir, includeDebug: false);
Assert.False(actual);
}
}
}

View File

@@ -0,0 +1,22 @@
using System.IO;
using BinaryObjectScanner.Packer;
using Xunit;
namespace BinaryObjectScanner.Test.Packer
{
public class EmbeddedFileTests
{
[Fact]
public void CheckPortableExecutableTest()
{
string file = "filename";
SabreTools.Data.Models.PortableExecutable.Executable model = new();
Stream source = new MemoryStream(new byte[1024]);
SabreTools.Serialization.Wrappers.PortableExecutable exe = new(model, source);
var checker = new EmbeddedFile();
string? actual = checker.CheckExecutable(file, exe, includeDebug: false);
Assert.Null(actual);
}
}
}

View File

@@ -10,27 +10,13 @@ namespace BinaryObjectScanner.Test.Packer
public void CheckPortableExecutableTest()
{
string file = "filename";
SabreTools.Models.PortableExecutable.Executable model = new();
Stream source = new MemoryStream();
SabreTools.Serialization.Wrappers.PortableExecutable pex = new(model, source);
SabreTools.Data.Models.PortableExecutable.Executable model = new();
Stream source = new MemoryStream(new byte[1024]);
SabreTools.Serialization.Wrappers.PortableExecutable exe = new(model, source);
var checker = new GenteeInstaller();
string? actual = checker.CheckExecutable(file, pex, includeDebug: false);
string? actual = checker.CheckExecutable(file, exe, includeDebug: false);
Assert.Null(actual);
}
[Fact]
public void ExtractPortableExecutableTest()
{
string file = "filename";
SabreTools.Models.PortableExecutable.Executable model = new();
Stream source = new MemoryStream();
SabreTools.Serialization.Wrappers.PortableExecutable pex = new(model, source);
string outputDir = string.Empty;
var checker = new GenteeInstaller();
bool actual = checker.Extract(file, pex, outputDir, includeDebug: false);
Assert.False(actual);
}
}
}
}

View File

@@ -10,27 +10,13 @@ namespace BinaryObjectScanner.Test.Packer
public void CheckPortableExecutableTest()
{
string file = "filename";
SabreTools.Models.PortableExecutable.Executable model = new();
Stream source = new MemoryStream();
SabreTools.Serialization.Wrappers.PortableExecutable pex = new(model, source);
SabreTools.Data.Models.PortableExecutable.Executable model = new();
Stream source = new MemoryStream(new byte[1024]);
SabreTools.Serialization.Wrappers.PortableExecutable exe = new(model, source);
var checker = new HyperTechCrackProof();
string? actual = checker.CheckExecutable(file, pex, includeDebug: false);
string? actual = checker.CheckExecutable(file, exe, includeDebug: false);
Assert.Null(actual);
}
[Fact]
public void ExtractPortableExecutableTest()
{
string file = "filename";
SabreTools.Models.PortableExecutable.Executable model = new();
Stream source = new MemoryStream();
SabreTools.Serialization.Wrappers.PortableExecutable pex = new(model, source);
string outputDir = string.Empty;
var checker = new HyperTechCrackProof();
bool actual = checker.Extract(file, pex, outputDir, includeDebug: false);
Assert.False(actual);
}
}
}
}

View File

@@ -10,12 +10,12 @@ namespace BinaryObjectScanner.Test.Packer
public void CheckNewExecutableTest()
{
string file = "filename";
SabreTools.Models.NewExecutable.Executable model = new();
Stream source = new MemoryStream();
SabreTools.Serialization.Wrappers.NewExecutable nex = new(model, source);
SabreTools.Data.Models.NewExecutable.Executable model = new();
Stream source = new MemoryStream(new byte[1024]);
SabreTools.Serialization.Wrappers.NewExecutable exe = new(model, source);
var checker = new InnoSetup();
string? actual = checker.CheckExecutable(file, nex, includeDebug: false);
string? actual = checker.CheckExecutable(file, exe, includeDebug: false);
Assert.Null(actual);
}
@@ -23,41 +23,13 @@ namespace BinaryObjectScanner.Test.Packer
public void CheckPortableExecutableTest()
{
string file = "filename";
SabreTools.Models.PortableExecutable.Executable model = new();
Stream source = new MemoryStream();
SabreTools.Serialization.Wrappers.PortableExecutable pex = new(model, source);
SabreTools.Data.Models.PortableExecutable.Executable model = new();
Stream source = new MemoryStream(new byte[1024]);
SabreTools.Serialization.Wrappers.PortableExecutable exe = new(model, source);
var checker = new InnoSetup();
string? actual = checker.CheckExecutable(file, pex, includeDebug: false);
string? actual = checker.CheckExecutable(file, exe, includeDebug: false);
Assert.Null(actual);
}
[Fact]
public void ExtractNewExecutableTest()
{
string file = "filename";
SabreTools.Models.NewExecutable.Executable model = new();
Stream source = new MemoryStream();
SabreTools.Serialization.Wrappers.NewExecutable nex = new(model, source);
string outputDir = string.Empty;
var checker = new InnoSetup();
bool actual = checker.Extract(file, nex, outputDir, includeDebug: false);
Assert.False(actual);
}
[Fact]
public void ExtractPortableExecutableTest()
{
string file = "filename";
SabreTools.Models.PortableExecutable.Executable model = new();
Stream source = new MemoryStream();
SabreTools.Serialization.Wrappers.PortableExecutable pex = new(model, source);
string outputDir = string.Empty;
var checker = new InnoSetup();
bool actual = checker.Extract(file, pex, outputDir, includeDebug: false);
Assert.False(actual);
}
}
}
}

View File

@@ -10,27 +10,13 @@ namespace BinaryObjectScanner.Test.Packer
public void CheckPortableExecutableTest()
{
string file = "filename";
SabreTools.Models.PortableExecutable.Executable model = new();
Stream source = new MemoryStream();
SabreTools.Serialization.Wrappers.PortableExecutable pex = new(model, source);
SabreTools.Data.Models.PortableExecutable.Executable model = new();
Stream source = new MemoryStream(new byte[1024]);
SabreTools.Serialization.Wrappers.PortableExecutable exe = new(model, source);
var checker = new InstallAnywhere();
string? actual = checker.CheckExecutable(file, pex, includeDebug: false);
string? actual = checker.CheckExecutable(file, exe, includeDebug: false);
Assert.Null(actual);
}
[Fact]
public void ExtractPortableExecutableTest()
{
string file = "filename";
SabreTools.Models.PortableExecutable.Executable model = new();
Stream source = new MemoryStream();
SabreTools.Serialization.Wrappers.PortableExecutable pex = new(model, source);
string outputDir = string.Empty;
var checker = new InstallAnywhere();
bool actual = checker.Extract(file, pex, outputDir, includeDebug: false);
Assert.False(actual);
}
}
}
}

View File

@@ -10,27 +10,13 @@ namespace BinaryObjectScanner.Test.Packer
public void CheckPortableExecutableTest()
{
string file = "filename";
SabreTools.Models.PortableExecutable.Executable model = new();
Stream source = new MemoryStream();
SabreTools.Serialization.Wrappers.PortableExecutable pex = new(model, source);
SabreTools.Data.Models.PortableExecutable.Executable model = new();
Stream source = new MemoryStream(new byte[1024]);
SabreTools.Serialization.Wrappers.PortableExecutable exe = new(model, source);
var checker = new InstallerVISE();
string? actual = checker.CheckExecutable(file, pex, includeDebug: false);
string? actual = checker.CheckExecutable(file, exe, includeDebug: false);
Assert.Null(actual);
}
[Fact]
public void ExtractPortableExecutableTest()
{
string file = "filename";
SabreTools.Models.PortableExecutable.Executable model = new();
Stream source = new MemoryStream();
SabreTools.Serialization.Wrappers.PortableExecutable pex = new(model, source);
string outputDir = string.Empty;
var checker = new InstallerVISE();
bool actual = checker.Extract(file, pex, outputDir, includeDebug: false);
Assert.False(actual);
}
}
}
}

View File

@@ -10,27 +10,13 @@ namespace BinaryObjectScanner.Test.Packer
public void CheckPortableExecutableTest()
{
string file = "filename";
SabreTools.Models.PortableExecutable.Executable model = new();
Stream source = new MemoryStream();
SabreTools.Serialization.Wrappers.PortableExecutable pex = new(model, source);
SabreTools.Data.Models.PortableExecutable.Executable model = new();
Stream source = new MemoryStream(new byte[1024]);
SabreTools.Serialization.Wrappers.PortableExecutable exe = new(model, source);
var checker = new IntelInstallationFramework();
string? actual = checker.CheckExecutable(file, pex, includeDebug: false);
string? actual = checker.CheckExecutable(file, exe, includeDebug: false);
Assert.Null(actual);
}
[Fact]
public void ExtractPortableExecutableTest()
{
string file = "filename";
SabreTools.Models.PortableExecutable.Executable model = new();
Stream source = new MemoryStream();
SabreTools.Serialization.Wrappers.PortableExecutable pex = new(model, source);
string outputDir = string.Empty;
var checker = new IntelInstallationFramework();
bool actual = checker.Extract(file, pex, outputDir, includeDebug: false);
Assert.False(actual);
}
}
}
}

View File

@@ -10,27 +10,13 @@ namespace BinaryObjectScanner.Test.Packer
public void CheckPortableExecutableTest()
{
string file = "filename";
SabreTools.Models.PortableExecutable.Executable model = new();
Stream source = new MemoryStream();
SabreTools.Serialization.Wrappers.PortableExecutable pex = new(model, source);
SabreTools.Data.Models.PortableExecutable.Executable model = new();
Stream source = new MemoryStream(new byte[1024]);
SabreTools.Serialization.Wrappers.PortableExecutable exe = new(model, source);
var checker = new MicrosoftCABSFX();
string? actual = checker.CheckExecutable(file, pex, includeDebug: false);
string? actual = checker.CheckExecutable(file, exe, includeDebug: false);
Assert.Null(actual);
}
[Fact]
public void ExtractPortableExecutableTest()
{
string file = "filename";
SabreTools.Models.PortableExecutable.Executable model = new();
Stream source = new MemoryStream();
SabreTools.Serialization.Wrappers.PortableExecutable pex = new(model, source);
string outputDir = string.Empty;
var checker = new MicrosoftCABSFX();
bool actual = checker.Extract(file, pex, outputDir, includeDebug: false);
Assert.False(actual);
}
}
}
}

View File

@@ -10,27 +10,13 @@ namespace BinaryObjectScanner.Test.Packer
public void CheckPortableExecutableTest()
{
string file = "filename";
SabreTools.Models.PortableExecutable.Executable model = new();
Stream source = new MemoryStream();
SabreTools.Serialization.Wrappers.PortableExecutable pex = new(model, source);
SabreTools.Data.Models.PortableExecutable.Executable model = new();
Stream source = new MemoryStream(new byte[1024]);
SabreTools.Serialization.Wrappers.PortableExecutable exe = new(model, source);
var checker = new NSIS();
string? actual = checker.CheckExecutable(file, pex, includeDebug: false);
string? actual = checker.CheckExecutable(file, exe, includeDebug: false);
Assert.Null(actual);
}
[Fact]
public void ExtractPortableExecutableTest()
{
string file = "filename";
SabreTools.Models.PortableExecutable.Executable model = new();
Stream source = new MemoryStream();
SabreTools.Serialization.Wrappers.PortableExecutable pex = new(model, source);
string outputDir = string.Empty;
var checker = new NSIS();
bool actual = checker.Extract(file, pex, outputDir, includeDebug: false);
Assert.False(actual);
}
}
}
}

View File

@@ -10,27 +10,13 @@ namespace BinaryObjectScanner.Test.Packer
public void CheckPortableExecutableTest()
{
string file = "filename";
SabreTools.Models.PortableExecutable.Executable model = new();
Stream source = new MemoryStream();
SabreTools.Serialization.Wrappers.PortableExecutable pex = new(model, source);
SabreTools.Data.Models.PortableExecutable.Executable model = new();
Stream source = new MemoryStream(new byte[1024]);
SabreTools.Serialization.Wrappers.PortableExecutable exe = new(model, source);
var checker = new NeoLite();
string? actual = checker.CheckExecutable(file, pex, includeDebug: false);
string? actual = checker.CheckExecutable(file, exe, includeDebug: false);
Assert.Null(actual);
}
[Fact]
public void ExtractPortableExecutableTest()
{
string file = "filename";
SabreTools.Models.PortableExecutable.Executable model = new();
Stream source = new MemoryStream();
SabreTools.Serialization.Wrappers.PortableExecutable pex = new(model, source);
string outputDir = string.Empty;
var checker = new NeoLite();
bool actual = checker.Extract(file, pex, outputDir, includeDebug: false);
Assert.False(actual);
}
}
}
}

View File

@@ -10,27 +10,13 @@ namespace BinaryObjectScanner.Test.Packer
public void CheckPortableExecutableTest()
{
string file = "filename";
SabreTools.Models.PortableExecutable.Executable model = new();
Stream source = new MemoryStream();
SabreTools.Serialization.Wrappers.PortableExecutable pex = new(model, source);
SabreTools.Data.Models.PortableExecutable.Executable model = new();
Stream source = new MemoryStream(new byte[1024]);
SabreTools.Serialization.Wrappers.PortableExecutable exe = new(model, source);
var checker = new PECompact();
string? actual = checker.CheckExecutable(file, pex, includeDebug: false);
string? actual = checker.CheckExecutable(file, exe, includeDebug: false);
Assert.Null(actual);
}
[Fact]
public void ExtractPortableExecutableTest()
{
string file = "filename";
SabreTools.Models.PortableExecutable.Executable model = new();
Stream source = new MemoryStream();
SabreTools.Serialization.Wrappers.PortableExecutable pex = new(model, source);
string outputDir = string.Empty;
var checker = new PECompact();
bool actual = checker.Extract(file, pex, outputDir, includeDebug: false);
Assert.False(actual);
}
}
}
}

View File

@@ -10,27 +10,13 @@ namespace BinaryObjectScanner.Test.Packer
public void CheckPortableExecutableTest()
{
string file = "filename";
SabreTools.Models.PortableExecutable.Executable model = new();
Stream source = new MemoryStream();
SabreTools.Serialization.Wrappers.PortableExecutable pex = new(model, source);
SabreTools.Data.Models.PortableExecutable.Executable model = new();
Stream source = new MemoryStream(new byte[1024]);
SabreTools.Serialization.Wrappers.PortableExecutable exe = new(model, source);
var checker = new PEtite();
string? actual = checker.CheckExecutable(file, pex, includeDebug: false);
string? actual = checker.CheckExecutable(file, exe, includeDebug: false);
Assert.Null(actual);
}
[Fact]
public void ExtractPortableExecutableTest()
{
string file = "filename";
SabreTools.Models.PortableExecutable.Executable model = new();
Stream source = new MemoryStream();
SabreTools.Serialization.Wrappers.PortableExecutable pex = new(model, source);
string outputDir = string.Empty;
var checker = new PEtite();
bool actual = checker.Extract(file, pex, outputDir, includeDebug: false);
Assert.False(actual);
}
}
}
}

View File

@@ -10,27 +10,13 @@ namespace BinaryObjectScanner.Test.Packer
public void CheckPortableExecutableTest()
{
string file = "filename";
SabreTools.Models.PortableExecutable.Executable model = new();
Stream source = new MemoryStream();
SabreTools.Serialization.Wrappers.PortableExecutable pex = new(model, source);
SabreTools.Data.Models.PortableExecutable.Executable model = new();
Stream source = new MemoryStream(new byte[1024]);
SabreTools.Serialization.Wrappers.PortableExecutable exe = new(model, source);
var checker = new SetupFactory();
string? actual = checker.CheckExecutable(file, pex, includeDebug: false);
string? actual = checker.CheckExecutable(file, exe, includeDebug: false);
Assert.Null(actual);
}
[Fact]
public void ExtractPortableExecutableTest()
{
string file = "filename";
SabreTools.Models.PortableExecutable.Executable model = new();
Stream source = new MemoryStream();
SabreTools.Serialization.Wrappers.PortableExecutable pex = new(model, source);
string outputDir = string.Empty;
var checker = new SetupFactory();
bool actual = checker.Extract(file, pex, outputDir, includeDebug: false);
Assert.False(actual);
}
}
}
}

View File

@@ -10,27 +10,13 @@ namespace BinaryObjectScanner.Test.Packer
public void CheckPortableExecutableTest()
{
string file = "filename";
SabreTools.Models.PortableExecutable.Executable model = new();
Stream source = new MemoryStream();
SabreTools.Serialization.Wrappers.PortableExecutable pex = new(model, source);
SabreTools.Data.Models.PortableExecutable.Executable model = new();
Stream source = new MemoryStream(new byte[1024]);
SabreTools.Serialization.Wrappers.PortableExecutable exe = new(model, source);
var checker = new SevenZipSFX();
string? actual = checker.CheckExecutable(file, pex, includeDebug: false);
string? actual = checker.CheckExecutable(file, exe, includeDebug: false);
Assert.Null(actual);
}
[Fact]
public void ExtractPortableExecutableTest()
{
string file = "filename";
SabreTools.Models.PortableExecutable.Executable model = new();
Stream source = new MemoryStream();
SabreTools.Serialization.Wrappers.PortableExecutable pex = new(model, source);
string outputDir = string.Empty;
var checker = new SevenZipSFX();
bool actual = checker.Extract(file, pex, outputDir, includeDebug: false);
Assert.False(actual);
}
}
}
}

View File

@@ -10,27 +10,13 @@ namespace BinaryObjectScanner.Test.Packer
public void CheckPortableExecutableTest()
{
string file = "filename";
SabreTools.Models.PortableExecutable.Executable model = new();
Stream source = new MemoryStream();
SabreTools.Serialization.Wrappers.PortableExecutable pex = new(model, source);
SabreTools.Data.Models.PortableExecutable.Executable model = new();
Stream source = new MemoryStream(new byte[1024]);
SabreTools.Serialization.Wrappers.PortableExecutable exe = new(model, source);
var checker = new Shrinker();
string? actual = checker.CheckExecutable(file, pex, includeDebug: false);
string? actual = checker.CheckExecutable(file, exe, includeDebug: false);
Assert.Null(actual);
}
[Fact]
public void ExtractPortableExecutableTest()
{
string file = "filename";
SabreTools.Models.PortableExecutable.Executable model = new();
Stream source = new MemoryStream();
SabreTools.Serialization.Wrappers.PortableExecutable pex = new(model, source);
string outputDir = string.Empty;
var checker = new Shrinker();
bool actual = checker.Extract(file, pex, outputDir, includeDebug: false);
Assert.False(actual);
}
}
}
}

View File

@@ -10,27 +10,13 @@ namespace BinaryObjectScanner.Test.Packer
public void CheckPortableExecutableTest()
{
string file = "filename";
SabreTools.Models.PortableExecutable.Executable model = new();
Stream source = new MemoryStream();
SabreTools.Serialization.Wrappers.PortableExecutable pex = new(model, source);
SabreTools.Data.Models.PortableExecutable.Executable model = new();
Stream source = new MemoryStream(new byte[1024]);
SabreTools.Serialization.Wrappers.PortableExecutable exe = new(model, source);
var checker = new UPX();
string? actual = checker.CheckExecutable(file, pex, includeDebug: false);
string? actual = checker.CheckExecutable(file, exe, includeDebug: false);
Assert.Null(actual);
}
[Fact]
public void ExtractPortableExecutableTest()
{
string file = "filename";
SabreTools.Models.PortableExecutable.Executable model = new();
Stream source = new MemoryStream();
SabreTools.Serialization.Wrappers.PortableExecutable pex = new(model, source);
string outputDir = string.Empty;
var checker = new UPX();
bool actual = checker.Extract(file, pex, outputDir, includeDebug: false);
Assert.False(actual);
}
}
}
}

View File

@@ -10,27 +10,13 @@ namespace BinaryObjectScanner.Test.Packer
public void CheckPortableExecutableTest()
{
string file = "filename";
SabreTools.Models.PortableExecutable.Executable model = new();
Stream source = new MemoryStream();
SabreTools.Serialization.Wrappers.PortableExecutable pex = new(model, source);
SabreTools.Data.Models.PortableExecutable.Executable model = new();
Stream source = new MemoryStream(new byte[1024]);
SabreTools.Serialization.Wrappers.PortableExecutable exe = new(model, source);
var checker = new WinRARSFX();
string? actual = checker.CheckExecutable(file, pex, includeDebug: false);
string? actual = checker.CheckExecutable(file, exe, includeDebug: false);
Assert.Null(actual);
}
[Fact]
public void ExtractPortableExecutableTest()
{
string file = "filename";
SabreTools.Models.PortableExecutable.Executable model = new();
Stream source = new MemoryStream();
SabreTools.Serialization.Wrappers.PortableExecutable pex = new(model, source);
string outputDir = string.Empty;
var checker = new WinRARSFX();
bool actual = checker.Extract(file, pex, outputDir, includeDebug: false);
Assert.False(actual);
}
}
}
}

View File

@@ -10,54 +10,26 @@ namespace BinaryObjectScanner.Test.Packer
public void CheckNewExecutableTest()
{
string file = "filename";
SabreTools.Models.NewExecutable.Executable model = new();
Stream source = new MemoryStream();
SabreTools.Serialization.Wrappers.NewExecutable nex = new(model, source);
SabreTools.Data.Models.NewExecutable.Executable model = new();
Stream source = new MemoryStream(new byte[1024]);
SabreTools.Serialization.Wrappers.NewExecutable exe = new(model, source);
var checker = new WinZipSFX();
string? actual = checker.CheckExecutable(file, nex, includeDebug: false);
string? actual = checker.CheckExecutable(file, exe, includeDebug: false);
Assert.Null(actual);
}
[Fact]
public void CheckPortableExecutableTest()
{
string file = "filename";
SabreTools.Models.PortableExecutable.Executable model = new();
Stream source = new MemoryStream();
SabreTools.Serialization.Wrappers.PortableExecutable pex = new(model, source);
SabreTools.Data.Models.PortableExecutable.Executable model = new();
Stream source = new MemoryStream(new byte[1024]);
SabreTools.Serialization.Wrappers.PortableExecutable exe = new(model, source);
var checker = new WinZipSFX();
string? actual = checker.CheckExecutable(file, pex, includeDebug: false);
string? actual = checker.CheckExecutable(file, exe, includeDebug: false);
Assert.Null(actual);
}
[Fact]
public void ExtractNewExecutableTest()
{
string file = "filename";
SabreTools.Models.NewExecutable.Executable model = new();
Stream source = new MemoryStream();
SabreTools.Serialization.Wrappers.NewExecutable nex = new(model, source);
string outputDir = string.Empty;
var checker = new WinZipSFX();
bool actual = checker.Extract(file, nex, outputDir, includeDebug: false);
Assert.False(actual);
}
[Fact]
public void ExtractPortableExecutableTest()
{
string file = "filename";
SabreTools.Models.PortableExecutable.Executable model = new();
Stream source = new MemoryStream();
SabreTools.Serialization.Wrappers.PortableExecutable pex = new(model, source);
string outputDir = string.Empty;
var checker = new WinZipSFX();
bool actual = checker.Extract(file, pex, outputDir, includeDebug: false);
Assert.False(actual);
}
}
}
}

View File

@@ -10,54 +10,26 @@ namespace BinaryObjectScanner.Test.Packer
public void CheckNewExecutableTest()
{
string file = "filename";
SabreTools.Models.NewExecutable.Executable model = new();
Stream source = new MemoryStream();
SabreTools.Serialization.Wrappers.NewExecutable nex = new(model, source);
SabreTools.Data.Models.NewExecutable.Executable model = new();
Stream source = new MemoryStream(new byte[1024]);
SabreTools.Serialization.Wrappers.NewExecutable exe = new(model, source);
var checker = new WiseInstaller();
string? actual = checker.CheckExecutable(file, nex, includeDebug: false);
string? actual = checker.CheckExecutable(file, exe, includeDebug: false);
Assert.Null(actual);
}
[Fact]
public void CheckPortableExecutableTest()
{
string file = "filename";
SabreTools.Models.PortableExecutable.Executable model = new();
Stream source = new MemoryStream();
SabreTools.Serialization.Wrappers.PortableExecutable pex = new(model, source);
SabreTools.Data.Models.PortableExecutable.Executable model = new();
Stream source = new MemoryStream(new byte[1024]);
SabreTools.Serialization.Wrappers.PortableExecutable exe = new(model, source);
var checker = new WiseInstaller();
string? actual = checker.CheckExecutable(file, pex, includeDebug: false);
string? actual = checker.CheckExecutable(file, exe, includeDebug: false);
Assert.Null(actual);
}
[Fact]
public void ExtractNewExecutableTest()
{
string file = "filename";
SabreTools.Models.NewExecutable.Executable model = new();
Stream source = new MemoryStream();
SabreTools.Serialization.Wrappers.NewExecutable nex = new(model, source);
string outputDir = string.Empty;
var checker = new WiseInstaller();
bool actual = checker.Extract(file, nex, outputDir, includeDebug: false);
Assert.False(actual);
}
[Fact]
public void ExtractPortableExecutableTest()
{
string file = "filename";
SabreTools.Models.PortableExecutable.Executable model = new();
Stream source = new MemoryStream();
SabreTools.Serialization.Wrappers.PortableExecutable pex = new(model, source);
string outputDir = string.Empty;
var checker = new WiseInstaller();
bool actual = checker.Extract(file, pex, outputDir, includeDebug: false);
Assert.False(actual);
}
}
}
}

View File

@@ -21,13 +21,13 @@ namespace BinaryObjectScanner.Test.Protection
public void CheckPortableExecutableTest()
{
string file = "filename";
SabreTools.Models.PortableExecutable.Executable model = new();
Stream source = new MemoryStream();
SabreTools.Serialization.Wrappers.PortableExecutable pex = new(model, source);
SabreTools.Data.Models.PortableExecutable.Executable model = new();
Stream source = new MemoryStream(new byte[1024]);
SabreTools.Serialization.Wrappers.PortableExecutable exe = new(model, source);
var checker = new ActiveMARK();
string? actual = checker.CheckExecutable(file, pex, includeDebug: false);
string? actual = checker.CheckExecutable(file, exe, includeDebug: false);
Assert.Null(actual);
}
}
}
}

View File

@@ -11,12 +11,12 @@ namespace BinaryObjectScanner.Test.Protection
public void CheckPortableExecutableTest()
{
string file = "filename";
SabreTools.Models.PortableExecutable.Executable model = new();
Stream source = new MemoryStream();
SabreTools.Serialization.Wrappers.PortableExecutable pex = new(model, source);
SabreTools.Data.Models.PortableExecutable.Executable model = new();
Stream source = new MemoryStream(new byte[1024]);
SabreTools.Serialization.Wrappers.PortableExecutable exe = new(model, source);
var checker = new AegiSoft();
string? actual = checker.CheckExecutable(file, pex, includeDebug: false);
string? actual = checker.CheckExecutable(file, exe, includeDebug: false);
Assert.Null(actual);
}
@@ -41,4 +41,4 @@ namespace BinaryObjectScanner.Test.Protection
Assert.Null(actual);
}
}
}
}

View File

@@ -27,4 +27,4 @@ namespace BinaryObjectScanner.Test.Protection
Assert.Null(actual);
}
}
}
}

View File

@@ -10,13 +10,26 @@ namespace BinaryObjectScanner.Test.Protection
public void CheckPortableExecutableTest()
{
string file = "filename";
SabreTools.Models.PortableExecutable.Executable model = new();
Stream source = new MemoryStream();
SabreTools.Serialization.Wrappers.PortableExecutable pex = new(model, source);
SabreTools.Data.Models.PortableExecutable.Executable model = new();
Stream source = new MemoryStream(new byte[1024]);
SabreTools.Serialization.Wrappers.PortableExecutable exe = new(model, source);
var checker = new AlphaROM();
string? actual = checker.CheckExecutable(file, pex, includeDebug: false);
string? actual = checker.CheckExecutable(file, exe, includeDebug: false);
Assert.Null(actual);
}
[Fact]
public void CheckDiskImageTest()
{
string file = "filename";
SabreTools.Data.Models.ISO9660.Volume model = new();
Stream source = new MemoryStream(new byte[1024]);
SabreTools.Serialization.Wrappers.ISO9660 iso = new(model, source);
var checker = new AlphaROM();
string? actual = checker.CheckDiskImage(file, iso, includeDebug: false);
Assert.Null(actual);
}
}
}
}

View File

@@ -10,27 +10,13 @@ namespace BinaryObjectScanner.Test.Protection
public void CheckPortableExecutableTest()
{
string file = "filename";
SabreTools.Models.PortableExecutable.Executable model = new();
Stream source = new MemoryStream();
SabreTools.Serialization.Wrappers.PortableExecutable pex = new(model, source);
SabreTools.Data.Models.PortableExecutable.Executable model = new();
Stream source = new MemoryStream(new byte[1024]);
SabreTools.Serialization.Wrappers.PortableExecutable exe = new(model, source);
var checker = new Armadillo();
string? actual = checker.CheckExecutable(file, pex, includeDebug: false);
string? actual = checker.CheckExecutable(file, exe, includeDebug: false);
Assert.Null(actual);
}
[Fact]
public void ExtractPortableExecutableTest()
{
string file = "filename";
SabreTools.Models.PortableExecutable.Executable model = new();
Stream source = new MemoryStream();
SabreTools.Serialization.Wrappers.PortableExecutable pex = new(model, source);
string outputDir = string.Empty;
var checker = new Armadillo();
bool actual = checker.Extract(file, pex, outputDir, includeDebug: false);
Assert.False(actual);
}
}
}
}

View File

@@ -27,4 +27,4 @@ namespace BinaryObjectScanner.Test.Protection
Assert.Null(actual);
}
}
}
}

View File

@@ -11,12 +11,12 @@ namespace BinaryObjectScanner.Test.Protection
public void CheckPortableExecutableTest()
{
string file = "filename";
SabreTools.Models.PortableExecutable.Executable model = new();
Stream source = new MemoryStream();
SabreTools.Serialization.Wrappers.PortableExecutable pex = new(model, source);
SabreTools.Data.Models.PortableExecutable.Executable model = new();
Stream source = new MemoryStream(new byte[1024]);
SabreTools.Serialization.Wrappers.PortableExecutable exe = new(model, source);
var checker = new ByteShield();
string? actual = checker.CheckExecutable(file, pex, includeDebug: false);
string? actual = checker.CheckExecutable(file, exe, includeDebug: false);
Assert.Null(actual);
}
@@ -41,4 +41,4 @@ namespace BinaryObjectScanner.Test.Protection
Assert.Null(actual);
}
}
}
}

View File

@@ -10,13 +10,13 @@ namespace BinaryObjectScanner.Test.Protection
public void CheckPortableExecutableTest()
{
string file = "filename";
SabreTools.Models.PortableExecutable.Executable model = new();
Stream source = new MemoryStream();
SabreTools.Serialization.Wrappers.PortableExecutable pex = new(model, source);
SabreTools.Data.Models.PortableExecutable.Executable model = new();
Stream source = new MemoryStream(new byte[1024]);
SabreTools.Serialization.Wrappers.PortableExecutable exe = new(model, source);
var checker = new CDCheck();
string? actual = checker.CheckExecutable(file, pex, includeDebug: false);
string? actual = checker.CheckExecutable(file, exe, includeDebug: false);
Assert.Null(actual);
}
}
}
}

View File

@@ -7,43 +7,32 @@ namespace BinaryObjectScanner.Test.Protection
{
public class CDDVDCopsTests
{
[Fact]
public void CheckContentsTest()
{
string file = "filename";
byte[] fileContent = [0x01, 0x02, 0x03, 0x04];
var checker = new CDDVDCops();
string? actual = checker.CheckContents(file, fileContent, includeDebug: true);
Assert.Null(actual);
}
[Fact]
public void CheckNewExecutableTest()
{
string file = "filename";
SabreTools.Models.NewExecutable.Executable model = new();
Stream source = new MemoryStream();
SabreTools.Serialization.Wrappers.NewExecutable nex = new(model, source);
SabreTools.Data.Models.NewExecutable.Executable model = new();
Stream source = new MemoryStream(new byte[1024]);
SabreTools.Serialization.Wrappers.NewExecutable exe = new(model, source);
var checker = new CDDVDCops();
string? actual = checker.CheckExecutable(file, nex, includeDebug: false);
string? actual = checker.CheckExecutable(file, exe, includeDebug: false);
Assert.Null(actual);
}
[Fact]
public void CheckPortableExecutableTest()
{
string file = "filename";
SabreTools.Models.PortableExecutable.Executable model = new();
Stream source = new MemoryStream();
SabreTools.Serialization.Wrappers.PortableExecutable pex = new(model, source);
SabreTools.Data.Models.PortableExecutable.Executable model = new();
Stream source = new MemoryStream(new byte[1024]);
SabreTools.Serialization.Wrappers.PortableExecutable exe = new(model, source);
var checker = new CDDVDCops();
string? actual = checker.CheckExecutable(file, pex, includeDebug: false);
string? actual = checker.CheckExecutable(file, exe, includeDebug: false);
Assert.Null(actual);
}
[Fact]
public void CheckDirectoryPathTest()
{
@@ -65,4 +54,4 @@ namespace BinaryObjectScanner.Test.Protection
Assert.Null(actual);
}
}
}
}

View File

@@ -11,12 +11,12 @@ namespace BinaryObjectScanner.Test.Protection
public void CheckPortableExecutableTest()
{
string file = "filename";
SabreTools.Models.PortableExecutable.Executable model = new();
Stream source = new MemoryStream();
SabreTools.Serialization.Wrappers.PortableExecutable pex = new(model, source);
SabreTools.Data.Models.PortableExecutable.Executable model = new();
Stream source = new MemoryStream(new byte[1024]);
SabreTools.Serialization.Wrappers.PortableExecutable exe = new(model, source);
var checker = new CDGuard();
string? actual = checker.CheckExecutable(file, pex, includeDebug: false);
string? actual = checker.CheckExecutable(file, exe, includeDebug: false);
Assert.Null(actual);
}
@@ -41,4 +41,4 @@ namespace BinaryObjectScanner.Test.Protection
Assert.Null(actual);
}
}
}
}

View File

@@ -10,13 +10,13 @@ namespace BinaryObjectScanner.Test.Protection
public void CheckPortableExecutableTest()
{
string file = "filename";
SabreTools.Models.PortableExecutable.Executable model = new();
Stream source = new MemoryStream();
SabreTools.Serialization.Wrappers.PortableExecutable pex = new(model, source);
SabreTools.Data.Models.PortableExecutable.Executable model = new();
Stream source = new MemoryStream(new byte[1024]);
SabreTools.Serialization.Wrappers.PortableExecutable exe = new(model, source);
var checker = new CDKey();
string? actual = checker.CheckExecutable(file, pex, includeDebug: false);
string? actual = checker.CheckExecutable(file, exe, includeDebug: false);
Assert.Null(actual);
}
}
}
}

View File

@@ -11,12 +11,12 @@ namespace BinaryObjectScanner.Test.Protection
public void CheckPortableExecutableTest()
{
string file = "filename";
SabreTools.Models.PortableExecutable.Executable model = new();
Stream source = new MemoryStream();
SabreTools.Serialization.Wrappers.PortableExecutable pex = new(model, source);
SabreTools.Data.Models.PortableExecutable.Executable model = new();
Stream source = new MemoryStream(new byte[1024]);
SabreTools.Serialization.Wrappers.PortableExecutable exe = new(model, source);
var checker = new CDLock();
string? actual = checker.CheckExecutable(file, pex, includeDebug: false);
string? actual = checker.CheckExecutable(file, exe, includeDebug: false);
Assert.Null(actual);
}
@@ -41,4 +41,4 @@ namespace BinaryObjectScanner.Test.Protection
Assert.Null(actual);
}
}
}
}

View File

@@ -27,4 +27,4 @@ namespace BinaryObjectScanner.Test.Protection
Assert.Null(actual);
}
}
}
}

View File

@@ -10,13 +10,13 @@ namespace BinaryObjectScanner.Test.Protection
public void CheckPortableExecutableTest()
{
string file = "filename";
SabreTools.Models.PortableExecutable.Executable model = new();
Stream source = new MemoryStream();
SabreTools.Serialization.Wrappers.PortableExecutable pex = new(model, source);
SabreTools.Data.Models.PortableExecutable.Executable model = new();
Stream source = new MemoryStream(new byte[1024]);
SabreTools.Serialization.Wrappers.PortableExecutable exe = new(model, source);
var checker = new CDSHiELDSE();
string? actual = checker.CheckExecutable(file, pex, includeDebug: false);
string? actual = checker.CheckExecutable(file, exe, includeDebug: false);
Assert.Null(actual);
}
}
}
}

View File

@@ -27,4 +27,4 @@ namespace BinaryObjectScanner.Test.Protection
Assert.Null(actual);
}
}
}
}

View File

@@ -16,4 +16,4 @@ namespace BinaryObjectScanner.Test.Protection
Assert.Null(actual);
}
}
}
}

View File

@@ -11,12 +11,12 @@ namespace BinaryObjectScanner.Test.Protection
public void CheckPortableExecutableTest()
{
string file = "filename";
SabreTools.Models.PortableExecutable.Executable model = new();
Stream source = new MemoryStream();
SabreTools.Serialization.Wrappers.PortableExecutable pex = new(model, source);
SabreTools.Data.Models.PortableExecutable.Executable model = new();
Stream source = new MemoryStream(new byte[1024]);
SabreTools.Serialization.Wrappers.PortableExecutable exe = new(model, source);
var checker = new CenegaProtectDVD();
string? actual = checker.CheckExecutable(file, pex, includeDebug: false);
string? actual = checker.CheckExecutable(file, exe, includeDebug: false);
Assert.Null(actual);
}
@@ -41,4 +41,4 @@ namespace BinaryObjectScanner.Test.Protection
Assert.Null(actual);
}
}
}
}

View File

@@ -11,12 +11,12 @@ namespace BinaryObjectScanner.Test.Protection
public void CheckPortableExecutableTest()
{
string file = "filename";
SabreTools.Models.PortableExecutable.Executable model = new();
Stream source = new MemoryStream();
SabreTools.Serialization.Wrappers.PortableExecutable pex = new(model, source);
SabreTools.Data.Models.PortableExecutable.Executable model = new();
Stream source = new MemoryStream(new byte[1024]);
SabreTools.Serialization.Wrappers.PortableExecutable exe = new(model, source);
var checker = new Channelware();
string? actual = checker.CheckExecutable(file, pex, includeDebug: false);
string? actual = checker.CheckExecutable(file, exe, includeDebug: false);
Assert.Null(actual);
}
@@ -41,4 +41,4 @@ namespace BinaryObjectScanner.Test.Protection
Assert.Null(actual);
}
}
}
}

View File

@@ -11,12 +11,12 @@ namespace BinaryObjectScanner.Test.Protection
public void CheckPortableExecutableTest()
{
string file = "filename";
SabreTools.Models.PortableExecutable.Executable model = new();
Stream source = new MemoryStream();
SabreTools.Serialization.Wrappers.PortableExecutable pex = new(model, source);
SabreTools.Data.Models.PortableExecutable.Executable model = new();
Stream source = new MemoryStream(new byte[1024]);
SabreTools.Serialization.Wrappers.PortableExecutable exe = new(model, source);
var checker = new ChosenBytesCodeLock();
string? actual = checker.CheckExecutable(file, pex, includeDebug: false);
string? actual = checker.CheckExecutable(file, exe, includeDebug: false);
Assert.Null(actual);
}
@@ -41,4 +41,4 @@ namespace BinaryObjectScanner.Test.Protection
Assert.Null(actual);
}
}
}
}

Some files were not shown because too many files have changed in this diff Show More