mirror of
https://github.com/vxunderground/MalwareSourceCode.git
synced 2024-12-19 18:06:10 +00:00
f2ac1ece55
add
88 lines
2.6 KiB
C#
88 lines
2.6 KiB
C#
// Decompiled with JetBrains decompiler
|
|
// Type: Microsoft.InfoCards.TokenFactoryCredential
|
|
// Assembly: infocard, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
|
|
// MVID: ADE0A079-11DB-4A46-8BDE-D2A592CA8DEA
|
|
// Assembly location: C:\Users\Administrateur\Downloads\Virusshare-00001-msil\Virus.Win32.Expiro.w-1f15ee7e9f7da02b6bfb4c5a5e6484eb9fa71b82d3699c54bcc7a31794b4a66d.exe
|
|
|
|
using Microsoft.InfoCards.Diagnostics;
|
|
using System;
|
|
using System.IO;
|
|
|
|
namespace Microsoft.InfoCards
|
|
{
|
|
internal abstract class TokenFactoryCredential : IDisposable
|
|
{
|
|
public const int NoCredential = -1;
|
|
private TokenFactoryCredentialType m_type;
|
|
private Uri m_cardId;
|
|
private int m_paramIndex;
|
|
private int m_lcid;
|
|
|
|
protected TokenFactoryCredential(TokenFactoryCredentialType type) => this.m_type = type;
|
|
|
|
public void Dispose() => this.Dispose(true);
|
|
|
|
public virtual void Dispose(bool disposing)
|
|
{
|
|
}
|
|
|
|
public static TokenFactoryCredential CreateFrom(
|
|
BinaryReader reader,
|
|
UIAgentRequest request,
|
|
int lcid)
|
|
{
|
|
TokenFactoryCredential from;
|
|
switch (reader.ReadInt32())
|
|
{
|
|
case -1:
|
|
from = (TokenFactoryCredential) null;
|
|
break;
|
|
case 1:
|
|
from = (TokenFactoryCredential) new UserNameTokenFactoryCredential();
|
|
from.Deserialize(reader);
|
|
break;
|
|
case 2:
|
|
from = (TokenFactoryCredential) new SelfIssuedTokenFactoryCredential();
|
|
from.Deserialize(reader);
|
|
break;
|
|
case 3:
|
|
from = (TokenFactoryCredential) new X509CertificateTokenFactoryCredential(request);
|
|
from.Deserialize(reader);
|
|
break;
|
|
case 4:
|
|
from = (TokenFactoryCredential) new KerberosTokenFactoryCredential();
|
|
from.Deserialize(reader);
|
|
break;
|
|
default:
|
|
InfoCardTrace.ThrowInvalidArgumentConditional(true, "CredentialType");
|
|
from = (TokenFactoryCredential) null;
|
|
break;
|
|
}
|
|
if (from != null)
|
|
from.LCID = lcid;
|
|
return from;
|
|
}
|
|
|
|
public int ParameterIndex => this.m_paramIndex;
|
|
|
|
public TokenFactoryCredentialType CredentialType => this.m_type;
|
|
|
|
public int LCID
|
|
{
|
|
get => this.m_lcid;
|
|
set => this.m_lcid = value;
|
|
}
|
|
|
|
public Uri CardId => this.m_cardId;
|
|
|
|
private void Deserialize(BinaryReader reader)
|
|
{
|
|
this.m_cardId = new Uri(Utility.DeserializeString(reader));
|
|
this.m_paramIndex = reader.ReadInt32();
|
|
this.DeserializeData(reader);
|
|
}
|
|
|
|
protected abstract void DeserializeData(BinaryReader reader);
|
|
}
|
|
}
|