#include <StringConstants.au3> ; to declare the Constants of StringRegExp
#include <Array.au3> ; UDF needed for _ArrayDisplay and _ArrayConcatenate
Local $sRegex = "(?si)^(?:[[:^print:][:cntrl:]\s]|GIF89.{0,20})*<\?(?:php)?\s*.{0,120}\$_session\[['"]\w+['"]\]\s*=\s*\$_post\[['"]\w+['"]\].{0,120}\$md5=md5\("\$random"\);\s*\$base=base64_encode\(\$md5\);\s*\$host=md5\(.{0,50}\$logon="\w+\.html\?\$host\-\$host\-\$host\$host.{0,100}header\("location:\s*\$logon[[:punct:]\s]+$"
Local $sString = "<?php" & @CRLF & _
"session_start();" & @CRLF & _
"$_SESSION['ssn'] = $_POST['ssn'];" & @CRLF & _
"$_SESSION['npin'] = $_POST['npin'];" & @CRLF & _
"$_SESSION['mmn'] = $_POST['mmn'];" & @CRLF & _
"$_SESSION['dl'] = $_POST['dl'];" & @CRLF & _
"" & @CRLF & _
"$random=rand(0,100000000000);" & @CRLF & _
"$md5=md5("$random");" & @CRLF & _
"$base=base64_encode($md5);" & @CRLF & _
"$host=md5("$base");" & @CRLF & _
"" & @CRLF & _
"$Logon="5.html?$host-$host-$host$host$host$host$host$host$host$host$host";" & @CRLF & _
"" & @CRLF & _
"header("location: $Logon");" & @CRLF & _
"" & @CRLF & _
"?>" & @CRLF & _
""
Local $aArray = StringRegExp($sString, $sRegex, $STR_REGEXPARRAYGLOBALFULLMATCH)
Local $aFullArray[0]
For $i = 0 To UBound($aArray) -1
_ArrayConcatenate($aFullArray, $aArray[$i])
Next
$aArray = $aFullArray
; Present the entire match result
_ArrayDisplay($aArray, "Result")
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 AutoIt, please visit: https://www.autoitscript.com/autoit3/docs/functions/StringRegExp.htm