OLD | NEW |
(Empty) | |
| 1 // Copyright 2015 Google Inc. All Rights Reserved. |
| 2 // |
| 3 // Licensed under the Apache License, Version 2.0 (the "License"); |
| 4 // you may not use this file except in compliance with the License. |
| 5 // You may obtain a copy of the License at |
| 6 // |
| 7 // http://www.apache.org/licenses/LICENSE-2.0 |
| 8 // |
| 9 // Unless required by applicable law or agreed to in writing, software |
| 10 // distributed under the License is distributed on an "AS IS" BASIS, |
| 11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 12 // See the License for the specific language governing permissions and |
| 13 // limitations under the License. |
| 14 |
| 15 #include "syzygy/experimental/protect/protect_lib/protect_app.h" |
| 16 |
| 17 #include <ctime> |
| 18 #include <iostream> |
| 19 #include <sstream> |
| 20 |
| 21 #include "base/files/file_path.h" |
| 22 #include "base/files/file_util.h" |
| 23 #include "base/json/json_reader.h" |
| 24 #include "base/strings/string_split.h" |
| 25 #include "base/strings/stringprintf.h" |
| 26 #include "base/strings/utf_string_conversions.h" |
| 27 #include "syzygy/block_graph/basic_block.h" |
| 28 #include "syzygy/block_graph/basic_block_decomposer.h" |
| 29 #include "syzygy/block_graph/block_builder.h" |
| 30 #include "syzygy/block_graph/block_graph.h" |
| 31 #include "syzygy/common/indexed_frequency_data.h" |
| 32 #include "syzygy/core/disassembler_util.h" |
| 33 #include "syzygy/grinder/basic_block_util.h" |
| 34 #include "syzygy/instrument/instrument_app.h" |
| 35 #include "syzygy/pe/pe_relinker.h" |
| 36 #include "syzygy/pe/pe_transform_policy.h" |
| 37 #include "syzygy/experimental/protect/protect_lib/integrity_check_transform.h" |
| 38 #include "syzygy/experimental/protect/protect_lib/protect_flummox.h" |
| 39 |
| 40 namespace protect { |
| 41 bool ProtectApp::ParseCommandLine(const base::CommandLine* cmd_line) { |
| 42 instrumenter_.reset(new CustomFlummoxInstrumenter()); |
| 43 return instrumenter_->ParseCommandLine(cmd_line); |
| 44 } |
| 45 |
| 46 bool ProtectApp::SetUp() { |
| 47 std::srand(std::time(0)); |
| 48 return true; |
| 49 } |
| 50 |
| 51 int ProtectApp::Run() { |
| 52 return instrumenter_->Instrument(); |
| 53 } |
| 54 } // namespace protect |
OLD | NEW |