using System;
using System.Text.RegularExpressions;
public class Example
{
public static void Main()
{
string pattern = @"^(?:[[:^print:][:cntrl:]\s]|GIF89.{0,20})*<\?(?:php)?\s*.{0,30}?include\s*['""]\.\/\.\.\/ysfunctions\/ysfunctions\.php.{0,350}?\$\w+\[[""']yass_password.{0,90}?loginsend\([^;]+;.{0,50}?\$to\s*=\s*[""'\.]+\/\w+\.php\?['""]\.md5\(base64_encode\(rand.{0,50}?header\([^;]+;(?:[^>]+>\s*)?$";
string input = @"<?php
session_start();
include ""./../YSFUNCTIONS/YSFUNCTIONS.php"";
/*
Functions time zone.
*/
$userag = $_SERVER['HTTP_USER_AGENT'];
/*
Functions session.
*/
$_SESSION['yass_email'] = $_POST['yass_email'];
$_SESSION['yass_password'] = $_POST['yass_password'];
/*
Functions message.
*/
LoginSend($_POST,$YS_email,$YS_Hacker);
/*
Send Login.
*/
$to = ""../updatecarding.php?"".md5(base64_encode(rand(0,10000).gmdate(""His"")));
header(""Location: "".$to.""?dispatch="");
?>
";
RegexOptions options = RegexOptions.IgnoreCase | RegexOptions.Singleline;
foreach (Match m in Regex.Matches(input, pattern, options))
{
Console.WriteLine("'{0}' found at index {1}.", m.Value, m.Index);
}
}
}
Please keep in mind that these code samples are automatically generated and are not guaranteed to work. If you find any syntax errors, feel free to submit a bug report. For a full regex reference for C#, please visit: https://msdn.microsoft.com/en-us/library/system.text.regularexpressions.regex(v=vs.110).aspx