@@ -183,9 +183,10 @@ export class LinuxX64InterruptorAgent extends InterruptorAgent{
183
183
setupBuiltinHook ( ) {
184
184
}
185
185
186
- locateEIP ( pContext : any ) :string {
186
+ locateRIP ( pContext : any ) :string {
187
187
let l = "" , tid :number = - 1 ;
188
- const r = Process . findRangeByAddress ( pContext . eip ) ;
188
+
189
+ const r = Process . findRangeByAddress ( pContext . rip ) ;
189
190
190
191
if ( this . output . tid ) {
191
192
tid = Process . getCurrentThreadId ( ) ;
@@ -196,21 +197,21 @@ export class LinuxX64InterruptorAgent extends InterruptorAgent{
196
197
if ( this . output . module ) {
197
198
if ( r != null ) {
198
199
if ( r . file != null ) {
199
- if ( this . output . hidePackage != null ) {
200
- l += `[${ r . file . path . replace ( this . output . hidePackage , "HIDDEN" ) } +${ pContext . eip . sub ( r . base ) } ]` ;
200
+ if ( this . output . hide != null ) {
201
+ l += `[${ r . file . path . replace ( this . output . hide , "HIDDEN" ) } +${ pContext . rip . sub ( r . base ) } ]` ;
201
202
} else {
202
- l += `[${ r . file . path } +${ pContext . eip . sub ( r . base ) } ]` ;
203
+ l += `[${ r . file . path } +${ pContext . rip . sub ( r . base ) } ]` ;
203
204
}
204
205
} else {
205
- l += `[${ r . base } +${ pContext . eip . sub ( r . base ) } ]` ;
206
+ l += `[${ r . base } +${ pContext . rip . sub ( r . base ) } ]` ;
206
207
}
207
208
} else {
208
- // l += `[<unknow> lr =${pContext.lr }]`;
209
+ l += `[<unknow> rip =${ pContext . rip } ]` ;
209
210
}
210
211
}
211
212
212
- // if(this.output.lr)
213
- // l += `[lr=${pContext.lr }]`;
213
+ if ( this . output . lr )
214
+ l += `[lr=${ pContext . rip } ]` ;
214
215
215
216
return l ;
216
217
}
@@ -488,7 +489,7 @@ export class LinuxX64InterruptorAgent extends InterruptorAgent{
488
489
const sysSignature = SYSC_MAP_NUM [ sysNR . toInt32 ( ) ] ;
489
490
490
491
if ( sysSignature == null ) {
491
- console . log ( ' [' + this . locateEIP ( pContext ) + '] \x1b[35;01m' + CC . OP + ' (' + sysNR + ')\x1b[0m =<unknow>' ) ;
492
+ console . log ( ' [' + this . locateRIP ( pContext ) + '] \x1b[35;01m' + CC . OP + ' (' + sysNR + ')\x1b[0m =<unknow>' ) ;
492
493
return ;
493
494
}
494
495
@@ -515,7 +516,7 @@ export class LinuxX64InterruptorAgent extends InterruptorAgent{
515
516
* @param pSysNum
516
517
*/
517
518
formatLogLine ( pContext :any , pSysc :string , pInst :string , pSysNum :number ) :string {
518
- let s = this . locateEIP ( pContext ) ;
519
+ let s = this . locateRIP ( pContext ) ;
519
520
s += this . output . inst ? ` \x1b[35;01m${ pInst } :: ${ pSysNum } \x1b[0m` : "" ;
520
521
s += ` ${ pSysc } ` ;
521
522
return s ;
@@ -651,6 +652,7 @@ export class LinuxX64InterruptorAgent extends InterruptorAgent{
651
652
652
653
pStalkerInterator . putCallout ( function ( context ) {
653
654
const n = context [ CC . NR ] . toInt32 ( ) ;
655
+
654
656
if ( context . dxc == null ) context . dxc = { FD :{ } } ;
655
657
if ( isExcludedFn != null && isExcludedFn ( n ) ) return ;
656
658
@@ -667,8 +669,10 @@ export class LinuxX64InterruptorAgent extends InterruptorAgent{
667
669
pExtra . onLeave = null ;
668
670
}
669
671
672
+
670
673
// debug
671
- //console.log("["+pInstruction.address+" : "+pInstruction.address.sub(pExtra.mod.__mod.base)+"] > "+Instruction.parse(pInstruction.address));
674
+ // console.log("["+pInstruction.address+" : "+pInstruction.address.sub(pExtra.mod.__mod.base)+"] > "+Instruction.parse(pInstruction.address));
675
+ //console.log("["+pInstruction.address+"] > "+Instruction.parse(pInstruction.address));
672
676
673
677
if ( pInstruction . mnemonic === CC . OP ) {
674
678
0 commit comments