aboutsummaryrefslogtreecommitdiff
path: root/src/tools/connection_patcher/Helper.hpp
diff options
context:
space:
mode:
authorDJScias <DJScias@gmail.com>2015-06-30 16:05:50 +0200
committerCarbenium <carbenium@outlook.com>2015-07-03 22:15:52 +0200
commit7e906d7b1926394ba436315b7222b95f5473f79b (patch)
tree8a29dad02d272b37bc6da1a1e0cd29cecb25e5ae /src/tools/connection_patcher/Helper.hpp
parentc24787f6665b5ea2b696bdfa7134a19ab5a3c331 (diff)
Tools/ConnectionPatcher: Add 'versions' file patching method
* This is necessary to allow connection to 6.1.2 after the 6.2.0 update released. Patching is version aware. * Link is hardcoded to a github page after suggestion from Aokromes, it is not tied to any server this way * The usage is optional. To patch use the "-e" option * OOP-ify the tool a bit Original implementation by DJScias Closes #14980
Diffstat (limited to 'src/tools/connection_patcher/Helper.hpp')
-rw-r--r--src/tools/connection_patcher/Helper.hpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/tools/connection_patcher/Helper.hpp b/src/tools/connection_patcher/Helper.hpp
index 4458617708f..e0c4e8dd2de 100644
--- a/src/tools/connection_patcher/Helper.hpp
+++ b/src/tools/connection_patcher/Helper.hpp
@@ -20,16 +20,27 @@
#define CONNECTION_PATCHER_HELPER_HPP
#include "Constants/BinaryTypes.hpp"
+#include "Patterns/Common.hpp"
+#include <boost/filesystem.hpp>
+#include <boost/asio.hpp>
#include <vector>
+#include <set>
#include <string>
+#include <stdexcept>
+#include <SHA256.h>
+#include <Util.h>
namespace Connection_Patcher
{
namespace Helper
{
+ void CopyDir(boost::filesystem::path const & source, boost::filesystem::path const & destination);
+ void DownloadFile(const std::string& serverName, int port, const std::string& getCommand, std::ostream& out);
Constants::BinaryTypes GetBinaryType(std::vector<unsigned char> const& data);
std::string GetFileChecksum(std::vector<unsigned char> const& data);
+ std::set<size_t> SearchOffset(std::vector<unsigned char> const& binary, std::vector<unsigned char> const& pattern);
+ uint32_t GetBuildNumber(std::vector<unsigned char> const& binary);
}
}