xxxxxxxxxx
import regex
s = 'bandau'
a = ['bamdau', 'Kandau', 'Ramayan', 'bandss', 'bazkqo', 'ban','baṃdau']
r = regex.compile('(?:'+regex.escape(s)+'){e<=1}')
for x in a:
if(r.fullmatch(x)):
print(x)
xxxxxxxxxx
?php
// CURL http get request
function curl_http_get ($url, $headers = []) {
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_USERAGENT, 'Mozilla/5.0 (Windows NT 10.0; WOW64; Trident/7.0; rv:11.0) like Gecko');
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
$output = curl_exec($ch);
curl_close($ch);
return json_decode($output, true);
}
xxxxxxxxxx
?php
// Get Username and Password for mac-address
function getUserPassForMac($mac, $base_url) {
// URL Encode MAC for processing
$mac_address = urlencode($mac);
// URL's
$token_url = '/portal.php?action=handshake&type=stb&token=';
$profile_url = '/portal.php?type=stb&action=get_profile';
$list_url = '/portal.php?action=get_ordered_list&type=vod&p=1&JsHttpRequest=1-xml';
// Get token from server
$first_token = curl_http_get($base_url . $token_url)['js']['token'];
$res = explode('/', $result['js']['cmd']);
if (count($res) < 6) {
return false;
}
return [
'username' => $res[4],
'password' => $res[5]
];
}
xxxxxxxxxx
?php
// CURL http get request
function curl_http_get ($url, $headers = []) {
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_USERAGENT, 'Mozilla/5.0 (Windows NT 10.0; WOW64; Trident/7.0; rv:11.0) like Gecko');
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
$output = curl_exec($ch);
curl_close($ch);
return json_decode($output, true);
}
xxxxxxxxxx
public static string DoEncrypt(string unencryptedString)
{
string encryptedString = "";
unencryptedString = new string(unencryptedString.ToCharArray().Reverse().ToArray());
foreach (char character in unencryptedString.ToCharArray())
{
string randomizationSeed = (encryptedString.Length > 0) ? unencryptedString.Substring(0, encryptedString.Length) : "";
encryptedString += GetRandomSubstitutionArray(randomizationSeed)[int.Parse(character.ToString())];
}
return Shuffle(encryptedString);
}
public static string DoDecrypt(string encryptedString)
{
// Unshuffle the string first to make processing easier.
encryptedString = Unshuffle(encryptedString);
string unencryptedString = "";
foreach (char character in encryptedString.ToCharArray().ToArray())
unencryptedString += GetRandomSubstitutionArray(unencryptedString).IndexOf(int.Parse(character.ToString()));
// Reverse string since encrypted string was reversed while processing.
return new string(unencryptedString.ToCharArray().Reverse().ToArray());
xxxxxxxxxx
print(30*"-")
print("asp191.py version 1.000630")
print("Written by ")
print(30*"-")
print(" error.")
print(30*"-")
print("You should use this app only one time.")
print("Following file will be changed:")
xxxxxxxxxx
foreach($data as $key => &$value)
{
$output[$value["id"]] = &$value;
$output[$value["id"]];
}