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

Side by Side Diff: sandbox/win/sandbox_poc/pocdll/spyware.cc

Issue 10689170: Move the Windows sandbox to sandbox/win (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase on top of tree (properly this time) Created 8 years, 5 months 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « sandbox/win/sandbox_poc/pocdll/registry.cc ('k') | sandbox/win/sandbox_poc/pocdll/utils.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2006-2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2009 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include <string> 5 #include <string>
6 #include "sandbox/sandbox_poc/pocdll/exports.h" 6 #include "sandbox/win/sandbox_poc/pocdll/exports.h"
7 #include "sandbox/sandbox_poc/pocdll/utils.h" 7 #include "sandbox/win/sandbox_poc/pocdll/utils.h"
8 8
9 // This file contains the tests used to verify the security of the system by 9 // This file contains the tests used to verify the security of the system by
10 // using some spying techniques. 10 // using some spying techniques.
11 11
12 void POCDLL_API TestSpyKeys(HANDLE log) { 12 void POCDLL_API TestSpyKeys(HANDLE log) {
13 HandleToFile handle2file; 13 HandleToFile handle2file;
14 FILE *output = handle2file.Translate(log, "w"); 14 FILE *output = handle2file.Translate(log, "w");
15 15
16 if (RegisterHotKey(NULL, 1, 0, 0x42)) { 16 if (RegisterHotKey(NULL, 1, 0, 0x42)) {
17 fprintf(output, "[GRANTED] successfully registered hotkey\r\n"); 17 fprintf(output, "[GRANTED] successfully registered hotkey\r\n");
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 if (::GetPixel(screen_dc, x, y) != pixel_color) { 57 if (::GetPixel(screen_dc, x, y) != pixel_color) {
58 fprintf(output, "[GRANTED] Read pixel on screen\r\n"); 58 fprintf(output, "[GRANTED] Read pixel on screen\r\n");
59 return; 59 return;
60 } 60 }
61 } 61 }
62 } 62 }
63 63
64 fprintf(output, "[BLOCKED] Read pixel on screen. Error = %d\r\n", 64 fprintf(output, "[BLOCKED] Read pixel on screen. Error = %d\r\n",
65 ::GetLastError()); 65 ::GetLastError());
66 } 66 }
OLDNEW
« no previous file with comments | « sandbox/win/sandbox_poc/pocdll/registry.cc ('k') | sandbox/win/sandbox_poc/pocdll/utils.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698