Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
Andoryuuta committed Dec 29, 2020
0 parents commit 4460f87
Show file tree
Hide file tree
Showing 15 changed files with 57,096 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
out/*
.vs/*
6 changes: 6 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[submodule "extern/fmt"]
path = extern/fmt
url = https://github.com/fmtlib/fmt.git
[submodule "extern/minhook"]
path = extern/minhook
url = https://github.com/TsudaKageyu/minhook.git
22 changes: 22 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
cmake_minimum_required (VERSION 3.8)

project(MHWSafeNet VERSION "0.0.1")

set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)

add_subdirectory(extern)

add_library(MHWHashLogger SHARED
"src/main.cpp"
"src/SigScan.hpp"
"src/SigScan.cpp"
"src/size_assert.hpp"
"src/strackeror_logger.h")

target_include_directories (MHWHashLogger PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/src)
target_link_libraries(MHWHashLogger PUBLIC fmt::fmt)
target_link_libraries(MHWHashLogger PUBLIC minhook)


42 changes: 42 additions & 0 deletions CMakeSettings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
{
"configurations": [
{
"name": "x64-Debug",
"generator": "Ninja",
"configurationType": "Debug",
"inheritEnvironments": [ "msvc_x64_x64" ],
"buildRoot": "${projectDir}\\out\\build\\${name}",
"installRoot": "${projectDir}\\out\\install\\${name}",
"cmakeCommandArgs": "",
"buildCommandArgs": "",
"ctestCommandArgs": "",
"variables": []
},
{
"name": "x64-Clang-Release",
"generator": "Ninja",
"configurationType": "RelWithDebInfo",
"buildRoot": "${projectDir}\\out\\build\\${name}",
"installRoot": "${projectDir}\\out\\install\\${name}",
"cmakeCommandArgs": "",
"buildCommandArgs": "",
"ctestCommandArgs": "",
"inheritEnvironments": [ "clang_cl_x64_x64" ],
"variables": [],
"intelliSenseMode": "windows-msvc-x64"
},
{
"name": "x64-Clang-Debug",
"generator": "Ninja",
"configurationType": "Debug",
"buildRoot": "${projectDir}\\out\\build\\${name}",
"installRoot": "${projectDir}\\out\\install\\${name}",
"cmakeCommandArgs": "",
"buildCommandArgs": "",
"ctestCommandArgs": "",
"inheritEnvironments": [ "clang_cl_x64_x64" ],
"variables": [],
"intelliSenseMode": "windows-msvc-x64"
}
]
}
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2020 Andrew Gutekanst

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
20 changes: 20 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# MHW-HashLogger
A small plugin for Monster Hunter: World that hooks the game's CRC-32/JAMCRC and (inverted)CRC-32/ISCSI functions and logs unique hashes to disk.

## Installation & Usage
(Requires [Strackeror](https://github.com/Strackeror)'s [MHW plugin loader](https://www.nexusmods.com/monsterhunterworld/mods/1982))

1. Copy the latest release build `.dll` into the `{GAMEFOLDER}/NativePC/plugins` folder, or build yourself per the instruction below.
2. (Optional) Copy the existing `hash_log.txt` from this repo into your `{GAMEFOLDER}`.
3. Run the game and play, it will output unique hashes to the `{GAMEFOLDER}/hash_log.txt` file. This file is loaded and appened to on game restart, no need to back it up between runs.


## Building
1. Clone with `git clone --recurse-submodules -j8 git://github.com/Andoryuuta/MHW-HashLogger.git`
2. Open with Visual Studio 2019 via the "Open Folder" option (for cmake), and build with x64 clang.

## Contributing
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

## License
[MIT](https://choosealicense.com/licenses/mit/)
5 changes: 5 additions & 0 deletions extern/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
add_subdirectory(fmt)
add_subdirectory(minhook)

set_target_properties(fmt PROPERTIES FOLDER "extern/fmt")
set_target_properties(minhook PROPERTIES FOLDER "extern/minhook")
1 change: 1 addition & 0 deletions extern/fmt
Submodule fmt added at c9dd1e
1 change: 1 addition & 0 deletions extern/minhook
Submodule minhook added at 423d1e
Loading

0 comments on commit 4460f87

Please sign in to comment.