mirror of
https://github.com/vxunderground/MalwareSourceCode.git
synced 2024-12-23 03:46:10 +00:00
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: 1D4D5564-A025-490C-AF1D-DF4FBB709D1F
|
|||
|
// Assembly location: C:\Users\Administrateur\Downloads\Virusshare-00001-msil\Virus.Win32.Expiro.w-f8f9f26e940480624825f6bddbea86e70fc4aa746c4dd8efa7d98dcb477000ed.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);
|
|||
|
}
|
|||
|
}
|