Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(612)

Unified Diff: syzygy/experimental/protect/protect_lib/protect_app.cc

Issue 2535563002: Added all code for integrity check transform (Closed)
Patch Set: Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: syzygy/experimental/protect/protect_lib/protect_app.cc
diff --git a/syzygy/experimental/protect/protect_lib/protect_app.cc b/syzygy/experimental/protect/protect_lib/protect_app.cc
new file mode 100644
index 0000000000000000000000000000000000000000..1ac2792c7d57614518a7e41c463efc70f5773c1b
--- /dev/null
+++ b/syzygy/experimental/protect/protect_lib/protect_app.cc
@@ -0,0 +1,54 @@
+// Copyright 2015 Google Inc. All Rights Reserved.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+#include "syzygy/experimental/protect/protect_lib/protect_app.h"
+
+#include <ctime>
+#include <iostream>
+#include <sstream>
+
+#include "base/files/file_path.h"
+#include "base/files/file_util.h"
+#include "base/json/json_reader.h"
+#include "base/strings/string_split.h"
+#include "base/strings/stringprintf.h"
+#include "base/strings/utf_string_conversions.h"
+#include "syzygy/block_graph/basic_block.h"
+#include "syzygy/block_graph/basic_block_decomposer.h"
+#include "syzygy/block_graph/block_builder.h"
+#include "syzygy/block_graph/block_graph.h"
+#include "syzygy/common/indexed_frequency_data.h"
+#include "syzygy/core/disassembler_util.h"
+#include "syzygy/grinder/basic_block_util.h"
+#include "syzygy/instrument/instrument_app.h"
+#include "syzygy/pe/pe_relinker.h"
+#include "syzygy/pe/pe_transform_policy.h"
+#include "syzygy/experimental/protect/protect_lib/integrity_check_transform.h"
+#include "syzygy/experimental/protect/protect_lib/protect_flummox.h"
+
+namespace protect {
+bool ProtectApp::ParseCommandLine(const base::CommandLine* cmd_line) {
+ instrumenter_.reset(new CustomFlummoxInstrumenter());
+ return instrumenter_->ParseCommandLine(cmd_line);
+}
+
+bool ProtectApp::SetUp() {
+ std::srand(std::time(0));
+ return true;
+}
+
+int ProtectApp::Run() {
+ return instrumenter_->Instrument();
+}
+} // namespace protect
« no previous file with comments | « syzygy/experimental/protect/protect_lib/protect_app.h ('k') | syzygy/experimental/protect/protect_lib/protect_flummox.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698