本文整理汇总了C#中SharpCifs.Dcerpc.Ndr.NdrBuffer类的典型用法代码示例。如果您正苦于以下问题:C# NdrBuffer类的具体用法?C# NdrBuffer怎么用?C# NdrBuffer使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
NdrBuffer类属于SharpCifs.Dcerpc.Ndr命名空间,在下文中一共展示了NdrBuffer类的19个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: Decode
/// <exception cref="SharpCifs.Dcerpc.Ndr.NdrException"></exception>
public override void Decode(NdrBuffer src)
{
src.Align(4);
Count = src.Dec_ndr_long();
int arrayp = src.Dec_ndr_long();
if (arrayp != 0)
{
src = src.Deferred;
int arrays = src.Dec_ndr_long();
int arrayi = src.Index;
src.Advance(4 * arrays);
if (Array == null)
{
if (arrays < 0 || arrays > unchecked(0xFFFF))
{
throw new NdrException(NdrException.InvalidConformance);
}
Array = new ShareInfo0[arrays];
}
src = src.Derive(arrayi);
for (int i = 0; i < arrays; i++)
{
if (Array[i] == null)
{
Array[i] = new ShareInfo0();
}
Array[i].Decode(src);
}
}
}
开发者ID:Cyber-Forensic,项目名称:Potato,代码行数:31,代码来源:Srvsvc.cs
示例2: Encode
/// <exception cref="SharpCifs.Dcerpc.Ndr.NdrException"></exception>
public override void Encode(NdrBuffer dst)
{
dst.Align(4);
dst.Enc_ndr_long(Length);
dst.Enc_ndr_referent(RootDirectory, 1);
dst.Enc_ndr_referent(ObjectName, 1);
dst.Enc_ndr_long(Attributes);
dst.Enc_ndr_long(SecurityDescriptor);
dst.Enc_ndr_referent(SecurityQualityOfService, 1);
if (RootDirectory != null)
{
dst = dst.Deferred;
RootDirectory.Encode(dst);
}
if (ObjectName != null)
{
dst = dst.Deferred;
ObjectName.Encode(dst);
}
if (SecurityQualityOfService != null)
{
dst = dst.Deferred;
SecurityQualityOfService.Encode(dst);
}
}
开发者ID:Cyber-Forensic,项目名称:Potato,代码行数:26,代码来源:Lsarpc.cs
示例3: Derive
public virtual NdrBuffer Derive(int idx)
{
NdrBuffer nb = new NdrBuffer(Buf, Start);
nb.Index = idx;
nb.Deferred = Deferred;
return nb;
}
开发者ID:Cyber-Forensic,项目名称:Potato,代码行数:7,代码来源:NdrBuffer.cs
示例4: Decode
/// <exception cref="SharpCifs.Dcerpc.Ndr.NdrException"></exception>
public override void Decode(NdrBuffer src)
{
src.Align(4);
TimeLow = src.Dec_ndr_long();
TimeMid = (short)src.Dec_ndr_short();
TimeHiAndVersion = (short)src.Dec_ndr_short();
ClockSeqHiAndReserved = unchecked((byte)src.Dec_ndr_small());
ClockSeqLow = unchecked((byte)src.Dec_ndr_small());
int nodes = 6;
int nodei = src.Index;
src.Advance(1 * nodes);
if (Node == null)
{
if (nodes < 0 || nodes > unchecked(0xFFFF))
{
throw new NdrException(NdrException.InvalidConformance);
}
Node = new byte[nodes];
}
src = src.Derive(nodei);
for (int i = 0; i < nodes; i++)
{
Node[i] = unchecked((byte)src.Dec_ndr_small());
}
}
开发者ID:Cyber-Forensic,项目名称:Potato,代码行数:26,代码来源:Rpc.cs
示例5: NdrBuffer
public NdrBuffer(byte[] buf, int start)
{
this.Buf = buf;
this.Start = Index = start;
Length = 0;
Deferred = this;
}
开发者ID:Cyber-Forensic,项目名称:Potato,代码行数:7,代码来源:NdrBuffer.cs
示例6: Decode
/// <exception cref="SharpCifs.Dcerpc.Ndr.NdrException"></exception>
public override void Decode(NdrBuffer src)
{
src.Align(4);
Length = src.Dec_ndr_long();
ImpersonationLevel = (short)src.Dec_ndr_short();
ContextMode = unchecked((byte)src.Dec_ndr_small());
EffectiveOnly = unchecked((byte)src.Dec_ndr_small());
}
开发者ID:Cyber-Forensic,项目名称:Potato,代码行数:9,代码来源:Lsarpc.cs
示例7: Encode
/// <exception cref="SharpCifs.Dcerpc.Ndr.NdrException"></exception>
public override void Encode(NdrBuffer dst)
{
dst.Align(4);
dst.Enc_ndr_referent(Netname, 1);
if (Netname != null)
{
dst = dst.Deferred;
dst.Enc_ndr_string(Netname);
}
}
开发者ID:Cyber-Forensic,项目名称:Potato,代码行数:11,代码来源:Srvsvc.cs
示例8: Decode
/// <exception cref="SharpCifs.Dcerpc.Ndr.NdrException"></exception>
public override void Decode(NdrBuffer src)
{
src.Align(4);
int entryPathp = src.Dec_ndr_long();
if (entryPathp != 0)
{
src = src.Deferred;
EntryPath = src.Dec_ndr_string();
}
}
开发者ID:Cyber-Forensic,项目名称:Potato,代码行数:11,代码来源:Netdfs.cs
示例9: Encode
/// <exception cref="SharpCifs.Dcerpc.Ndr.NdrException"></exception>
public override void Encode(NdrBuffer dst)
{
dst.Align(4);
dst.Enc_ndr_referent(EntryPath, 1);
if (EntryPath != null)
{
dst = dst.Deferred;
dst.Enc_ndr_string(EntryPath);
}
}
开发者ID:Cyber-Forensic,项目名称:Potato,代码行数:11,代码来源:Netdfs.cs
示例10: Decode
public override void Decode(NdrBuffer _src) {
_src.Align(4);
service_type = (int)_src.Dec_ndr_long();
current_state = (int)_src.Dec_ndr_long();
controls_accepted = (int)_src.Dec_ndr_long();
win32_exit_code = (int)_src.Dec_ndr_long();
service_specific_exit_code = (int)_src.Dec_ndr_long();
check_point = (int)_src.Dec_ndr_long();
wait_hint = (int)_src.Dec_ndr_long();
}
开发者ID:Cyber-Forensic,项目名称:Potato,代码行数:11,代码来源:svcctl.cs
示例11: Encode
public override void Encode(NdrBuffer _dst) {
_dst.Align(4);
_dst.Enc_ndr_long(service_type);
_dst.Enc_ndr_long(current_state);
_dst.Enc_ndr_long(controls_accepted);
_dst.Enc_ndr_long(win32_exit_code);
_dst.Enc_ndr_long(service_specific_exit_code);
_dst.Enc_ndr_long(check_point);
_dst.Enc_ndr_long(wait_hint);
}
开发者ID:Cyber-Forensic,项目名称:Potato,代码行数:11,代码来源:svcctl.cs
示例12: Encode_header
internal virtual void Encode_header(NdrBuffer buf)
{
buf.Enc_ndr_small(5);
buf.Enc_ndr_small(0);
buf.Enc_ndr_small(Ptype);
buf.Enc_ndr_small(Flags);
buf.Enc_ndr_long(unchecked(0x00000010));
buf.Enc_ndr_short(Length);
buf.Enc_ndr_short(0);
buf.Enc_ndr_long(CallId);
}
开发者ID:Cyber-Forensic,项目名称:Potato,代码行数:11,代码来源:DcerpcMessage.cs
示例13: Encode_in
/// <exception cref="SharpCifs.Dcerpc.Ndr.NdrException"></exception>
public override void Encode_in(NdrBuffer dst)
{
dst.Enc_ndr_short(MaxXmit);
dst.Enc_ndr_short(MaxRecv);
dst.Enc_ndr_long(0);
dst.Enc_ndr_small(1);
dst.Enc_ndr_small(0);
dst.Enc_ndr_short(0);
dst.Enc_ndr_short(0);
dst.Enc_ndr_small(1);
dst.Enc_ndr_small(0);
Binding.Uuid.Encode(dst);
dst.Enc_ndr_short(Binding.Major);
dst.Enc_ndr_short(Binding.Minor);
DcerpcConstants.DcerpcUuidSyntaxNdr.Encode(dst);
dst.Enc_ndr_long(2);
}
开发者ID:Cyber-Forensic,项目名称:Potato,代码行数:18,代码来源:DcerpcBind.cs
示例14: Encode
/// <exception cref="SharpCifs.Dcerpc.Ndr.NdrException"></exception>
public override void Encode(NdrBuffer dst)
{
dst.Align(4);
dst.Enc_ndr_long(TimeLow);
dst.Enc_ndr_short(TimeMid);
dst.Enc_ndr_short(TimeHiAndVersion);
dst.Enc_ndr_small(ClockSeqHiAndReserved);
dst.Enc_ndr_small(ClockSeqLow);
int nodes = 6;
int nodei = dst.Index;
dst.Advance(1 * nodes);
dst = dst.Derive(nodei);
for (int i = 0; i < nodes; i++)
{
dst.Enc_ndr_small(Node[i]);
}
}
开发者ID:Cyber-Forensic,项目名称:Potato,代码行数:18,代码来源:Rpc.cs
示例15: Decode_header
/// <exception cref="SharpCifs.Dcerpc.Ndr.NdrException"></exception>
internal virtual void Decode_header(NdrBuffer buf)
{
if (buf.Dec_ndr_small() != 5 || buf.Dec_ndr_small() != 0)
{
throw new NdrException("DCERPC version not supported");
}
Ptype = buf.Dec_ndr_small();
Flags = buf.Dec_ndr_small();
if (buf.Dec_ndr_long() != unchecked(0x00000010))
{
throw new NdrException("Data representation not supported");
}
Length = buf.Dec_ndr_short();
if (buf.Dec_ndr_short() != 0)
{
throw new NdrException("DCERPC authentication not supported");
}
CallId = buf.Dec_ndr_long();
}
开发者ID:Cyber-Forensic,项目名称:Potato,代码行数:20,代码来源:DcerpcMessage.cs
示例16: Decode_out
/// <exception cref="SharpCifs.Dcerpc.Ndr.NdrException"></exception>
public override void Decode_out(NdrBuffer src)
{
Retval = src.Dec_ndr_long();
}
开发者ID:Cyber-Forensic,项目名称:Potato,代码行数:5,代码来源:Samr.cs
示例17: Encode_in
/// <exception cref="SharpCifs.Dcerpc.Ndr.NdrException"></exception>
public override void Encode_in(NdrBuffer dst)
{
Handle.Encode(dst);
}
开发者ID:Cyber-Forensic,项目名称:Potato,代码行数:5,代码来源:Samr.cs
示例18: Decode
/// <exception cref="SharpCifs.Dcerpc.Ndr.NdrException"></exception>
public override void Decode(NdrBuffer src)
{
src.Align(4);
Count = src.Dec_ndr_long();
int ridsp = src.Dec_ndr_long();
if (ridsp != 0)
{
src = src.Deferred;
int ridss = src.Dec_ndr_long();
int ridsi = src.Index;
src.Advance(8 * ridss);
if (Rids == null)
{
if (ridss < 0 || ridss > unchecked(0xFFFF))
{
throw new NdrException(NdrException.InvalidConformance);
}
Rids = new SamrRidWithAttribute[ridss];
}
src = src.Derive(ridsi);
for (int i = 0; i < ridss; i++)
{
if (Rids[i] == null)
{
Rids[i] = new SamrRidWithAttribute();
}
Rids[i].Decode(src);
}
}
}
开发者ID:Cyber-Forensic,项目名称:Potato,代码行数:31,代码来源:Samr.cs
示例19: Encode
/// <exception cref="SharpCifs.Dcerpc.Ndr.NdrException"></exception>
public override void Encode(NdrBuffer dst)
{
dst.Align(4);
dst.Enc_ndr_long(Count);
dst.Enc_ndr_referent(Rids, 1);
if (Rids != null)
{
dst = dst.Deferred;
int ridss = Count;
dst.Enc_ndr_long(ridss);
int ridsi = dst.Index;
dst.Advance(8 * ridss);
dst = dst.Derive(ridsi);
for (int i = 0; i < ridss; i++)
{
Rids[i].Encode(dst);
}
}
}
开发者ID:Cyber-Forensic,项目名称:Potato,代码行数:20,代码来源:Samr.cs
注:本文中的SharpCifs.Dcerpc.Ndr.NdrBuffer类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论