Keylogger?

General discussions about Automagic and automation in general

Moderator: Martin

akhileshg1988
Posts: 109
Joined: 16 Apr 2014 04:57

Keylogger?

Post by akhileshg1988 » 21 Jan 2016 04:24

Hey guys!
Lately, I was wondering if it's possible to create a flow that could work as a keylogger?
Any suggestions in this regard are welcome.

User avatar
Martin
Posts: 4468
Joined: 09 Nov 2012 14:23

Re: Keylogger?

Post by Martin » 21 Jan 2016 20:36

Hi,

You could try trigger UI Event with event type Text changed or use trigger Command Output with command getevent (requires root). Search the forum for getevent, there are a few discussions about this that should be helpful to get you started.

Regards,
Martin

akhileshg1988
Posts: 109
Joined: 16 Apr 2014 04:57

Re: Keylogger?

Post by akhileshg1988 » 28 Jan 2016 05:19

Hi Martin
I've hardly been able to make any progress so far.
I've made a flow as follows:-
Trigger:- UI Event (Event Type:- Text changed ; Package name:- com.android.mms)
Action:- Write To File ({app_name} {before_text} {text})

The aforementioned flow ain't upto the mark.
The way I want to implement a keylogger is that whenever the keyboard pops up, whatever text I type in any text field be logged onto a file.
Your valuable help is solicited.

Thanks
Akhilesh

User avatar
Martin
Posts: 4468
Joined: 09 Nov 2012 14:23

Re: Keylogger?

Post by Martin » 29 Jan 2016 19:55

Hi Akhilesh,

Recording every single key press could be hard or even impossible. Maybe a rooted device could help but I'm not even sure about this.
What does not work about the flow you designed? Does it record too much text or does the flow not execute at all?
A flow with trigger UI Event: Text changed and package set to * with action Notification on Screen: {text} seems to work quite good on my test device. The system coalesces the events for performance reasons so you will not get a notification for every single key press.

Regards,
Martin

akhileshg1988
Posts: 109
Joined: 16 Apr 2014 04:57

Re: Keylogger?

Post by akhileshg1988 » 06 Sep 2016 11:10

Hey Martin!
Could you please help me use the trigger Command Output with command getevent in order to be able to design a keylogging flow?

Thanks
Akhilesh

akhileshg1988
Posts: 109
Joined: 16 Apr 2014 04:57

Re: Keylogger?

Post by akhileshg1988 » 06 Sep 2016 11:48

Martin wrote:Hi Akhilesh,

Recording every single key press could be hard or even impossible. Maybe a rooted device could help but I'm not even sure about this.
What does not work about the flow you designed? Does it record too much text or does the flow not execute at all?
A flow with trigger UI Event: Text changed and package set to * with action Notification on Screen: {text} seems to work quite good on my test device. The system coalesces the events for performance reasons so you will not get a notification for every single key press.

Regards,
Martin
Martin, would you please explain what you meant by "package set to *"?
What is this * supposed to do?

User avatar
Martin
Posts: 4468
Joined: 09 Nov 2012 14:23

Re: Keylogger?

Post by Martin » 06 Sep 2016 18:52

Hi,

* is a wildcard or glob pattern character that matches any text respectively all package names so the trigger will be executed for all text changed events no matter what package it's coming from.

It's difficult to work with getevent. Search the forum to get some examples. I would try to use trigger UI Event first.

Regards,
Martin

akhileshg1988
Posts: 109
Joined: 16 Apr 2014 04:57

Re: Keylogger?

Post by akhileshg1988 » 07 Sep 2016 04:46

Hey Martin, I am quite close to creating a keylogging (text-logging, to be exact) flow. Need your help for fixing certain flaws in my flow.
First of all, please guide me about the function "removevariable(name)". I tried using this function in an action "script" in order to clear the value assigned to a global variable named "global_text" created by me but, to my disappointment, this function doesn't seem to do anything to the variable "global_text" upon execution.
Kindly guide and help.

Thanks
Akhilesh

akhileshg1988
Posts: 109
Joined: 16 Apr 2014 04:57

Re: Keylogger?

Post by akhileshg1988 » 07 Sep 2016 05:06

Sorry to have bothered you Martin. I searched for the function "removeVariable(name)" in the forum and got the answer.
Will resort to requesting for your valuable help in case I am stuck somewhere.

Thanks
Akhilesh

User avatar
mbirth
Posts: 80
Joined: 17 Mar 2016 00:02
Location: Berlin, Germany
Contact:

Re: Keylogger?

Post by mbirth » 07 Sep 2016 10:43

By the way, there's Type Machine which logs all input into a SQLite database and associates it with the corresponding app. And you can "replay" the input, i.e. you can see typing mistakes and the correction of them. I learned to love it when I had a new Reddit app that crashed while you were typing a reply.
BlackBerry KEY2, Android 8.1.0

Post Reply