Compare commits

...

249 Commits
3.3.2 ... 3.4.0

Author SHA1 Message Date
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
Matt Nadareski
73d7c5790e Bump version 2024-12-18 21:50:21 -05:00
Matt Nadareski
d81be84f58 Remove unnecessary complexity in publish scripts 2024-12-18 10:21:06 -05:00
Matt Nadareski
d6920bc1e2 Fix Wise detection slightly 2024-12-18 10:14:14 -05:00
Matt Nadareski
68d4eeef27 Update packages 2024-12-18 10:02:42 -05:00
Matt Nadareski
92c29610df Fix publishing executables 2024-12-18 09:56:57 -05:00
Matt Nadareski
24eddda72c Allow symbols to be packed 2024-12-18 09:54:01 -05:00
TheRogueArchivist
3257b59b27 Add SafeDisc 2.90.045 detections (#345) 2024-12-17 17:29:59 -05:00
Matt Nadareski
10c95f86b1 Add alternate signatures for PKZIP embedded 2024-12-17 00:57:57 -05:00
Matt Nadareski
269e01b7bf Move to native subfolder 2024-12-14 23:04:25 -05:00
340 changed files with 4371 additions and 8505 deletions

View File

@@ -16,7 +16,10 @@ jobs:
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: 9.0.x
dotnet-version: |
6.0.x
8.0.x
9.0.x
- name: Run tests
run: dotnet test
@@ -24,17 +27,11 @@ jobs:
- name: Run publish script
run: ./publish-nix.sh -d
- name: Upload package
uses: actions/upload-artifact@v4
with:
name: 'Nuget Package'
path: '*.nupkg'
- name: Upload to rolling
uses: ncipollo/release-action@v1.14.0
with:
allowUpdates: True
artifacts: "*.nupkg,*.zip"
artifacts: "*.nupkg,*.snupkg,*.zip"
body: 'Last built commit: ${{ github.sha }}'
name: 'Rolling Release'
prerelease: True

View File

@@ -11,10 +11,13 @@ jobs:
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: 9.0.x
dotnet-version: |
6.0.x
8.0.x
9.0.x
- name: Build
run: dotnet build
- name: Run tests
run: dotnet test
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

16
.vscode/launch.json vendored
View File

@@ -15,20 +15,8 @@
"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</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.3" />
<PackageReference Include="xunit" Version="2.9.2" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.8.2">
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.14.1" />
<PackageReference Include="SabreTools.Serialization" Version="1.9.5" />
<PackageReference Include="xunit" Version="2.9.3" />
<PackageReference Include="xunit.runner.visualstudio" Version="3.1.4">
<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
{

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,25 +6,28 @@ namespace BinaryObjectScanner.Test.FileType
{
public class AACSMediaKeyBlockTests
{
private static readonly SabreTools.Serialization.Wrappers.AACSMediaKeyBlock wrapper
= new(new SabreTools.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,25 +6,28 @@ namespace BinaryObjectScanner.Test.FileType
{
public class BDPlusSVMTests
{
private static readonly SabreTools.Serialization.Wrappers.BDPlusSVM wrapper
= new(new SabreTools.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

@@ -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

@@ -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.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.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.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,25 +6,28 @@ namespace BinaryObjectScanner.Test.FileType
{
public class PLJTests
{
private static readonly SabreTools.Serialization.Wrappers.PlayJAudioFile wrapper
= new(new SabreTools.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.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

@@ -26,40 +26,5 @@ namespace BinaryObjectScanner.Test.FileType
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);
}
}
}

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

@@ -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

@@ -11,11 +11,11 @@ namespace BinaryObjectScanner.Test.GameEngine
{
string file = "filename";
SabreTools.Models.PortableExecutable.Executable model = new();
Stream source = new MemoryStream();
SabreTools.Serialization.Wrappers.PortableExecutable pex = new(model, source);
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

@@ -11,26 +11,12 @@ namespace BinaryObjectScanner.Test.Packer
{
string file = "filename";
SabreTools.Models.PortableExecutable.Executable model = new();
Stream source = new MemoryStream();
SabreTools.Serialization.Wrappers.PortableExecutable pex = new(model, source);
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

@@ -11,26 +11,12 @@ namespace BinaryObjectScanner.Test.Packer
{
string file = "filename";
SabreTools.Models.PortableExecutable.Executable model = new();
Stream source = new MemoryStream();
SabreTools.Serialization.Wrappers.PortableExecutable pex = new(model, source);
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

@@ -11,26 +11,12 @@ namespace BinaryObjectScanner.Test.Packer
{
string file = "filename";
SabreTools.Models.PortableExecutable.Executable model = new();
Stream source = new MemoryStream();
SabreTools.Serialization.Wrappers.PortableExecutable pex = new(model, source);
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

@@ -11,26 +11,12 @@ namespace BinaryObjectScanner.Test.Packer
{
string file = "filename";
SabreTools.Models.PortableExecutable.Executable model = new();
Stream source = new MemoryStream();
SabreTools.Serialization.Wrappers.PortableExecutable pex = new(model, source);
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.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

@@ -11,26 +11,12 @@ namespace BinaryObjectScanner.Test.Packer
{
string file = "filename";
SabreTools.Models.PortableExecutable.Executable model = new();
Stream source = new MemoryStream();
SabreTools.Serialization.Wrappers.PortableExecutable pex = new(model, source);
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

@@ -11,26 +11,12 @@ namespace BinaryObjectScanner.Test.Packer
{
string file = "filename";
SabreTools.Models.PortableExecutable.Executable model = new();
Stream source = new MemoryStream();
SabreTools.Serialization.Wrappers.PortableExecutable pex = new(model, source);
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

@@ -22,26 +22,12 @@ namespace BinaryObjectScanner.Test.Packer
{
string file = "filename";
SabreTools.Models.PortableExecutable.Executable model = new();
Stream source = new MemoryStream();
SabreTools.Serialization.Wrappers.PortableExecutable pex = new(model, source);
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.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

@@ -11,26 +11,12 @@ namespace BinaryObjectScanner.Test.Packer
{
string file = "filename";
SabreTools.Models.PortableExecutable.Executable model = new();
Stream source = new MemoryStream();
SabreTools.Serialization.Wrappers.PortableExecutable pex = new(model, source);
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

@@ -11,26 +11,12 @@ namespace BinaryObjectScanner.Test.Packer
{
string file = "filename";
SabreTools.Models.PortableExecutable.Executable model = new();
Stream source = new MemoryStream();
SabreTools.Serialization.Wrappers.PortableExecutable pex = new(model, source);
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

@@ -11,11 +11,11 @@ namespace BinaryObjectScanner.Test.Packer
{
string file = "filename";
SabreTools.Models.NewExecutable.Executable model = new();
Stream source = new MemoryStream();
SabreTools.Serialization.Wrappers.NewExecutable nex = new(model, source);
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);
}
@@ -24,40 +24,12 @@ namespace BinaryObjectScanner.Test.Packer
{
string file = "filename";
SabreTools.Models.PortableExecutable.Executable model = new();
Stream source = new MemoryStream();
SabreTools.Serialization.Wrappers.PortableExecutable pex = new(model, source);
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

@@ -11,26 +11,12 @@ namespace BinaryObjectScanner.Test.Packer
{
string file = "filename";
SabreTools.Models.PortableExecutable.Executable model = new();
Stream source = new MemoryStream();
SabreTools.Serialization.Wrappers.PortableExecutable pex = new(model, source);
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

@@ -11,26 +11,12 @@ namespace BinaryObjectScanner.Test.Packer
{
string file = "filename";
SabreTools.Models.PortableExecutable.Executable model = new();
Stream source = new MemoryStream();
SabreTools.Serialization.Wrappers.PortableExecutable pex = new(model, source);
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

@@ -11,26 +11,12 @@ namespace BinaryObjectScanner.Test.Packer
{
string file = "filename";
SabreTools.Models.PortableExecutable.Executable model = new();
Stream source = new MemoryStream();
SabreTools.Serialization.Wrappers.PortableExecutable pex = new(model, source);
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

@@ -11,26 +11,12 @@ namespace BinaryObjectScanner.Test.Packer
{
string file = "filename";
SabreTools.Models.PortableExecutable.Executable model = new();
Stream source = new MemoryStream();
SabreTools.Serialization.Wrappers.PortableExecutable pex = new(model, source);
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

@@ -11,26 +11,12 @@ namespace BinaryObjectScanner.Test.Packer
{
string file = "filename";
SabreTools.Models.PortableExecutable.Executable model = new();
Stream source = new MemoryStream();
SabreTools.Serialization.Wrappers.PortableExecutable pex = new(model, source);
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

@@ -11,26 +11,12 @@ namespace BinaryObjectScanner.Test.Packer
{
string file = "filename";
SabreTools.Models.PortableExecutable.Executable model = new();
Stream source = new MemoryStream();
SabreTools.Serialization.Wrappers.PortableExecutable pex = new(model, source);
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

@@ -11,26 +11,12 @@ namespace BinaryObjectScanner.Test.Packer
{
string file = "filename";
SabreTools.Models.PortableExecutable.Executable model = new();
Stream source = new MemoryStream();
SabreTools.Serialization.Wrappers.PortableExecutable pex = new(model, source);
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

@@ -11,26 +11,12 @@ namespace BinaryObjectScanner.Test.Packer
{
string file = "filename";
SabreTools.Models.PortableExecutable.Executable model = new();
Stream source = new MemoryStream();
SabreTools.Serialization.Wrappers.PortableExecutable pex = new(model, source);
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

@@ -11,26 +11,12 @@ namespace BinaryObjectScanner.Test.Packer
{
string file = "filename";
SabreTools.Models.PortableExecutable.Executable model = new();
Stream source = new MemoryStream();
SabreTools.Serialization.Wrappers.PortableExecutable pex = new(model, source);
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

@@ -11,26 +11,12 @@ namespace BinaryObjectScanner.Test.Packer
{
string file = "filename";
SabreTools.Models.PortableExecutable.Executable model = new();
Stream source = new MemoryStream();
SabreTools.Serialization.Wrappers.PortableExecutable pex = new(model, source);
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

@@ -11,26 +11,12 @@ namespace BinaryObjectScanner.Test.Packer
{
string file = "filename";
SabreTools.Models.PortableExecutable.Executable model = new();
Stream source = new MemoryStream();
SabreTools.Serialization.Wrappers.PortableExecutable pex = new(model, source);
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

@@ -11,26 +11,12 @@ namespace BinaryObjectScanner.Test.Packer
{
string file = "filename";
SabreTools.Models.PortableExecutable.Executable model = new();
Stream source = new MemoryStream();
SabreTools.Serialization.Wrappers.PortableExecutable pex = new(model, source);
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

@@ -11,26 +11,12 @@ namespace BinaryObjectScanner.Test.Packer
{
string file = "filename";
SabreTools.Models.PortableExecutable.Executable model = new();
Stream source = new MemoryStream();
SabreTools.Serialization.Wrappers.PortableExecutable pex = new(model, source);
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

@@ -11,11 +11,11 @@ namespace BinaryObjectScanner.Test.Packer
{
string file = "filename";
SabreTools.Models.NewExecutable.Executable model = new();
Stream source = new MemoryStream();
SabreTools.Serialization.Wrappers.NewExecutable nex = new(model, source);
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);
}
@@ -24,40 +24,12 @@ namespace BinaryObjectScanner.Test.Packer
{
string file = "filename";
SabreTools.Models.PortableExecutable.Executable model = new();
Stream source = new MemoryStream();
SabreTools.Serialization.Wrappers.PortableExecutable pex = new(model, source);
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

@@ -11,11 +11,11 @@ namespace BinaryObjectScanner.Test.Packer
{
string file = "filename";
SabreTools.Models.NewExecutable.Executable model = new();
Stream source = new MemoryStream();
SabreTools.Serialization.Wrappers.NewExecutable nex = new(model, source);
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);
}
@@ -24,40 +24,12 @@ namespace BinaryObjectScanner.Test.Packer
{
string file = "filename";
SabreTools.Models.PortableExecutable.Executable model = new();
Stream source = new MemoryStream();
SabreTools.Serialization.Wrappers.PortableExecutable pex = new(model, source);
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

@@ -22,11 +22,11 @@ namespace BinaryObjectScanner.Test.Protection
{
string file = "filename";
SabreTools.Models.PortableExecutable.Executable model = new();
Stream source = new MemoryStream();
SabreTools.Serialization.Wrappers.PortableExecutable pex = new(model, source);
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

@@ -12,11 +12,11 @@ namespace BinaryObjectScanner.Test.Protection
{
string file = "filename";
SabreTools.Models.PortableExecutable.Executable model = new();
Stream source = new MemoryStream();
SabreTools.Serialization.Wrappers.PortableExecutable pex = new(model, source);
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);
}

View File

@@ -11,11 +11,11 @@ namespace BinaryObjectScanner.Test.Protection
{
string file = "filename";
SabreTools.Models.PortableExecutable.Executable model = new();
Stream source = new MemoryStream();
SabreTools.Serialization.Wrappers.PortableExecutable pex = new(model, source);
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);
}
}

View File

@@ -11,26 +11,12 @@ namespace BinaryObjectScanner.Test.Protection
{
string file = "filename";
SabreTools.Models.PortableExecutable.Executable model = new();
Stream source = new MemoryStream();
SabreTools.Serialization.Wrappers.PortableExecutable pex = new(model, source);
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

@@ -12,11 +12,11 @@ namespace BinaryObjectScanner.Test.Protection
{
string file = "filename";
SabreTools.Models.PortableExecutable.Executable model = new();
Stream source = new MemoryStream();
SabreTools.Serialization.Wrappers.PortableExecutable pex = new(model, source);
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);
}

View File

@@ -11,11 +11,11 @@ namespace BinaryObjectScanner.Test.Protection
{
string file = "filename";
SabreTools.Models.PortableExecutable.Executable model = new();
Stream source = new MemoryStream();
SabreTools.Serialization.Wrappers.PortableExecutable pex = new(model, source);
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,27 +7,16 @@ 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);
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);
}
@@ -36,11 +25,11 @@ namespace BinaryObjectScanner.Test.Protection
{
string file = "filename";
SabreTools.Models.PortableExecutable.Executable model = new();
Stream source = new MemoryStream();
SabreTools.Serialization.Wrappers.PortableExecutable pex = new(model, source);
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);
}

View File

@@ -12,11 +12,11 @@ namespace BinaryObjectScanner.Test.Protection
{
string file = "filename";
SabreTools.Models.PortableExecutable.Executable model = new();
Stream source = new MemoryStream();
SabreTools.Serialization.Wrappers.PortableExecutable pex = new(model, source);
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);
}

View File

@@ -11,11 +11,11 @@ namespace BinaryObjectScanner.Test.Protection
{
string file = "filename";
SabreTools.Models.PortableExecutable.Executable model = new();
Stream source = new MemoryStream();
SabreTools.Serialization.Wrappers.PortableExecutable pex = new(model, source);
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

@@ -12,11 +12,11 @@ namespace BinaryObjectScanner.Test.Protection
{
string file = "filename";
SabreTools.Models.PortableExecutable.Executable model = new();
Stream source = new MemoryStream();
SabreTools.Serialization.Wrappers.PortableExecutable pex = new(model, source);
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);
}

View File

@@ -11,11 +11,11 @@ namespace BinaryObjectScanner.Test.Protection
{
string file = "filename";
SabreTools.Models.PortableExecutable.Executable model = new();
Stream source = new MemoryStream();
SabreTools.Serialization.Wrappers.PortableExecutable pex = new(model, source);
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

@@ -12,11 +12,11 @@ namespace BinaryObjectScanner.Test.Protection
{
string file = "filename";
SabreTools.Models.PortableExecutable.Executable model = new();
Stream source = new MemoryStream();
SabreTools.Serialization.Wrappers.PortableExecutable pex = new(model, source);
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);
}

View File

@@ -12,11 +12,11 @@ namespace BinaryObjectScanner.Test.Protection
{
string file = "filename";
SabreTools.Models.PortableExecutable.Executable model = new();
Stream source = new MemoryStream();
SabreTools.Serialization.Wrappers.PortableExecutable pex = new(model, source);
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);
}

View File

@@ -12,11 +12,11 @@ namespace BinaryObjectScanner.Test.Protection
{
string file = "filename";
SabreTools.Models.PortableExecutable.Executable model = new();
Stream source = new MemoryStream();
SabreTools.Serialization.Wrappers.PortableExecutable pex = new(model, source);
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);
}

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

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