Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Run Stalker.follow for all threads #993

Open
yooo1999 opened this issue Feb 16, 2025 · 0 comments
Open

Run Stalker.follow for all threads #993

yooo1999 opened this issue Feb 16, 2025 · 0 comments

Comments

@yooo1999
Copy link

I tried to load Javascript and use stalker for all threads , the problem is that takes lot of time so the process's watchdog crashed.
Maybe it will be good ideas :

  1. New API like Stalker.follow but for all the threads , I think in most cases we want to track all threads in pid
  2. run Stalker.follow in new context so the thread will not wait for the finish
function StalkerExeample() 
{
	var threadIds = [];

	Process.enumerateThreads({
		onMatch: function (thread) 
		{
			threadIds.push(thread.id);
			console.log("Thread ID: " + thread.id.toString());
		},

		onComplete: function () 
		{
            
			threadIds.forEach(function (threadId) 
				{
					Stalker.follow(threadId, 
					{
						events: {call: false , ret: true, exec: true ,block: true},
					
					onReceive: function (events)
					{
						console.log("onReceive called.");
					},
					onCallSummary: function (summary)
					{
						console.log("onCallSummary called.");
					}
				});
			});
		}
	});
}


StalkerExeample();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant