-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathweb_test.php
More file actions
executable file
·46 lines (32 loc) · 1.41 KB
/
Copy pathweb_test.php
File metadata and controls
executable file
·46 lines (32 loc) · 1.41 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
<?php
/******************************************************************
PHP Metamorphic Mutation Engine Web Test
----------------------------------------------------
This is a test file, shows a mutation of
'./mutation_chamber/test_file.php'
in HTML format, run it from a web browser.
By: Dominika Vladimirovskaya // 2009 // Soviet Union
dominika.vladimirov@comentalo.net
******************************************************************/
// Load Mutation engine
require_once './inc/mutation.class.php';
// Create a random new mutation.
$mutation = new Mutation();
$mutation->setCode( file_get_contents('./mutation_chamber/test_file.php') );
// Flags
$mutation->setFrecuency('MODIFY_NUMBERS',500); // 50% number modifications
$mutation->setFrecuency('MODIFY_QUOTED_STRINGS',100); // 10% quoted string modifications
$mutation->setFrecuency('MODIFY_DOUBLE_QUOTED_STRINGS',100);// 10% quoted string modifications
$mutation->setFrecuency('MODIFY_VARS',500); // 10% vars modification
$mutation->setFrecuency('MODIFY_FUNCTIONS',1000); // 100% functions modification
// Count time spend in mutation
$time_start = microtime(true);
$mutation->mutate();
//$mutation->test();
$time_end = microtime(true);
$time = $time_end - $time_start;
// Highlight and Show code
highlight_string($mutation->getCode());
echo "Mutation in $time seconds\n";
exit();
?>