Compare commits

..

203 Commits
3.1.7 ... 3.3.0

Author SHA1 Message Date
Matt Nadareski
fee4e482cf Bump version 2024-12-03 00:32:49 -05:00
Matt Nadareski
33b498cd39 Remove AppVeyor 2024-12-02 16:34:11 -05:00
Matt Nadareski
8570237fb3 Disallow empty values in custom dictionaries 2024-12-02 16:31:19 -05:00
Matt Nadareski
8b10a7c3ea Fix outputting multi-detected files 2024-12-02 15:12:19 -05:00
Matt Nadareski
0a3f83b15e Hook up disconnected FLEXnet checks 2024-12-02 15:05:58 -05:00
Matt Nadareski
f7a25c7d2d Reduce content check boilerplate 2024-12-02 14:51:48 -05:00
Matt Nadareski
f092a4d2ea CanSeek can throw exceptions 2024-12-02 14:43:40 -05:00
Matt Nadareski
027864aaa6 Add automatic test running 2024-12-02 12:04:46 -05:00
Matt Nadareski
8bcf81fbbd Add detect dictionary test for executable 2024-12-02 12:00:55 -05:00
Matt Nadareski
8c0a8f6856 Fix TAR test name 2024-12-02 11:56:28 -05:00
Matt Nadareski
254d2877b5 Add scanner helper method tests 2024-12-02 11:50:34 -05:00
Matt Nadareski
f71919f8f7 Add one more boundary test 2024-12-02 11:45:43 -05:00
Matt Nadareski
50bece6ac4 Add more paranoia in file size helper 2024-12-02 11:44:57 -05:00
Matt Nadareski
3141e1f020 Add file size helper extension 2024-12-02 11:43:04 -05:00
Matt Nadareski
0a131c502e Remove empty file 2024-12-02 11:36:06 -05:00
Matt Nadareski
6db0d27bf8 Fix access level for helper method 2024-12-02 11:35:34 -05:00
Matt Nadareski
366e6ae171 Wrappers should never throw 2024-12-02 11:34:08 -05:00
Matt Nadareski
1ed0fe7dd3 Fill out more extraction boundary tests 2024-12-02 11:21:14 -05:00
Matt Nadareski
dbd2175446 Add file type tests 2024-12-02 11:07:01 -05:00
Matt Nadareski
1a997679a9 Add protection tests 2024-12-02 10:38:36 -05:00
Matt Nadareski
477356bd77 Add content and NE tests for packers 2024-12-02 01:59:23 -05:00
Matt Nadareski
bf5899d9fd Add packer tests 2024-12-02 01:50:40 -05:00
Matt Nadareski
1565efd097 Add game engine tests 2024-12-02 01:28:24 -05:00
Matt Nadareski
1dd9022407 Add tests for static check class generators 2024-12-02 01:22:33 -05:00
Matt Nadareski
ff2b27c6d0 Reduce PE boilerplate 2024-12-02 00:58:52 -05:00
Matt Nadareski
a6b494841f Add and use new nullable string extensions 2024-12-02 00:35:04 -05:00
Matt Nadareski
0aff061781 Migrate to new Serialization code 2024-12-02 00:02:51 -05:00
Matt Nadareski
c73d558ca4 Add Factory tests 2024-12-01 23:50:19 -05:00
Matt Nadareski
f80de3a941 Fix namespace 2024-12-01 23:38:25 -05:00
Matt Nadareski
ca51733aa2 Add enumerable extensions tests 2024-12-01 23:37:27 -05:00
Matt Nadareski
bfb4499005 Framework only matters for executables 2024-12-01 23:25:44 -05:00
Matt Nadareski
2984d3f5e5 Add skeleton test project 2024-12-01 23:09:38 -05:00
Matt Nadareski
4eff18bf3a Update packages 2024-12-01 23:07:52 -05:00
Matt Nadareski
eeeac97553 Remove unnecessary double assignment 2024-11-27 22:39:19 -05:00
Matt Nadareski
62475f725a Version gate remaining Linq statements 2024-11-22 13:00:11 -05:00
Matt Nadareski
575c1a7bd7 Minor change to Array.Copy syntax 2024-11-21 13:49:55 -05:00
Matt Nadareski
eb03470625 Bump version 2024-11-21 11:20:19 -05:00
Matt Nadareski
b1aa2fc73a Enable MPQ on .NET Framework 4.0 2024-11-21 10:40:10 -05:00
Matt Nadareski
cd21c76c97 Add versions to executables 2024-11-21 10:35:15 -05:00
Matt Nadareski
9e205ddf2a More incidental cleanup 2024-11-21 01:32:30 -05:00
Matt Nadareski
07a183955b Reduce framework gating in SecuROM 2024-11-20 23:41:09 -05:00
Matt Nadareski
b49c6e96fd Add guards around previous commit 2024-11-20 21:48:37 -05:00
Matt Nadareski
148cfed141 Add executable extraction to tool 2024-11-20 21:45:15 -05:00
Matt Nadareski
cebbe6a1e8 Check overlay for embedded data as well 2024-11-20 21:33:56 -05:00
Matt Nadareski
558e23a9cd Clean up after last few commits 2024-11-20 21:18:12 -05:00
Matt Nadareski
d7c37f6e0a Lists lead to less Linq 2024-11-20 20:58:39 -05:00
Matt Nadareski
c05090db8c Update packages 2024-11-20 20:23:05 -05:00
Matt Nadareski
fa19304a6d Remove some framework gating 2024-11-20 20:10:18 -05:00
Matt Nadareski
ec4962a3c9 Use List where possible, Macrovision edition 2024-11-20 17:13:47 -05:00
Matt Nadareski
7122aa44a1 Use List where possible 2024-11-20 17:10:03 -05:00
Matt Nadareski
cf62be365c Use List where possible 2024-11-20 17:05:40 -05:00
Matt Nadareski
9cc2f99334 Quick package sync 2024-11-20 16:51:06 -05:00
Matt Nadareski
d9d9f23af9 Read entire file for content checks 2024-11-20 15:53:09 -05:00
Matt Nadareski
c29354f054 Add embedded archive scanning 2024-11-20 15:19:39 -05:00
Matt Nadareski
7738630952 Bump version 2024-11-16 00:00:00 -05:00
Matt Nadareski
c945ca4fe3 Make BOS compatible with RedumpLib 2024-11-15 23:59:23 -05:00
Matt Nadareski
6acf5ccc09 Bump version 2024-11-15 23:11:00 -05:00
Matt Nadareski
a5f9006ef1 One last Linq place (not all of them) 2024-11-15 23:09:58 -05:00
Matt Nadareski
ae7111e201 Update package versions 2024-11-15 23:06:47 -05:00
Matt Nadareski
5a94cd3b66 Framework only matters for executable 2024-11-15 23:00:37 -05:00
Matt Nadareski
3de58ff05e Fix linux publish script 2024-11-13 13:03:13 -05:00
Matt Nadareski
6e409988a5 Bump version 2024-11-13 13:01:48 -05:00
Matt Nadareski
864fa8d3f8 Add .NET 9 to target frameworks 2024-11-13 04:26:26 -05:00
Matt Nadareski
622f36b056 Add .NET 9 to target frameworks 2024-11-13 04:26:24 -05:00
Matt Nadareski
efe144313b Fix build 2024-11-12 23:29:53 -05:00
Matt Nadareski
1e3aac6748 Linq is friend, not food 2024-11-12 23:17:48 -05:00
Matt Nadareski
984ad1f642 Remove minimally-used System.Memory package 2024-11-05 16:58:13 -05:00
Matt Nadareski
b379e1781b Remove unused MinThreadingBridge library 2024-11-05 16:53:52 -05:00
Matt Nadareski
e244d6939c Attempt to reduce nesting in GHA builds 2024-11-05 13:50:04 -05:00
Matt Nadareski
b4a781acc7 Bump version 2024-11-05 13:10:09 -05:00
Matt Nadareski
eb7bbdde52 Remove now-incorrect remark 2024-11-05 11:06:30 -05:00
Matt Nadareski
f470263196 Func not obj 2024-11-05 01:45:35 -05:00
Matt Nadareski
3822cc41f2 Extract loop into new method; fix build 2024-11-05 01:24:14 -05:00
Matt Nadareski
f04cf25fa9 Move all executable handling to Executable 2024-11-05 01:12:18 -05:00
Matt Nadareski
eb8b9daea8 Reduce unncessary nulls 2024-11-05 00:42:45 -05:00
Matt Nadareski
33ecc246dc Reorganize yet again around check sets 2024-11-05 00:32:42 -05:00
Matt Nadareski
7d55c8224a Move Factory to Data namespace 2024-11-05 00:28:39 -05:00
Matt Nadareski
0ccae4e4b7 Move static check collections to separate class 2024-11-05 00:25:22 -05:00
Matt Nadareski
1798371513 Add better info to coding and dev guides 2024-11-05 00:10:40 -05:00
Matt Nadareski
0858437196 Undo launch changes 2024-11-04 23:59:46 -05:00
Matt Nadareski
ece758bf03 IExtractableExecutable extends IExecutableCheck 2024-11-04 23:59:10 -05:00
Matt Nadareski
d9661cd03d Fix access level 2024-11-04 23:52:40 -05:00
Matt Nadareski
682529d7ba Consolidate more typed methods 2024-11-04 23:49:13 -05:00
Matt Nadareski
27ef24636c Use typed check methods as well 2024-11-04 23:37:23 -05:00
Matt Nadareski
f5f3d3d29a Fun with typed interfaces 2024-11-04 23:21:12 -05:00
Matt Nadareski
550fb70952 Use typed interface for extractable executables 2024-11-04 22:02:10 -05:00
Matt Nadareski
7d6248a3bf Re-merge some code from Handler to Scanner 2024-11-04 21:53:59 -05:00
Matt Nadareski
4575da77bd Use private field when possible 2024-11-04 21:40:56 -05:00
Matt Nadareski
a85aa08117 Reduce publicly visible fields in Scanner 2024-11-04 21:37:03 -05:00
Matt Nadareski
667207761c Reduce SFX code duplication 2024-11-04 21:25:30 -05:00
Matt Nadareski
92097222b0 Sync IExtractable*Executable implementations 2024-11-04 21:14:06 -05:00
Matt Nadareski
5ec90b290a Steam any false 2024-11-04 20:06:47 -05:00
Matt Nadareski
5de78ef552 Make GitHub action Debug-only 2024-11-04 15:02:11 -05:00
Matt Nadareski
57a5531fbd Remove old Test executable; update docs 2024-11-04 14:58:21 -05:00
Matt Nadareski
f7a4b6b43c Add separate ExtractionTool executable 2024-11-04 14:48:29 -05:00
Matt Nadareski
3de56083d8 Add separate ProtectionScan executable 2024-11-04 14:38:23 -05:00
Matt Nadareski
f998a578cc Make Extractor static like Protector 2024-11-04 14:14:50 -05:00
Matt Nadareski
0fc7ce2e07 Simplify code in Extractor 2024-11-04 14:10:16 -05:00
Matt Nadareski
156df10e37 Remove Printer 2024-11-04 14:05:20 -05:00
Matt Nadareski
9490d06509 Remove Utilities namespace references 2024-11-04 11:54:41 -05:00
Matt Nadareski
b8b70a3848 Ensure all files matched in RainbowSentinel (fixes #336) 2024-11-04 11:42:24 -05:00
Matt Nadareski
42df482ffa Fix MPQ compilation 2024-11-04 11:29:36 -05:00
Matt Nadareski
058dfaeb37 Fix missed outDir location 2024-11-04 11:25:42 -05:00
Matt Nadareski
1622bcbe60 Replace now-duplicate code 2024-11-04 11:17:09 -05:00
Matt Nadareski
72629ea3a4 Update IExtractable interface 2024-11-04 11:00:59 -05:00
Matt Nadareski
4ba3c3e3ad Normalize extraction 2024-11-04 10:20:46 -05:00
Matt Nadareski
56c1fd31d4 Add Steam extension matching (fixes #234) 2024-11-04 09:51:20 -05:00
Matt Nadareski
9c27da72bb Add VOB-PCD.KEY detection 2024-11-04 09:38:25 -05:00
Matt Nadareski
e5dc66b140 Bump version 2024-11-03 20:01:41 -05:00
HeroponRikiBestest
41e10a4150 Add aditional light directory checks (#335)
Compensate for some additional variance in directory names found from new samples, in lieu of a more "advanced" check
2024-11-02 19:42:00 -04:00
Matt Nadareski
3c4381049b Minor leftover cleanup 2024-10-31 23:11:11 -04:00
Matt Nadareski
3188c6e922 Further reduce awkward framework gating 2024-10-31 23:08:05 -04:00
Matt Nadareski
1bfb6cda08 Use CheckDictionary helper type 2024-10-31 22:52:20 -04:00
Matt Nadareski
86feb930a8 Add CheckDictionary (unused) 2024-10-31 22:49:57 -04:00
Matt Nadareski
5587c79ac5 Reduce use of generic PathMatch 2024-10-31 22:42:20 -04:00
Matt Nadareski
dc2a2e10de Add summary to ProtectionDictionary 2024-10-31 22:25:11 -04:00
Matt Nadareski
a2fdcb4f6f Remove remaining unncessary Concurrent usings 2024-10-31 22:22:52 -04:00
Matt Nadareski
a355670af9 Use semantic versioning for var names 2024-10-31 22:16:51 -04:00
Matt Nadareski
3489c67e2b Make CheckDirectoryPath signature easier 2024-10-31 22:15:30 -04:00
Matt Nadareski
99a64942ea Reduce per-framework complexity 2024-10-31 21:46:40 -04:00
Matt Nadareski
5eab12946f Fix accidental change 2024-10-31 21:13:09 -04:00
Matt Nadareski
683cfb6306 Start using ProtectionDictionary 2024-10-31 21:10:06 -04:00
Matt Nadareski
9a3fde0518 Add ProtectionDictionary type (unused) 2024-10-31 20:54:36 -04:00
Matt Nadareski
26d19aab37 Fix very strange formatting 2024-10-31 20:38:15 -04:00
Matt Nadareski
08564ed607 Remove end-of-program pauses 2024-10-31 20:36:40 -04:00
Matt Nadareski
0f6378cd2c Update packages 2024-10-31 16:05:11 -04:00
TheRogueArchivist
34a78fc4b9 Minor SafeCast additions (#333)
Adds a text check for SafeCast, along with adding a new confirmed version. Also add notes for a few known programs that used SafeCast, a few TODOs, and a semi-related note about stxt sections.
2024-10-30 07:28:21 -04:00
Matt Nadareski
c9ee45c1d2 Count not Count() 2024-10-27 20:24:24 -04:00
HeroponRikiBestest
13f5b4f79b Improve Copy-X Light detection with additional folder check. (#332)
* Improve Copy-X Light detection with additional folder check.

* Add requested changes to additional copy-X light folder check.

* Cleaned up changes.

* One final comment cleanup.
2024-10-27 20:20:19 -04:00
HeroponRikiBestest
e5d0c5bdc4 Replace tivola with copy-x. (#331) 2024-10-27 00:19:41 -04:00
Matt Nadareski
6220382531 Clarify switch expression use 2024-10-27 00:12:21 -04:00
Matt Nadareski
165896e335 Add note about first-person comments 2024-10-27 00:04:11 -04:00
Matt Nadareski
284d0ea108 Clear out old info from the coding guide 2024-10-27 00:01:22 -04:00
Matt Nadareski
b04feab5da Minor cleanup 2024-10-26 23:54:54 -04:00
HeroponRikiBestest
4e0442d526 Add preliminary copy-X protection checking (#328)
* Add preliminary copy-X protection checking

* Fixed formatting.

* Removed some unecessary lines of code.

* Added debatably sufficient documentation.

* Fixed formatting, hopefully

* Finalize formatting and PR.

* Fleshes out checks after more samples. Fixes some but not all of the change requests.

* Fix ordering.

* Fixes pex check, fixes redump id formatting.

* Added copy-X info to readme.

* Revert "Added copy-X info to readme."

This reverts commit 77349aa8de.

* Add copy-X info to readme, for real this time.

* Replaced some code in byte check with BoS helper function.

* Remove first person.

* Source is no longer just trust me (to some degree)

* Fix typo

* WIP figuring out enumerable (fails to build)

* WIP 2 figuring out getfirstmatch (compiles, but breaks detection)

* Pass 1 of suggested changes.

* Removed debug match.

* Pass 2 of suggested changes.

* Added line.

* Added line for real.

* Added todo

* Improved comments.

* Finished todo.

* Redid change.

* Fixes more comments.

* double double and make it trouble
2024-10-26 23:53:17 -04:00
TheRogueArchivist
d8aa4d230d Fix WTM false positive (#327)
"imp.dat" isn't exactly a very distinctive file name.
2024-10-26 20:31:25 -04:00
TheRogueArchivist
07a7fd05d2 Add new SafeCast version (#329) 2024-10-26 20:30:07 -04:00
Matt Nadareski
671e1ee2b6 Update Matching to 1.3.3 2024-10-26 19:46:34 -04:00
Matt Nadareski
d627e8a4c9 Be consistent with naming 2024-10-25 12:01:08 -04:00
Matt Nadareski
6ee90b28cd Be consistent with naming 2024-10-25 11:57:51 -04:00
Matt Nadareski
8dc2b019b6 Update packages 2024-10-24 17:32:26 -04:00
TheRogueArchivist
f151563e28 Move Armadillo to Protection and add notes (#326)
Armadillo has packer and protection features, meaning it should be move to be a protection. Also add additional notes, including about an alternate later name, "SoftwarePassport".
2024-10-23 00:38:53 -04:00
Matt Nadareski
edbbbb011d Renmae MediaMax CD-3 to be more accurate 2024-10-21 21:59:15 -04:00
TheRogueArchivist
e3fd44134b Add initial .NET Reactor support (#325)
* Add initial .NET Reactor support

It's minimal, but is much better than nothing. A few notes on how it can be realistically improved have been added as well.

* Fix missing using

* 7-zip SFX is extractable now
2024-10-04 23:56:52 -04:00
Matt Nadareski
71fb7318e3 Better handling of Windows libraries 2024-10-03 14:57:14 -04:00
Matt Nadareski
aba4395139 Enable Windows libraries on .NET Framework 4.0 2024-10-03 14:46:35 -04:00
Matt Nadareski
1fd69f101f Remove last two this qualifiers 2024-10-03 13:02:23 -04:00
Matt Nadareski
aa4c72fb90 Old .NET really doesn't like readonly 2024-10-03 12:55:38 -04:00
Matt Nadareski
150b9a0d67 Remove more this qualifiers 2024-10-03 12:53:43 -04:00
Matt Nadareski
b08921a94a Use readonly instead of private set 2024-10-03 12:52:27 -04:00
Matt Nadareski
3406f3c4b3 Remove this qualifiers 2024-10-03 12:51:49 -04:00
Matt Nadareski
ffca156209 Remove init variants :( 2024-10-03 12:51:30 -04:00
Matt Nadareski
b842599006 Update packages 2024-10-03 12:01:08 -04:00
TheRogueArchivist
86b639b04f Add Kalypso Launcher support (#324)
* Add Kalypso Launcher support

* Small changes to Kalypso Launcher

* More minor Kalypso Launcher changes
2024-10-03 10:42:39 -04:00
Matt Nadareski
570602aac6 Remove unused package 2024-10-01 10:45:12 -04:00
Matt Nadareski
4989956a91 Bump version 2024-09-28 13:13:06 -04:00
Matt Nadareski
14849f45da Remove redundant reports in Macrovision code 2024-09-27 13:24:19 -04:00
TheRogueArchivist
28ebc14fe1 Fix various archive formats not extracting folders (#323)
Fixes folder extraction for 7z, RAR, and WinRAR SFX. Applied same fix to tar, but more is needed for it to work properly.
2024-09-26 01:15:38 -04:00
TheRogueArchivist
54cb996fce [WIP] Add 7-Zip SFX extraction (#321)
* Add 7-Zip SFX extraction

Newest SharpCompress added support for extracting 7-Zip SFX files, so we can add support for them here too.

* Clean up 7z SFX extraction method

* Remove unneeded import

* Use file instead of stream for 7z SFX

* Update 7z SFX to be more consistent with other packers
2024-09-26 00:30:25 -04:00
Matt Nadareski
8df58fa4d4 This doesn't inherit from anything 2024-09-25 11:25:52 -04:00
TheRogueArchivist
422add9827 Update SharpCompress to 0.38.0 (#320) 2024-09-25 11:01:16 -04:00
TheRogueArchivist
59435903eb Small update to nProtect comments (#319)
Add new confirmed game to use GameGuard, and start a known version list.
2024-09-12 02:33:17 -04:00
TheRogueArchivist
95ee417e00 Small update to SafeWrap comments (#318)
* Small update to SafeWrap comments

* Further additions to SafeWrap comments
2024-09-05 01:22:11 -04:00
Matt Nadareski
df913372bf Add more SecuROM PA checks (fixes #313) 2024-08-08 08:55:46 -04:00
TheRogueArchivist
2f1c76b7f9 Add EA Anti Cheat detection (#314)
* Add EA Anti Cheat detection

* Make a check more exact
2024-08-02 12:34:43 -04:00
Matt Nadareski
18e57c8182 Fix minor formatting issue 2024-08-02 12:23:05 -04:00
TheRogueArchivist
b4e2117c4b Confirm one SafeCast version (#309) 2024-08-02 00:07:12 -04:00
Matt Nadareski
1bb5ff9e18 Fix README a bit 2024-07-20 21:54:55 -04:00
TheRogueArchivist
a46cae469d Fix scans that use directory name in Windows (#312)
Removes ``.Replace("\\", "/")``, as it was messing with folder paths on Windows.
2024-07-13 01:29:45 -04:00
TheRogueArchivist
b564ff214d Add initial Channelware detection (#311) 2024-07-12 12:35:26 -04:00
TheRogueArchivist
0744a10de0 Improve phenoProtect detection (#307) 2024-07-04 22:16:11 -04:00
HeroponRikiBestest
343ca9497e Fix #.##.xx version number writing second x digit to first digit (#310) 2024-07-04 22:13:49 -04:00
Matt Nadareski
861958527d Fix under-matched runtimes 2024-06-26 12:44:32 -04:00
Matt Nadareski
a6b9dca291 Only copy DLLs for win-x86 2024-06-26 11:53:10 -04:00
Matt Nadareski
18c05cb49d Update workflow runtimes 2024-06-26 11:34:31 -04:00
Matt Nadareski
ed3e58af6c Update publishing to cooler version 2024-06-26 11:32:20 -04:00
Matt Nadareski
e3eed76826 Make debug table reading safer, kinda 2024-06-20 11:26:20 -04:00
Matt Nadareski
7eb86b223f Fix build script 2024-06-17 16:16:11 -04:00
Matt Nadareski
a4ee4529ca Bump version 2024-06-17 16:15:04 -04:00
Matt Nadareski
abc68d8503 Update Serialization to 1.6.7 2024-06-13 11:20:33 -04:00
TheRogueArchivist
aaff4bad1b Add new Alpha-ROM checks (#306) 2024-06-07 13:11:24 -04:00
TheRogueArchivist
d5c81857c3 Update Roxxe detections (#305) 2024-06-05 09:37:37 -04:00
TheRogueArchivist
c2594cdd2d Add checks for Macrovision SecDrv Update Installer (#304) 2024-06-02 19:43:15 -04:00
Matt Nadareski
2412042cef Update Serialization to 1.6.6 2024-06-02 19:42:49 -04:00
Matt Nadareski
1f5c1a8100 Bump version 2024-05-18 22:12:35 -04:00
Matt Nadareski
78cc67f30e Update UnshieldSharp 2024-05-18 22:05:32 -04:00
Matt Nadareski
5b78ba5621 Bump version 2024-05-15 20:30:43 -04:00
Matt Nadareski
c4734cfc3d Update packages 2024-05-15 15:16:41 -04:00
Matt Nadareski
dd45384226 Add secondary check for WinZipSFX NE 2024-05-15 15:15:09 -04:00
Matt Nadareski
3e75d9fa3b Add safety around executable wrapper creation 2024-05-15 13:09:40 -04:00
Matt Nadareski
aa690ab602 Update packages 2024-05-15 12:24:40 -04:00
Matt Nadareski
7432100139 Bump version 2024-05-07 08:57:17 -04:00
Matt Nadareski
29fabb44eb Update IO and Serialization 2024-05-07 05:31:42 -04:00
Matt Nadareski
ad776d4189 Add explicit compatibility notes section 2024-05-06 22:40:39 -04:00
Matt Nadareski
4cf12c76a8 Update IO and Serialization 2024-05-06 22:30:58 -04:00
Matt Nadareski
39185f5ddd Remove now-irrelevant note 2024-05-06 21:59:37 -04:00
Matt Nadareski
03477327c4 Clearer in another place 2024-05-06 21:59:10 -04:00
Matt Nadareski
29fa0d1ac7 Clarify support 2024-05-06 21:54:45 -04:00
Matt Nadareski
7eca23a7f3 Bump version 2024-04-28 19:51:22 -04:00
Matt Nadareski
f0c90bb332 Update packages for critical issues 2024-04-28 19:50:53 -04:00
Matt Nadareski
0af67e5802 Fix build 2024-04-26 22:13:27 -04:00
Matt Nadareski
6ab9f730f9 Bump version 2024-04-26 22:10:27 -04:00
Matt Nadareski
258238bcc0 Update packages 2024-04-26 22:09:05 -04:00
355 changed files with 12148 additions and 9693 deletions

View File

@@ -16,10 +16,16 @@ jobs:
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.0.x
dotnet-version: 9.0.x
- name: Restore dependencies
run: dotnet restore
- name: Build library
run: dotnet build
- name: Run tests
run: dotnet test
- name: Pack
run: dotnet pack

View File

@@ -1,4 +1,4 @@
name: Build Test
name: Build Programs
on:
push:
@@ -10,10 +10,10 @@ jobs:
strategy:
matrix:
project: [Test]
runtime: [win-x86, win-x64, linux-x64, osx-x64] #[win-x86, win-x64, win-arm64, linux-x64, linux-arm64, osx-x64]
framework: [net8.0] #[net20, net35, net40, net452, net472, net48, netcoreapp3.1, net5.0, net6.0, net7.0, net8.0]
conf: [Release, Debug]
project: [ExtractionTool, ProtectionScan]
runtime: [win-x86, win-x64, win-arm64, linux-x64, linux-arm64, osx-x64]
framework: [net9.0] #[net20, net35, net40, net452, net472, net48, netcoreapp3.1, net5.0, net6.0, net7.0, net8.0, net9.0]
conf: [Debug] #[Release, Debug]
steps:
- uses: actions/checkout@v4
@@ -23,16 +23,18 @@ jobs:
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.0.x
dotnet-version: 9.0.x
- name: Restore dependencies
run: dotnet restore
- name: Build
run: dotnet publish ${{ matrix.project }}/${{ matrix.project }}.csproj -f ${{ matrix.framework }} -r ${{ matrix.runtime }} -c ${{ matrix.conf == 'Release' && 'Release -p:DebugType=None -p:DebugSymbols=false' || 'Debug'}} --self-contained true --version-suffix ${{ github.sha }} ${{ (startsWith(matrix.framework, 'net5') || startsWith(matrix.framework, 'net6') || startsWith(matrix.framework, 'net7') || startsWith(matrix.framework, 'net8')) && '-p:PublishSingleFile=true' || ''}}
run: dotnet publish ${{ matrix.project }}/${{ matrix.project }}.csproj -f ${{ matrix.framework }} -r ${{ matrix.runtime }} -c ${{ matrix.conf == 'Release' && 'Release -p:DebugType=None -p:DebugSymbols=false' || 'Debug'}} --self-contained true --version-suffix ${{ github.sha }} ${{ (startsWith(matrix.framework, 'net5') || startsWith(matrix.framework, 'net6') || startsWith(matrix.framework, 'net7') || startsWith(matrix.framework, 'net8') || startsWith(matrix.framework, 'net9')) && '-p:PublishSingleFile=true' || ''}}
- name: Archive build
run: zip -r ${{ matrix.project }}_${{ matrix.framework }}_${{ matrix.runtime }}_${{ matrix.conf }}.zip ${{ matrix.project }}/bin/${{ matrix.conf }}/${{ matrix.framework }}/${{ matrix.runtime }}/publish/
run: |
cd ${{ matrix.project }}/bin/Debug/${{ matrix.framework }}/${{ matrix.runtime }}/publish/
zip -r ${{ github.workspace }}/${{ matrix.project }}_${{ matrix.framework }}_${{ matrix.runtime }}_${{ matrix.conf }}.zip ./
- name: Upload build
uses: actions/upload-artifact@v4

View File

@@ -11,7 +11,10 @@ jobs:
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.0.x
dotnet-version: 9.0.x
- name: Build
run: dotnet build
run: dotnet build
- name: Run tests
run: dotnet test

19
.vscode/launch.json vendored
View File

@@ -5,14 +5,27 @@
"version": "0.2.0",
"configurations": [
{
"name": ".NET Core Launch (Test)",
"name": ".NET Core Launch (ProtectionScan)",
"type": "coreclr",
"request": "launch",
"preLaunchTask": "build",
// If you have changed target frameworks, make sure to update the program path.
"program": "${workspaceFolder}/Test/bin/Debug/net8.0/Test.dll",
"program": "${workspaceFolder}/ProtectionScan/bin/Debug/net9.0/ProtectionScan.dll",
"args": [],
"cwd": "${workspaceFolder}/Test",
"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

View File

@@ -0,0 +1,28 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>net6.0;net8.0;net9.0</TargetFrameworks>
<IsPackable>false</IsPackable>
<LangVersion>latest</LangVersion>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\BinaryObjectScanner\BinaryObjectScanner.csproj" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="coverlet.collector" Version="6.0.2">
<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.0" />
<PackageReference Include="xunit" Version="2.9.2" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.8.2">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
</ItemGroup>
</Project>

View File

@@ -0,0 +1,50 @@
using BinaryObjectScanner.Data;
using Xunit;
namespace BinaryObjectScanner.Test.Data
{
public class StaticChecksTests
{
[Fact]
public void ContentCheckClasses_Populated()
{
var actual = StaticChecks.ContentCheckClasses;
Assert.NotEmpty(actual);
}
[Fact]
public void LinearExecutableCheckClasses_Empty()
{
var actual = StaticChecks.LinearExecutableCheckClasses;
Assert.Empty(actual); // No implementations exist yet
}
[Fact]
public void MSDOSExecutableCheckClasses_Empty()
{
var actual = StaticChecks.MSDOSExecutableCheckClasses;
Assert.Empty(actual); // No implementations exist yet
}
[Fact]
public void NewExecutableCheckClasses_Populated()
{
var actual = StaticChecks.NewExecutableCheckClasses;
Assert.NotEmpty(actual);
}
[Fact]
public void PathCheckClasses_Populated()
{
var actual = StaticChecks.PathCheckClasses;
Assert.NotEmpty(actual);
}
[Fact]
public void PortableExecutableCheckClasses_Populated()
{
var actual = StaticChecks.PortableExecutableCheckClasses;
Assert.NotEmpty(actual);
}
}
}

View File

@@ -0,0 +1,332 @@
using System;
using System.Collections.Generic;
using Xunit;
namespace BinaryObjectScanner.Test
{
public class ExtensionsTests
{
#region FileSize
[Fact]
public void FileSize_Null_Invalid()
{
string? filename = null;
long actual = filename.FileSize();
Assert.Equal(-1, actual);
}
[Fact]
public void FileSize_Empty_Invalid()
{
string? filename = string.Empty;
long actual = filename.FileSize();
Assert.Equal(-1, actual);
}
[Fact]
public void FileSize_Invalid_Invalid()
{
string? filename = "INVALID";
long actual = filename.FileSize();
Assert.Equal(-1, actual);
}
#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

@@ -0,0 +1,122 @@
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.MicrosoftCAB,
WrapperType.MicrosoftLZ,
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

@@ -0,0 +1,31 @@
using System.IO;
using BinaryObjectScanner.FileType;
using Xunit;
namespace BinaryObjectScanner.Test.FileType
{
public class AACSMediaKeyBlockTests
{
[Fact]
public void DetectFile_EmptyString_Null()
{
string file = string.Empty;
var detectable = new AACSMediaKeyBlock();
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 AACSMediaKeyBlock();
string? actual = detectable.Detect(stream, file, includeDebug: false);
Assert.Null(actual);
}
}
}

View File

@@ -0,0 +1,31 @@
using System.IO;
using BinaryObjectScanner.FileType;
using Xunit;
namespace BinaryObjectScanner.Test.FileType
{
public class BDPlusSVMTests
{
[Fact]
public void DetectFile_EmptyString_Null()
{
string file = string.Empty;
var detectable = new BDPlusSVM();
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 BDPlusSVM();
string? actual = detectable.Detect(stream, file, includeDebug: false);
Assert.Null(actual);
}
}
}

View File

@@ -0,0 +1,68 @@
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

@@ -0,0 +1,44 @@
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

@@ -0,0 +1,44 @@
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

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

View File

@@ -0,0 +1,43 @@
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

@@ -0,0 +1,44 @@
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

@@ -0,0 +1,44 @@
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

@@ -0,0 +1,44 @@
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

@@ -0,0 +1,44 @@
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

@@ -0,0 +1,31 @@
using System.IO;
using BinaryObjectScanner.FileType;
using Xunit;
namespace BinaryObjectScanner.Test.FileType
{
public class LDSCRYPTTests
{
[Fact]
public void DetectFile_EmptyString_Null()
{
string file = string.Empty;
var detectable = new LDSCRYPT();
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 LDSCRYPT();
string? actual = detectable.Detect(stream, file, includeDebug: false);
Assert.Null(actual);
}
}
}

View File

@@ -0,0 +1,44 @@
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,44 @@
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,44 @@
using System.IO;
using BinaryObjectScanner.FileType;
using Xunit;
namespace BinaryObjectScanner.Test.FileType
{
public class MicrosoftLZTests
{
[Fact]
public void ExtractFile_EmptyString_False()
{
string file = string.Empty;
string outDir = string.Empty;
var extractable = new MicrosoftLZ();
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 MicrosoftLZ();
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 MicrosoftLZ();
bool actual = extractable.Extract(stream, file, outDir, includeDebug: false);
Assert.False(actual);
}
}
}

View File

@@ -0,0 +1,44 @@
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

@@ -0,0 +1,44 @@
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

@@ -0,0 +1,79 @@
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

@@ -0,0 +1,31 @@
using System.IO;
using BinaryObjectScanner.FileType;
using Xunit;
namespace BinaryObjectScanner.Test.FileType
{
public class PLJTests
{
[Fact]
public void DetectFile_EmptyString_Null()
{
string file = string.Empty;
var detectable = new PLJ();
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 PLJ();
string? actual = detectable.Detect(stream, file, includeDebug: false);
Assert.Null(actual);
}
}
}

View File

@@ -0,0 +1,68 @@
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

@@ -0,0 +1,79 @@
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

@@ -0,0 +1,31 @@
using System.IO;
using BinaryObjectScanner.FileType;
using Xunit;
namespace BinaryObjectScanner.Test.FileType
{
public class RealArcadeInstallerTests
{
[Fact]
public void DetectFile_EmptyString_Null()
{
string file = string.Empty;
var detectable = new RealArcadeInstaller();
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 RealArcadeInstaller();
string? actual = detectable.Detect(stream, file, includeDebug: false);
Assert.Null(actual);
}
}
}

View File

@@ -0,0 +1,31 @@
using System.IO;
using BinaryObjectScanner.FileType;
using Xunit;
namespace BinaryObjectScanner.Test.FileType
{
public class RealArcadeMezzanineTests
{
[Fact]
public void DetectFile_EmptyString_Null()
{
string file = string.Empty;
var detectable = new RealArcadeMezzanine();
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 RealArcadeMezzanine();
string? actual = detectable.Detect(stream, file, includeDebug: false);
Assert.Null(actual);
}
}
}

View File

@@ -0,0 +1,65 @@
using System.IO;
using BinaryObjectScanner.FileType;
using Xunit;
namespace BinaryObjectScanner.Test.FileType
{
public class SFFSTests
{
[Fact]
public void DetectFile_EmptyString_Null()
{
string file = string.Empty;
var detectable = new SFFS();
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 SFFS();
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

@@ -0,0 +1,68 @@
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);
}
[Fact]
public void ExtractAll_EmptyModel_False()
{
var model = new SabreTools.Models.SGA.Archive();
var data = new MemoryStream();
var item = new SabreTools.Serialization.Wrappers.SGA(model, data);
string outputDirectory = string.Empty;
bool actual = SGA.ExtractAll(item, outputDirectory);
Assert.False(actual);
}
[Fact]
public void ExtractFile_EmptyModel_False()
{
var model = new SabreTools.Models.SGA.Archive();
var data = new MemoryStream();
var item = new SabreTools.Serialization.Wrappers.SGA(model, data);
string outputDirectory = string.Empty;
bool actual = SGA.ExtractFile(item, 0, outputDirectory);
Assert.False(actual);
}
}
}

View File

@@ -0,0 +1,79 @@
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

@@ -0,0 +1,46 @@
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

@@ -0,0 +1,31 @@
using System.IO;
using BinaryObjectScanner.FileType;
using Xunit;
namespace BinaryObjectScanner.Test.FileType
{
public class TextfileTests
{
[Fact]
public void DetectFile_EmptyString_Null()
{
string file = string.Empty;
var detectable = new Textfile();
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 Textfile();
string? actual = detectable.Detect(stream, file, includeDebug: false);
Assert.Null(actual);
}
}
}

View File

@@ -0,0 +1,44 @@
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

@@ -0,0 +1,44 @@
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

@@ -0,0 +1,44 @@
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

@@ -0,0 +1,44 @@
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

@@ -0,0 +1,44 @@
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

@@ -0,0 +1,22 @@
using System.IO;
using BinaryObjectScanner.GameEngine;
using Xunit;
namespace BinaryObjectScanner.Test.GameEngine
{
public class RenderWareTests
{
[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 RenderWare();
string? actual = checker.CheckExecutable(file, pex, includeDebug: false);
Assert.Null(actual);
}
}
}

View File

@@ -0,0 +1,36 @@
using System.IO;
using BinaryObjectScanner.Packer;
using Xunit;
namespace BinaryObjectScanner.Test.Packer
{
public class ASPackTests
{
[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 ASPack();
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 ASPack();
bool actual = checker.Extract(file, pex, outputDir, includeDebug: false);
Assert.False(actual);
}
}
}

View File

@@ -0,0 +1,36 @@
using System.IO;
using BinaryObjectScanner.Packer;
using Xunit;
namespace BinaryObjectScanner.Test.Packer
{
public class AdvancedInstallerTests
{
[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 AdvancedInstaller();
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 AdvancedInstaller();
bool actual = checker.Extract(file, pex, outputDir, includeDebug: false);
Assert.False(actual);
}
}
}

View File

@@ -0,0 +1,36 @@
using System.IO;
using BinaryObjectScanner.Packer;
using Xunit;
namespace BinaryObjectScanner.Test.Packer
{
public class AutoPlayMediaStudioTests
{
[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 AutoPlayMediaStudio();
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 AutoPlayMediaStudio();
bool actual = checker.Extract(file, pex, outputDir, includeDebug: false);
Assert.False(actual);
}
}
}

View File

@@ -0,0 +1,36 @@
using System.IO;
using BinaryObjectScanner.Packer;
using Xunit;
namespace BinaryObjectScanner.Test.Packer
{
public class CExeTests
{
[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 CExe();
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 CExe();
bool actual = checker.Extract(file, pex, outputDir, includeDebug: false);
Assert.False(actual);
}
}
}

View File

@@ -0,0 +1,36 @@
using System.IO;
using BinaryObjectScanner.Packer;
using Xunit;
namespace BinaryObjectScanner.Test.Packer
{
public class DotFuscatorTests
{
[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 DotFuscator();
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 DotFuscator();
bool actual = checker.Extract(file, pex, outputDir, includeDebug: false);
Assert.False(actual);
}
}
}

View File

@@ -0,0 +1,36 @@
using System.IO;
using BinaryObjectScanner.Packer;
using Xunit;
namespace BinaryObjectScanner.Test.Packer
{
public class DotNetReactorTests
{
[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 DotNetReactor();
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 DotNetReactor();
bool actual = checker.Extract(file, pex, outputDir, includeDebug: false);
Assert.False(actual);
}
}
}

View File

@@ -0,0 +1,47 @@
using System.IO;
using BinaryObjectScanner.Packer;
using Xunit;
namespace BinaryObjectScanner.Test.Packer
{
public class EXEStealthTests
{
[Fact]
public void CheckContentsTest()
{
string file = "filename";
byte[] fileContent = [0x01, 0x02, 0x03, 0x04];
var checker = new EXEStealth();
string? actual = checker.CheckContents(file, fileContent, includeDebug: true);
Assert.Null(actual);
}
[Fact]
public void CheckPortableExecutableTest()
{
string file = "filename";
SabreTools.Models.PortableExecutable.Executable model = new();
Stream source = new MemoryStream();
SabreTools.Serialization.Wrappers.PortableExecutable pex = new(model, source);
var checker = new EXEStealth();
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 EXEStealth();
bool actual = checker.Extract(file, pex, outputDir, includeDebug: false);
Assert.False(actual);
}
}
}

View File

@@ -0,0 +1,36 @@
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

@@ -0,0 +1,36 @@
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,36 @@
using System.IO;
using BinaryObjectScanner.Packer;
using Xunit;
namespace BinaryObjectScanner.Test.Packer
{
public class GenteeInstallerTests
{
[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 GenteeInstaller();
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 GenteeInstaller();
bool actual = checker.Extract(file, pex, outputDir, includeDebug: false);
Assert.False(actual);
}
}
}

View File

@@ -0,0 +1,36 @@
using System.IO;
using BinaryObjectScanner.Packer;
using Xunit;
namespace BinaryObjectScanner.Test.Packer
{
public class HyperTechCrackProofTests
{
[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 HyperTechCrackProof();
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 HyperTechCrackProof();
bool actual = checker.Extract(file, pex, outputDir, includeDebug: false);
Assert.False(actual);
}
}
}

View File

@@ -0,0 +1,63 @@
using System.IO;
using BinaryObjectScanner.Packer;
using Xunit;
namespace BinaryObjectScanner.Test.Packer
{
public class InnoSetupTests
{
[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);
var checker = new InnoSetup();
string? actual = checker.CheckExecutable(file, nex, includeDebug: false);
Assert.Null(actual);
}
[Fact]
public void CheckPortableExecutableTest()
{
string file = "filename";
SabreTools.Models.PortableExecutable.Executable model = new();
Stream source = new MemoryStream();
SabreTools.Serialization.Wrappers.PortableExecutable pex = new(model, source);
var checker = new InnoSetup();
string? actual = checker.CheckExecutable(file, pex, 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

@@ -0,0 +1,36 @@
using System.IO;
using BinaryObjectScanner.Packer;
using Xunit;
namespace BinaryObjectScanner.Test.Packer
{
public class InstallAnywhereTests
{
[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 InstallAnywhere();
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 InstallAnywhere();
bool actual = checker.Extract(file, pex, outputDir, includeDebug: false);
Assert.False(actual);
}
}
}

View File

@@ -0,0 +1,36 @@
using System.IO;
using BinaryObjectScanner.Packer;
using Xunit;
namespace BinaryObjectScanner.Test.Packer
{
public class InstallerVISETests
{
[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 InstallerVISE();
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 InstallerVISE();
bool actual = checker.Extract(file, pex, outputDir, includeDebug: false);
Assert.False(actual);
}
}
}

View File

@@ -0,0 +1,36 @@
using System.IO;
using BinaryObjectScanner.Packer;
using Xunit;
namespace BinaryObjectScanner.Test.Packer
{
public class IntelInstallationFrameworkTests
{
[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 IntelInstallationFramework();
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 IntelInstallationFramework();
bool actual = checker.Extract(file, pex, outputDir, includeDebug: false);
Assert.False(actual);
}
}
}

View File

@@ -0,0 +1,36 @@
using System.IO;
using BinaryObjectScanner.Packer;
using Xunit;
namespace BinaryObjectScanner.Test.Packer
{
public class MicrosoftCABSFXTests
{
[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 MicrosoftCABSFX();
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 MicrosoftCABSFX();
bool actual = checker.Extract(file, pex, outputDir, includeDebug: false);
Assert.False(actual);
}
}
}

View File

@@ -0,0 +1,36 @@
using System.IO;
using BinaryObjectScanner.Packer;
using Xunit;
namespace BinaryObjectScanner.Test.Packer
{
public class NSISTests
{
[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 NSIS();
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 NSIS();
bool actual = checker.Extract(file, pex, outputDir, includeDebug: false);
Assert.False(actual);
}
}
}

View File

@@ -0,0 +1,36 @@
using System.IO;
using BinaryObjectScanner.Packer;
using Xunit;
namespace BinaryObjectScanner.Test.Packer
{
public class NeoLiteTests
{
[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 NeoLite();
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 NeoLite();
bool actual = checker.Extract(file, pex, outputDir, includeDebug: false);
Assert.False(actual);
}
}
}

View File

@@ -0,0 +1,36 @@
using System.IO;
using BinaryObjectScanner.Packer;
using Xunit;
namespace BinaryObjectScanner.Test.Packer
{
public class PECompactTests
{
[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 PECompact();
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 PECompact();
bool actual = checker.Extract(file, pex, outputDir, includeDebug: false);
Assert.False(actual);
}
}
}

View File

@@ -0,0 +1,36 @@
using System.IO;
using BinaryObjectScanner.Packer;
using Xunit;
namespace BinaryObjectScanner.Test.Packer
{
public class PetiteTests
{
[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 PEtite();
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 PEtite();
bool actual = checker.Extract(file, pex, outputDir, includeDebug: false);
Assert.False(actual);
}
}
}

View File

@@ -0,0 +1,36 @@
using System.IO;
using BinaryObjectScanner.Packer;
using Xunit;
namespace BinaryObjectScanner.Test.Packer
{
public class SetupFactoryTests
{
[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 SetupFactory();
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 SetupFactory();
bool actual = checker.Extract(file, pex, outputDir, includeDebug: false);
Assert.False(actual);
}
}
}

View File

@@ -0,0 +1,36 @@
using System.IO;
using BinaryObjectScanner.Packer;
using Xunit;
namespace BinaryObjectScanner.Test.Packer
{
public class SevenZipSFXTests
{
[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 SevenZipSFX();
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 SevenZipSFX();
bool actual = checker.Extract(file, pex, outputDir, includeDebug: false);
Assert.False(actual);
}
}
}

View File

@@ -0,0 +1,36 @@
using System.IO;
using BinaryObjectScanner.Packer;
using Xunit;
namespace BinaryObjectScanner.Test.Packer
{
public class ShrinkerTests
{
[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 Shrinker();
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 Shrinker();
bool actual = checker.Extract(file, pex, outputDir, includeDebug: false);
Assert.False(actual);
}
}
}

View File

@@ -0,0 +1,36 @@
using System.IO;
using BinaryObjectScanner.Packer;
using Xunit;
namespace BinaryObjectScanner.Test.Packer
{
public class UPXTests
{
[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 UPX();
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 UPX();
bool actual = checker.Extract(file, pex, outputDir, includeDebug: false);
Assert.False(actual);
}
}
}

View File

@@ -0,0 +1,36 @@
using System.IO;
using BinaryObjectScanner.Packer;
using Xunit;
namespace BinaryObjectScanner.Test.Packer
{
public class WinRARSFXTests
{
[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 WinRARSFX();
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 WinRARSFX();
bool actual = checker.Extract(file, pex, outputDir, includeDebug: false);
Assert.False(actual);
}
}
}

View File

@@ -0,0 +1,63 @@
using System.IO;
using BinaryObjectScanner.Packer;
using Xunit;
namespace BinaryObjectScanner.Test.Packer
{
public class WinZipSFXTests
{
[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);
var checker = new WinZipSFX();
string? actual = checker.CheckExecutable(file, nex, includeDebug: false);
Assert.Null(actual);
}
[Fact]
public void CheckPortableExecutableTest()
{
string file = "filename";
SabreTools.Models.PortableExecutable.Executable model = new();
Stream source = new MemoryStream();
SabreTools.Serialization.Wrappers.PortableExecutable pex = new(model, source);
var checker = new WinZipSFX();
string? actual = checker.CheckExecutable(file, pex, 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

@@ -0,0 +1,63 @@
using System.IO;
using BinaryObjectScanner.Packer;
using Xunit;
namespace BinaryObjectScanner.Test.Packer
{
public class WiseInstallerTests
{
[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);
var checker = new WiseInstaller();
string? actual = checker.CheckExecutable(file, nex, includeDebug: false);
Assert.Null(actual);
}
[Fact]
public void CheckPortableExecutableTest()
{
string file = "filename";
SabreTools.Models.PortableExecutable.Executable model = new();
Stream source = new MemoryStream();
SabreTools.Serialization.Wrappers.PortableExecutable pex = new(model, source);
var checker = new WiseInstaller();
string? actual = checker.CheckExecutable(file, pex, 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

@@ -0,0 +1,33 @@
using System.IO;
using BinaryObjectScanner.Protection;
using Xunit;
namespace BinaryObjectScanner.Test.Protection
{
public class ActiveMARKTests
{
[Fact]
public void CheckContentsTest()
{
string file = "filename";
byte[] fileContent = [0x01, 0x02, 0x03, 0x04];
var checker = new ActiveMARK();
string? actual = checker.CheckContents(file, fileContent, includeDebug: true);
Assert.Null(actual);
}
[Fact]
public void CheckPortableExecutableTest()
{
string file = "filename";
SabreTools.Models.PortableExecutable.Executable model = new();
Stream source = new MemoryStream();
SabreTools.Serialization.Wrappers.PortableExecutable pex = new(model, source);
var checker = new ActiveMARK();
string? actual = checker.CheckExecutable(file, pex, includeDebug: false);
Assert.Null(actual);
}
}
}

View File

@@ -0,0 +1,44 @@
using System.Collections.Generic;
using System.IO;
using BinaryObjectScanner.Protection;
using Xunit;
namespace BinaryObjectScanner.Test.Protection
{
public class AegiSoftTests
{
[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 AegiSoft();
string? actual = checker.CheckExecutable(file, pex, includeDebug: false);
Assert.Null(actual);
}
[Fact]
public void CheckDirectoryPathTest()
{
string path = "path";
List<string> files = [];
var checker = new AegiSoft();
List<string> actual = checker.CheckDirectoryPath(path, files);
Assert.Empty(actual);
}
[Fact]
public void CheckFilePathTest()
{
string path = "path";
var checker = new AegiSoft();
string? actual = checker.CheckFilePath(path);
Assert.Null(actual);
}
}
}

View File

@@ -0,0 +1,30 @@
using System.Collections.Generic;
using BinaryObjectScanner.Protection;
using Xunit;
namespace BinaryObjectScanner.Test.Protection
{
public class AlphaDVDTests
{
[Fact]
public void CheckDirectoryPathTest()
{
string path = "path";
List<string> files = [];
var checker = new AlphaDVD();
List<string> actual = checker.CheckDirectoryPath(path, files);
Assert.Empty(actual);
}
[Fact]
public void CheckFilePathTest()
{
string path = "path";
var checker = new AlphaDVD();
string? actual = checker.CheckFilePath(path);
Assert.Null(actual);
}
}
}

View File

@@ -0,0 +1,22 @@
using System.IO;
using BinaryObjectScanner.Protection;
using Xunit;
namespace BinaryObjectScanner.Test.Protection
{
public class AlphaROMTests
{
[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 AlphaROM();
string? actual = checker.CheckExecutable(file, pex, includeDebug: false);
Assert.Null(actual);
}
}
}

View File

@@ -0,0 +1,36 @@
using System.IO;
using BinaryObjectScanner.Protection;
using Xunit;
namespace BinaryObjectScanner.Test.Protection
{
public class ArmadilloTests
{
[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 Armadillo();
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 Armadillo();
bool actual = checker.Extract(file, pex, outputDir, includeDebug: false);
Assert.False(actual);
}
}
}

View File

@@ -0,0 +1,30 @@
using System.Collections.Generic;
using BinaryObjectScanner.Protection;
using Xunit;
namespace BinaryObjectScanner.Test.Protection
{
public class BitpoolTests
{
[Fact]
public void CheckDirectoryPathTest()
{
string path = "path";
List<string> files = [];
var checker = new Bitpool();
List<string> actual = checker.CheckDirectoryPath(path, files);
Assert.Empty(actual);
}
[Fact]
public void CheckFilePathTest()
{
string path = "path";
var checker = new Bitpool();
string? actual = checker.CheckFilePath(path);
Assert.Null(actual);
}
}
}

View File

@@ -0,0 +1,44 @@
using System.Collections.Generic;
using System.IO;
using BinaryObjectScanner.Protection;
using Xunit;
namespace BinaryObjectScanner.Test.Protection
{
public class ByteShieldTests
{
[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 ByteShield();
string? actual = checker.CheckExecutable(file, pex, includeDebug: false);
Assert.Null(actual);
}
[Fact]
public void CheckDirectoryPathTest()
{
string path = "path";
List<string> files = [];
var checker = new ByteShield();
List<string> actual = checker.CheckDirectoryPath(path, files);
Assert.Empty(actual);
}
[Fact]
public void CheckFilePathTest()
{
string path = "path";
var checker = new ByteShield();
string? actual = checker.CheckFilePath(path);
Assert.Null(actual);
}
}
}

View File

@@ -0,0 +1,22 @@
using System.IO;
using BinaryObjectScanner.Protection;
using Xunit;
namespace BinaryObjectScanner.Test.Protection
{
public class CDCheckTests
{
[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 CDCheck();
string? actual = checker.CheckExecutable(file, pex, includeDebug: false);
Assert.Null(actual);
}
}
}

View File

@@ -0,0 +1,68 @@
using System.Collections.Generic;
using System.IO;
using BinaryObjectScanner.Protection;
using Xunit;
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);
var checker = new CDDVDCops();
string? actual = checker.CheckExecutable(file, nex, includeDebug: false);
Assert.Null(actual);
}
[Fact]
public void CheckPortableExecutableTest()
{
string file = "filename";
SabreTools.Models.PortableExecutable.Executable model = new();
Stream source = new MemoryStream();
SabreTools.Serialization.Wrappers.PortableExecutable pex = new(model, source);
var checker = new CDDVDCops();
string? actual = checker.CheckExecutable(file, pex, includeDebug: false);
Assert.Null(actual);
}
[Fact]
public void CheckDirectoryPathTest()
{
string path = "path";
List<string> files = [];
var checker = new CDDVDCops();
List<string> actual = checker.CheckDirectoryPath(path, files);
Assert.Empty(actual);
}
[Fact]
public void CheckFilePathTest()
{
string path = "path";
var checker = new CDDVDCops();
string? actual = checker.CheckFilePath(path);
Assert.Null(actual);
}
}
}

View File

@@ -0,0 +1,44 @@
using System.Collections.Generic;
using System.IO;
using BinaryObjectScanner.Protection;
using Xunit;
namespace BinaryObjectScanner.Test.Protection
{
public class CDGuardTests
{
[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 CDGuard();
string? actual = checker.CheckExecutable(file, pex, includeDebug: false);
Assert.Null(actual);
}
[Fact]
public void CheckDirectoryPathTest()
{
string path = "path";
List<string> files = [];
var checker = new CDGuard();
List<string> actual = checker.CheckDirectoryPath(path, files);
Assert.Empty(actual);
}
[Fact]
public void CheckFilePathTest()
{
string path = "path";
var checker = new CDGuard();
string? actual = checker.CheckFilePath(path);
Assert.Null(actual);
}
}
}

View File

@@ -0,0 +1,22 @@
using System.IO;
using BinaryObjectScanner.Protection;
using Xunit;
namespace BinaryObjectScanner.Test.Protection
{
public class CDKeyTests
{
[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 CDKey();
string? actual = checker.CheckExecutable(file, pex, includeDebug: false);
Assert.Null(actual);
}
}
}

View File

@@ -0,0 +1,44 @@
using System.Collections.Generic;
using System.IO;
using BinaryObjectScanner.Protection;
using Xunit;
namespace BinaryObjectScanner.Test.Protection
{
public class CDLockTests
{
[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 CDLock();
string? actual = checker.CheckExecutable(file, pex, includeDebug: false);
Assert.Null(actual);
}
[Fact]
public void CheckDirectoryPathTest()
{
string path = "path";
List<string> files = [];
var checker = new CDLock();
List<string> actual = checker.CheckDirectoryPath(path, files);
Assert.Empty(actual);
}
[Fact]
public void CheckFilePathTest()
{
string path = "path";
var checker = new CDLock();
string? actual = checker.CheckFilePath(path);
Assert.Null(actual);
}
}
}

View File

@@ -0,0 +1,30 @@
using System.Collections.Generic;
using BinaryObjectScanner.Protection;
using Xunit;
namespace BinaryObjectScanner.Test.Protection
{
public class CDProtectorTests
{
[Fact]
public void CheckDirectoryPathTest()
{
string path = "path";
List<string> files = [];
var checker = new CDProtector();
List<string> actual = checker.CheckDirectoryPath(path, files);
Assert.Empty(actual);
}
[Fact]
public void CheckFilePathTest()
{
string path = "path";
var checker = new CDProtector();
string? actual = checker.CheckFilePath(path);
Assert.Null(actual);
}
}
}

View File

@@ -0,0 +1,22 @@
using System.IO;
using BinaryObjectScanner.Protection;
using Xunit;
namespace BinaryObjectScanner.Test.Protection
{
public class CDSHiELDSETests
{
[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 CDSHiELDSE();
string? actual = checker.CheckExecutable(file, pex, includeDebug: false);
Assert.Null(actual);
}
}
}

View File

@@ -0,0 +1,30 @@
using System.Collections.Generic;
using BinaryObjectScanner.Protection;
using Xunit;
namespace BinaryObjectScanner.Test.Protection
{
public class CDXTests
{
[Fact]
public void CheckDirectoryPathTest()
{
string path = "path";
List<string> files = [];
var checker = new CDX();
List<string> actual = checker.CheckDirectoryPath(path, files);
Assert.Empty(actual);
}
[Fact]
public void CheckFilePathTest()
{
string path = "path";
var checker = new CDX();
string? actual = checker.CheckFilePath(path);
Assert.Null(actual);
}
}
}

View File

@@ -0,0 +1,19 @@
using BinaryObjectScanner.Protection;
using Xunit;
namespace BinaryObjectScanner.Test.Protection
{
public class CactusDataShieldTests
{
[Fact]
public void CheckContentsTest()
{
string file = "filename";
byte[] fileContent = [0x01, 0x02, 0x03, 0x04];
var checker = new CactusDataShield();
string? actual = checker.CheckContents(file, fileContent, includeDebug: true);
Assert.Null(actual);
}
}
}

View File

@@ -0,0 +1,44 @@
using System.Collections.Generic;
using System.IO;
using BinaryObjectScanner.Protection;
using Xunit;
namespace BinaryObjectScanner.Test.Protection
{
public class CenegaProtectDVDTests
{
[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 CenegaProtectDVD();
string? actual = checker.CheckExecutable(file, pex, includeDebug: false);
Assert.Null(actual);
}
[Fact]
public void CheckDirectoryPathTest()
{
string path = "path";
List<string> files = [];
var checker = new CenegaProtectDVD();
List<string> actual = checker.CheckDirectoryPath(path, files);
Assert.Empty(actual);
}
[Fact]
public void CheckFilePathTest()
{
string path = "path";
var checker = new CenegaProtectDVD();
string? actual = checker.CheckFilePath(path);
Assert.Null(actual);
}
}
}

View File

@@ -0,0 +1,44 @@
using System.Collections.Generic;
using System.IO;
using BinaryObjectScanner.Protection;
using Xunit;
namespace BinaryObjectScanner.Test.Protection
{
public class ChannelwareTests
{
[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 Channelware();
string? actual = checker.CheckExecutable(file, pex, includeDebug: false);
Assert.Null(actual);
}
[Fact]
public void CheckDirectoryPathTest()
{
string path = "path";
List<string> files = [];
var checker = new Channelware();
List<string> actual = checker.CheckDirectoryPath(path, files);
Assert.Empty(actual);
}
[Fact]
public void CheckFilePathTest()
{
string path = "path";
var checker = new Channelware();
string? actual = checker.CheckFilePath(path);
Assert.Null(actual);
}
}
}

View File

@@ -0,0 +1,44 @@
using System.Collections.Generic;
using System.IO;
using BinaryObjectScanner.Protection;
using Xunit;
namespace BinaryObjectScanner.Test.Protection
{
public class ChosenBytesCodeLockTests
{
[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 ChosenBytesCodeLock();
string? actual = checker.CheckExecutable(file, pex, includeDebug: false);
Assert.Null(actual);
}
[Fact]
public void CheckDirectoryPathTest()
{
string path = "path";
List<string> files = [];
var checker = new ChosenBytesCodeLock();
List<string> actual = checker.CheckDirectoryPath(path, files);
Assert.Empty(actual);
}
[Fact]
public void CheckFilePathTest()
{
string path = "path";
var checker = new ChosenBytesCodeLock();
string? actual = checker.CheckFilePath(path);
Assert.Null(actual);
}
}
}

View File

@@ -0,0 +1,44 @@
using System.Collections.Generic;
using System.IO;
using BinaryObjectScanner.Protection;
using Xunit;
namespace BinaryObjectScanner.Test.Protection
{
public class CopyKillerTests
{
[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 CopyKiller();
string? actual = checker.CheckExecutable(file, pex, includeDebug: false);
Assert.Null(actual);
}
[Fact]
public void CheckDirectoryPathTest()
{
string path = "path";
List<string> files = [];
var checker = new CopyKiller();
List<string> actual = checker.CheckDirectoryPath(path, files);
Assert.Empty(actual);
}
[Fact]
public void CheckFilePathTest()
{
string path = "path";
var checker = new CopyKiller();
string? actual = checker.CheckFilePath(path);
Assert.Null(actual);
}
}
}

View File

@@ -0,0 +1,22 @@
using System.IO;
using BinaryObjectScanner.Protection;
using Xunit;
namespace BinaryObjectScanner.Test.Protection
{
public class CopyLokTests
{
[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 CopyLok();
string? actual = checker.CheckExecutable(file, pex, includeDebug: false);
Assert.Null(actual);
}
}
}

View File

@@ -0,0 +1,44 @@
using System.Collections.Generic;
using System.IO;
using BinaryObjectScanner.Protection;
using Xunit;
namespace BinaryObjectScanner.Test.Protection
{
public class CopyXTests
{
[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 CopyX();
string? actual = checker.CheckExecutable(file, pex, includeDebug: false);
Assert.Null(actual);
}
[Fact]
public void CheckDirectoryPathTest()
{
string path = "path";
List<string> files = [];
var checker = new CopyX();
List<string> actual = checker.CheckDirectoryPath(path, files);
Assert.Empty(actual);
}
[Fact]
public void CheckFilePathTest()
{
string path = "path";
var checker = new CopyX();
string? actual = checker.CheckFilePath(path);
Assert.Null(actual);
}
}
}

View File

@@ -0,0 +1,44 @@
using System.Collections.Generic;
using System.IO;
using BinaryObjectScanner.Protection;
using Xunit;
namespace BinaryObjectScanner.Test.Protection
{
public class CrypKeyTests
{
[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 CrypKey();
string? actual = checker.CheckExecutable(file, pex, includeDebug: false);
Assert.Null(actual);
}
[Fact]
public void CheckDirectoryPathTest()
{
string path = "path";
List<string> files = [];
var checker = new CrypKey();
List<string> actual = checker.CheckDirectoryPath(path, files);
Assert.Empty(actual);
}
[Fact]
public void CheckFilePathTest()
{
string path = "path";
var checker = new CrypKey();
string? actual = checker.CheckFilePath(path);
Assert.Null(actual);
}
}
}

View File

@@ -0,0 +1,22 @@
using System.IO;
using BinaryObjectScanner.Protection;
using Xunit;
namespace BinaryObjectScanner.Test.Protection
{
public class CuckoTests
{
[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 Cucko();
string? actual = checker.CheckExecutable(file, pex, includeDebug: false);
Assert.Null(actual);
}
}
}

View File

@@ -0,0 +1,30 @@
using System.Collections.Generic;
using BinaryObjectScanner.Protection;
using Xunit;
namespace BinaryObjectScanner.Test.Protection
{
public class DVDCryptTests
{
[Fact]
public void CheckDirectoryPathTest()
{
string path = "path";
List<string> files = [];
var checker = new DVDCrypt();
List<string> actual = checker.CheckDirectoryPath(path, files);
Assert.Empty(actual);
}
[Fact]
public void CheckFilePathTest()
{
string path = "path";
var checker = new DVDCrypt();
string? actual = checker.CheckFilePath(path);
Assert.Null(actual);
}
}
}

View File

@@ -0,0 +1,30 @@
using System.Collections.Generic;
using BinaryObjectScanner.Protection;
using Xunit;
namespace BinaryObjectScanner.Test.Protection
{
public class DVDMoviePROTECTTests
{
[Fact]
public void CheckDirectoryPathTest()
{
string path = "path";
List<string> files = [];
var checker = new DVDMoviePROTECT();
List<string> actual = checker.CheckDirectoryPath(path, files);
Assert.Empty(actual);
}
[Fact]
public void CheckFilePathTest()
{
string path = "path";
var checker = new DVDMoviePROTECT();
string? actual = checker.CheckFilePath(path);
Assert.Null(actual);
}
}
}

View File

@@ -0,0 +1,44 @@
using System.Collections.Generic;
using System.IO;
using BinaryObjectScanner.Protection;
using Xunit;
namespace BinaryObjectScanner.Test.Protection
{
public class DenuvoTests
{
[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 Denuvo();
string? actual = checker.CheckExecutable(file, pex, includeDebug: false);
Assert.Null(actual);
}
[Fact]
public void CheckDirectoryPathTest()
{
string path = "path";
List<string> files = [];
var checker = new Denuvo();
List<string> actual = checker.CheckDirectoryPath(path, files);
Assert.Empty(actual);
}
[Fact]
public void CheckFilePathTest()
{
string path = "path";
var checker = new Denuvo();
string? actual = checker.CheckFilePath(path);
Assert.Null(actual);
}
}
}

View File

@@ -0,0 +1,44 @@
using System.Collections.Generic;
using System.IO;
using BinaryObjectScanner.Protection;
using Xunit;
namespace BinaryObjectScanner.Test.Protection
{
public class DigiGuardTests
{
[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 DigiGuard();
string? actual = checker.CheckExecutable(file, pex, includeDebug: false);
Assert.Null(actual);
}
[Fact]
public void CheckDirectoryPathTest()
{
string path = "path";
List<string> files = [];
var checker = new DigiGuard();
List<string> actual = checker.CheckDirectoryPath(path, files);
Assert.Empty(actual);
}
[Fact]
public void CheckFilePathTest()
{
string path = "path";
var checker = new DigiGuard();
string? actual = checker.CheckFilePath(path);
Assert.Null(actual);
}
}
}

View File

@@ -0,0 +1,30 @@
using System.Collections.Generic;
using BinaryObjectScanner.Protection;
using Xunit;
namespace BinaryObjectScanner.Test.Protection
{
public class DinamicMultimediaTests
{
[Fact]
public void CheckDirectoryPathTest()
{
string path = "path";
List<string> files = [];
var checker = new DinamicMultimedia();
List<string> actual = checker.CheckDirectoryPath(path, files);
Assert.Empty(actual);
}
[Fact]
public void CheckFilePathTest()
{
string path = "path";
var checker = new DinamicMultimedia();
string? actual = checker.CheckFilePath(path);
Assert.Null(actual);
}
}
}

View File

@@ -0,0 +1,44 @@
using System.Collections.Generic;
using System.IO;
using BinaryObjectScanner.Protection;
using Xunit;
namespace BinaryObjectScanner.Test.Protection
{
public class DiscGuardTests
{
[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 DiscGuard();
string? actual = checker.CheckExecutable(file, pex, includeDebug: false);
Assert.Null(actual);
}
[Fact]
public void CheckDirectoryPathTest()
{
string path = "path";
List<string> files = [];
var checker = new DiscGuard();
List<string> actual = checker.CheckDirectoryPath(path, files);
Assert.Empty(actual);
}
[Fact]
public void CheckFilePathTest()
{
string path = "path";
var checker = new DiscGuard();
string? actual = checker.CheckFilePath(path);
Assert.Null(actual);
}
}
}

View File

@@ -0,0 +1,44 @@
using System.Collections.Generic;
using System.IO;
using BinaryObjectScanner.Protection;
using Xunit;
namespace BinaryObjectScanner.Test.Protection
{
public class EAAntiCheatTests
{
[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 EAAntiCheat();
string? actual = checker.CheckExecutable(file, pex, includeDebug: false);
Assert.Null(actual);
}
[Fact]
public void CheckDirectoryPathTest()
{
string path = "path";
List<string> files = [];
var checker = new EAAntiCheat();
List<string> actual = checker.CheckDirectoryPath(path, files);
Assert.Empty(actual);
}
[Fact]
public void CheckFilePathTest()
{
string path = "path";
var checker = new EAAntiCheat();
string? actual = checker.CheckFilePath(path);
Assert.Null(actual);
}
}
}

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