mirror of
https://github.com/Ylianst/MeshAgent
synced 2025-12-20 02:03:15 +00:00
Updated, so getService() on Windows will show owning user
This commit is contained in:
@@ -100,6 +100,7 @@ function serviceManager()
|
|||||||
this.proxy.CreateMethod('EnumServicesStatusExA');
|
this.proxy.CreateMethod('EnumServicesStatusExA');
|
||||||
this.proxy.CreateMethod('OpenServiceA');
|
this.proxy.CreateMethod('OpenServiceA');
|
||||||
this.proxy.CreateMethod('QueryServiceStatusEx');
|
this.proxy.CreateMethod('QueryServiceStatusEx');
|
||||||
|
this.proxy.CreateMethod('QueryServiceConfigA');
|
||||||
this.proxy.CreateMethod('QueryServiceConfig2A');
|
this.proxy.CreateMethod('QueryServiceConfig2A');
|
||||||
this.proxy.CreateMethod('ControlService');
|
this.proxy.CreateMethod('ControlService');
|
||||||
this.proxy.CreateMethod('StartServiceA');
|
this.proxy.CreateMethod('StartServiceA');
|
||||||
@@ -253,6 +254,19 @@ function serviceManager()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var query_service_configa_DWORD = this.GM.CreateVariable(4);
|
||||||
|
this.proxy.QueryServiceConfigA(h, 0, 0, query_service_configa_DWORD);
|
||||||
|
if (query_service_configa_DWORD.toBuffer().readUInt32LE() > 0)
|
||||||
|
{
|
||||||
|
var query_service_configa = this.GM.CreateVariable(query_service_configa_DWORD.toBuffer().readUInt32LE());
|
||||||
|
if(this.proxy.QueryServiceConfigA(h, query_service_configa, query_service_configa._size, query_service_configa_DWORD).Val != 0)
|
||||||
|
{
|
||||||
|
var val = query_service_configa.Deref(this.GM.PointerSize == 4 ? 28 : 48, this.GM.PointerSize).Deref().String;
|
||||||
|
Object.defineProperty(retVal, 'user', { value: val });
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
var failureactions = this.GM.CreateVariable(8192);
|
var failureactions = this.GM.CreateVariable(8192);
|
||||||
var bneeded = this.GM.CreateVariable(4);
|
var bneeded = this.GM.CreateVariable(4);
|
||||||
if (this.proxy.QueryServiceConfig2A(h, 2, failureactions, 8192, bneeded).Val != 0)
|
if (this.proxy.QueryServiceConfig2A(h, 2, failureactions, 8192, bneeded).Val != 0)
|
||||||
|
|||||||
Reference in New Issue
Block a user