Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- error_reporting(0);
- /**
- * @Author: SHOR7CUT
- * @Date: 2018-06-26 03:57:16
- * @Last Modified by: SHOR7CUT
- * @Last Modified time: 2018-08-13 16:52:33
- */
- // source : https://pastebin.com/HPgHU7YS
- // use : php namefile.php letter.html
- $val = file_get_contents($argv[1]);
- preg_match_all('/(.*): (.*)/m', $val, $matches);
- foreach ($matches[1] as $key => $value) {
- if(!preg_match("/Content-Type|Received|Authentication-Results|Received-SPF|DKIM|From|Date|To|Reply-To|Subject|MIME-Version/", $value) && !empty($value) && !empty($matches[2][$key]) && !preg_match('#(?<=<)\w+(?=[^<]*?>)#', $value) && !preg_match('#(?<=<)\w+(?=[^<]*?>)#', $matches[2][$key]) && preg_match('/-/', $value) && !preg_match('/{|style=/', $value)){
- echo "'$value' => '".trim($matches[2][$key])."',"."\r\n";
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement