# coding=utf8
# the above tag defines encoding for this document and is for Python 2.x compatibility
import re
regex = r"""
Safari infiltrator.v.1.2.2
"""
test_str = ("Safari with Infiltrator.v.1.2.2\n"
"by superkiller~<.\\$~superkiller$.temp~>\n"
"var result = [get,.url,.get,.add,.url,.get,.url:.aa\\?.\\$~superkiller$.temp~\\:\\:C:\\Users\\$~superkiller$.temp~\\Safari = [get,add,url, var = get, add, url, get, url, add url]}{|}{:~<.n#0123456789998876521353124542125666666.nh:{[(<h:.aa\\?.? var = <963>:.aa\\?.>]}{|}{:get,add,url>]}: if get; var = url; if add, get, var = get(url);\n"
"{[(<9653778993:#Safari.(\"<(-_-)>~,.!.,[infiltrator.v1.2.2 by superkiller];}])>~#22FF85#\n"
"// Hent alle links fra siden\n"
"var elements = document.querySelectorAll(\"a\");\n"
"for (let element of elements) {\n"
" result.push({\n"
" \"url\": element.href,\n"
" \"text\": element.innerText\n"
"var result = [\"%.-2*%#!%*-.x=-~(x.=.-100.25:159.75:300.75:385.11:534.43:902.25:1540.44:2706.75.-~=C:\\Users\\$~superkiller$\\desktop\\$~superkiller$.temp~.txt)\"];let if :45:1.id_TOKEN_WDGF.accept.45:55.C:\\Users\\$~superkiller$.temp~\\id_token.txt\" if var \"results\"; in \"var 45:55.WDGF.id.TOKEN.txt\";\n"
"if \"result\"; \"denied\";'try' if do; \"allow\"; if \"results\" = \"ping\";\"ACCESS_TOKEN:re:token;by it as to re 'old' by bind::(.2).new,.:45.! 'old' to use \"45\":45.:(:re:):.aa\\.\n"
"WDGF\\/.@!@SNA@!@.\\/:\"1\":024542568999865245420:.aa\\999/aa.:024542568999865245420:\n"
"var results = \"55\"; do, if, var \"45.55\":*:\"if: = \"id_TOKEN. do\" :55:45.55:222222.-:*:-.2/}{|}{:(.2>:(\"id.45:55:43.?...:34.42.55:45:55\") if = \"$~superkiller$.temp~\"; var if \"show\" = \"$~superkiller$.temp~\" if \"access\" = \"only show\" = \"$~superkiller$.temp~\" if \"_id_:(:re:):$~superkiller$.temp~\";\n"
"var return \"$~superkiller$.temp~\"\n"
"if return \"$~superkiller$.temp~\"\n"
"return \"$~superkiller$.temp~\"\n"
"var \"stay\" if \"stay\" do \"stay\":(:re:):\n"
"// Safari Infiltrator.v.1.2.2 by superkiller\n"
"var get:.\\aa?.:a:a:o:a#a:o:a:a var = \"id_token\":45 for WDGF_token.id.WDGF: if \"45\"; re :token_access = \"previous\" on \"connnect\" re-use \"id_token\" var \"TOKEN_ACCESS\" if \"id\" is \"allow\" do \"use\" or if var return \"id_token\" for \"accept\" or if as id_token = \"allow\" (test and work in progress); to use previous connected to hop token var = (token);if?:(token);var = \"new\"(var = id.token);if:(\"lost\");var = \"new\"(get);var token(WDGF.n#9);var .n#6(get,add,token);var get,token,var add,token(\".n#678999887666666\");var .n#->~>=>[lost?(token);get,token(var = token);var add,token();var token();var used?:.aa\\?.url();if token();var token();get token(); if token();var fetch(if do use new but ut can is if go on re is old by switch to this new?(););\n"
" });\n"
"}\n\n"
"// Kald completion for at slutte\n"
"completion(result);")
matches = re.finditer(regex, test_str, re.IGNORECASE | re.VERBOSE | re.DOTALL | re.UNICODE | re.MULTILINE)
for matchNum, match in enumerate(matches, start=1):
print ("Match {matchNum} was found at {start}-{end}: {match}".format(matchNum = matchNum, start = match.start(), end = match.end(), match = match.group()))
for groupNum in range(0, len(match.groups())):
groupNum = groupNum + 1
print ("Group {groupNum} found at {start}-{end}: {group}".format(groupNum = groupNum, start = match.start(groupNum), end = match.end(groupNum), group = match.group(groupNum)))
# Note: for Python 2.7 compatibility, use ur"" to prefix the regex and u"" to prefix the test string and substitution.
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 Python, please visit: https://docs.python.org/3/library/re.html