Exemplo n.º 1
0
        private void ValidateRegionName()
        {
            string allNames = "centralus,eastasia,southeastasia,eastus,eastus2,westus,westus2,northcentralus,southcentralus,westcentralus,northeurope,westeurope,japaneast,japanwest,brazilsouth,australiasoutheast,australiaeast,westindia,southindia,centralindia,canadacentral,canadaeast,uksouth,ukwest,koreacentral,koreasouth,francecentral";

            if (!allNames.Contains(RegionName.ToLower()))
            {
                throw new FormatException($"RegionName {RegionName} is not valid. Valid regions {allNames}");
            }
        }
Exemplo n.º 2
0
 public override void Process(BotData data)
 {
     // Magick Stuff goin on
     try
     {
         var result = BitConverter.ToString(getSignatureKey(AccessKey, AWSDateStamp, RegionName.ToLower(), AWSService.ToLower())).Replace("-", "").ToLower();
         InsertVariable(data, IsCapture, result, VariableName, "", "", false, false);
         data.Status = RuriLib.BotStatus.SUCCESS;
         data.Log($"Generated AWS Token with result {result}");
     }
     catch (Exception ex)
     {
         data.Status = RuriLib.BotStatus.ERROR;
         data.Log($"Error Generating AWS tokens Ex:{ex}");
     }
 }