Needed: Program to store key typing into text boxes[Found]
Just removing the -m fixes itgreengeek wrote:Hey, good find! I did select us keymap so hopefully that is the problem. Will test later tonight I hope.
from
Code: Select all
logkeys -s -m --us-keymap --no-func-keys -o /var/log/kp/secret-keys.log
Code: Select all
logkeys -s --us-keymap --no-func-keys -o /var/log/kp/secret-keys.log
[b]Carolina:[/b] [url=http://smokey01.com/carolina/pages/recent-repo.html]Recent Repository Additions[/url]
[img]https://dl.dropboxusercontent.com/s/ahfade8q4def1lq/signbot.gif[/img]
[img]https://dl.dropboxusercontent.com/s/ahfade8q4def1lq/signbot.gif[/img]
Here's a script that works with nilsonmorales pklogger-0.3.pet, it will put a gtkdialog text edit in the tray.
The keylogger runs on running the script and stops when the tray app is exited, right click the icon for the exit menu, clicking the tray icon toggles the edit window.
You still need to configure pklogger prior to running the script to set the key map, as I mentioned the kp-map script needs the US map fixed to work.
The keylogger runs on running the script and stops when the tray app is exited, right click the icon for the exit menu, clicking the tray icon toggles the edit window.
You still need to configure pklogger prior to running the script to set the key map, as I mentioned the kp-map script needs the US map fixed to work.
Code: Select all
logkeys -s --us-keymap --no-func-keys -o /var/log/kp/secret-keys.log
Code: Select all
#!/bin/bash
# MyKeylog
# By Geoffrey
ps ax | grep -q '[My]Keylog' && exit 1
KEYLOG=`awk 'NR==2' < /root/Startup/.pkl`
KEYLOG=`echo "$KEYLOG" | awk -F'-o' '{print $1}'`
eval "$KEYLOG"--no-timestamps -o /var/log/kp/secret-keys.log # no timestamps
function my_keylog () {
ps ax | grep -q '[MY]KEYLOG' && kill $(ps -ef | awk '/[MY]KEYLOG/{print $2}') && exit 1
export MYKEYLOG='
<window title="MyKeylog" icon-name="gtk-edit">
<vbox>
<edit file-monitor="true" auto-refresh="true" wrap-mode="3" editable="true">
<variable>MY_KEYLOG</variable>
<input file>/var/log/kp/secret-keys.log</input>
</edit>
<hbox homogeneous="true">
<hbox>
<button>
<label>Save</label>
<input file stock="gtk-save"></input>
<action>`echo "$MY_KEYLOG" > /var/log/kp/secret-keys.log`</action>
</button>
</hbox>
</hbox>
</vbox>
</window>'
gtkdialog -p MYKEYLOG -G 400x200"+`getcurpos | tr " " "+"`"
}
export -f my_keylog
function killkeylog () {
logkeys -k
kill $(ps -ef | awk '/[MY]KEYLOG/{print $2}')
kill $(ps -ef | awk '/[t]ext=MyKeylog/{print $2}')
}
export -f killkeylog
function about () {
yad --title="About MyKeylog" --close-on-unfocus --geometry=200x100"+`getcurpos | tr " " "+"`" --text-align="center" --skip-taskbar --window-icon="gtk-dialog-info" \
--text="
MyKeylog
By Geoffrey
03/11/2016
" --no-buttons --timeout="5"
}
export -f about
mkfifo /tmp/mykeylog >/dev/null 2>&1
exec 3<> /tmp/mykeylog
exec yad --notification --no-middle --text=$"MyKeylog" --image="gtk-edit" --command "sh -c 'my_keylog >/dev/null 2>&1'" --listen <&3 &
echo "menu:About!bash -c about!gtk-about|Exit!sh -c 'killkeylog >/dev/null 2>&1'!gtk-quit" >&3
- Attachments
-
- mykeylog.png
- (54.45 KiB) Downloaded 258 times
[b]Carolina:[/b] [url=http://smokey01.com/carolina/pages/recent-repo.html]Recent Repository Additions[/url]
[img]https://dl.dropboxusercontent.com/s/ahfade8q4def1lq/signbot.gif[/img]
[img]https://dl.dropboxusercontent.com/s/ahfade8q4def1lq/signbot.gif[/img]
- nilsonmorales
- Posts: 972
- Joined: Fri 15 Apr 2011, 14:39
- Location: El Salvador
Thank you Geoffrey, i will commit your fixes and update the pklogger.
[b][url=http://nilsonmorales.blogspot.com/]My blog |[/url][/b][b][url=https://github.com/woofshahenzup]| Github[/url][/b]
[img]https://i.postimg.cc/5tz5vrrX/imag018la6.gif[/img]
[img]http://s5.postimg.org/7h2fid8pz/botones_logos3.png[/img]
[img]https://i.postimg.cc/5tz5vrrX/imag018la6.gif[/img]
[img]http://s5.postimg.org/7h2fid8pz/botones_logos3.png[/img]
Yes thanks Geoffrey and nilsonmorales .
Seems to work atm only when I start it . I put your script in /root/Startup so hopefully it will run forever more .(Whoops noticed thats not needed so I removed that)(No it does not seem to start automatically from ".pkl" either. I have to run kp in a terminal each time and choose to start it ) Why are these things always marred by problems?
Its pretty easy . I just want it to run automatically every time I run my computer.
It doesn't happen to RoundRobin does it? I'll just have to edit it from time to time .
Oh and i don't get an icon in the tray and no menu entry Geoffrey . Is that what you meant to happen?
Using Precise 5.7.1
Seems to work atm only when I start it . I put your script in /root/Startup so hopefully it will run forever more .(Whoops noticed thats not needed so I removed that)(No it does not seem to start automatically from ".pkl" either. I have to run kp in a terminal each time and choose to start it ) Why are these things always marred by problems?
Its pretty easy . I just want it to run automatically every time I run my computer.
It doesn't happen to RoundRobin does it? I'll just have to edit it from time to time .
Oh and i don't get an icon in the tray and no menu entry Geoffrey . Is that what you meant to happen?
Using Precise 5.7.1
Last edited by april on Sun 06 Nov 2016, 18:35, edited 1 time in total.
It needs a recent version of yad to work, precise has yad 0.12.4, yad 0.26.1 will work but not the --close-on-unfocus option in the about menu, not that you need it, also the stock icons gtk-about and gtk-quit aren't found in precise.april wrote:Yes thanks Geoffrey and nilsonmorales . I used /usr/bin/kp-map as was so perhaps he has fixed that. I use the us keyboard anyhow.
Seems to work atm . I put your script in /root/Startup so hopefully it will run forever more . I'll just have to edit it from time to time .
It doesn't happen to RoundRobin does it?
Oh and i don't get an icon in the tray
Using Precise 5.7.1
I installed precise 5.7.1 added the pklogger-0.3.pet, mustn't be fixed yet as I had to edit the kp-map script for US keyboard.
T̶h̶i̶s̶ ̶w̶i̶l̶l̶ ̶w̶o̶r̶k̶ ̶w̶i̶t̶h̶ ̶y̶a̶d̶ ̶v̶e̶r̶s̶i̶o̶n̶ ̶0̶.̶1̶2̶.̶4̶
Edit: The old precise yad 0.12.4 doesn't support some feature of newer yad code.
Last edited by Geoffrey on Fri 04 Nov 2016, 23:45, edited 1 time in total.
[b]Carolina:[/b] [url=http://smokey01.com/carolina/pages/recent-repo.html]Recent Repository Additions[/url]
[img]https://dl.dropboxusercontent.com/s/ahfade8q4def1lq/signbot.gif[/img]
[img]https://dl.dropboxusercontent.com/s/ahfade8q4def1lq/signbot.gif[/img]
Tried this on another machine but still have to start it with kp so I don't understand what your script is doing Geoffrey.
nilsonmorales I would like to edit your configuration file to suit me then have it start at boot thereafter and always run. What command can I use in /root/Start/ folder to achieve this .
I see it is option 2 and your code uses the following
If I make this a script would that start it automatically? or can you suggest a more simple way
Thanks
I have done this above and just edited out chunks of the code just to test this . It seems to be starting automatically at least and recording but I would like to get the GUI in the tray and accessible
OK so now I have edited it down to a 1 line script an put this in Startup
Giving after reboot
Looks like apart from input from nilsonmorales and maybe getting the tray GUI to work which is what I think you intend Geoffrey I'm getting somewhere Thanks Guys
nilsonmorales I would like to edit your configuration file to suit me then have it start at boot thereafter and always run. What command can I use in /root/Start/ folder to achieve this .
I see it is option 2 and your code uses the following
Code: Select all
if [ "$r" == "2" ];then
chmod +x /root/Startup/.pkl && /root/Startup/.pkl
Xdialog --rc-file /root/.color.rc --title "keylogger" --icon '/usr/share/icons/espia.png' --msgbox "$(gettext 'keylogger Enable -
Log is stored in
/var/log/kp/secret-keys.log ')" 10 40 && /usr/bin/kp
exit ## Exit Script ##
fi
Thanks
I have done this above and just edited out chunks of the code just to test this . It seems to be starting automatically at least and recording but I would like to get the GUI in the tray and accessible
So I am guessing it will start a new file each boot this way.Logging started ...
2016-11-04 15:58:09+1000 > 1<#+7>21<#+65>
Logging stopped at 2016-11-04 16:00:16+1000
Logging started ...
2016-11-04 16:01:22+1000 >
2016-11-04 16:02:54+1000 >
2016-11-04 16:02:54+1000 > I have done this above and just edited out the chunks of the code just to test this . It seems to be starting automatically at least and recording but I would like to get the GUI in the tray. and accessible
OK so now I have edited it down to a 1 line script an put this in Startup
Code: Select all
#!/bin/sh
chmod +x /root/Startup/.pkl && /root/Startup/.pkl
So it is adding to the file each boot and I can easily run the clean line if I need it .Logging started ...
2016-11-04 15:58:09+1000 > 1<#+7>21<#+65>
Logging stopped at 2016-11-04 16:00:16+1000
Logging started ...
2016-11-04 16:01:22+1000 >
2016-11-04 16:02:54+1000 >
2016-11-04 16:02:54+1000 > I have done this above and just edited out the chunks of the code just to test this . It seems to be starting automatically at least and recording but I would like to get the GUI in the tray. and accessible
2016-11-04 16:06:13+1000 >
2016-11-04 16:06:13+1000 >
2016-11-04 16:06:25+1000 >
2016-11-04 16:06:26+1000 > So I am guessing it will start a new file each boot this way.##
Logging stopped at 2016-11-04 16:11:16+1000
Logging started ...
2016-11-04 16:12:22+1000 >
2016-11-04 16:13:09+1000 >
2016-11-04 16:13:09+1000 > OK so now I have edited it down to a 1 line script an put this in Startup
2016-11-04 16:13:41+1000 >
2016-11-04 16:14:48+1000 > Giving after reboot
2016-11-04 16:14:59+1000 >
Looks like apart from input from nilsonmorales and maybe getting the tray GUI to work which is what I think you intend Geoffrey I'm getting somewhere Thanks Guys
april, nilsonmorales script places /root/Startup/.pkl, the .pkl should run the logger on startup every time by making .pkl executable.april wrote:Tried this on another machine but still have to start it with kp so I don't understand what your script is doing Geoffrey.
nilsonmorales I would like to edit your configuration file to suit me then have it start at boot thereafter and always run. What command can I use in /root/Start/ folder to achieve this .
I see it is option 2 and your code uses the followingIf I make this a script would that start it automatically? or can you suggest a more simple wayCode: Select all
if [ "$r" == "2" ];then chmod +x /root/Startup/.pkl && /root/Startup/.pkl Xdialog --rc-file /root/.color.rc --title "keylogger" --icon '/usr/share/icons/espia.png' --msgbox "$(gettext 'keylogger Enable - Log is stored in /var/log/kp/secret-keys.log ')" 10 40 && /usr/bin/kp exit ## Exit Script ## fi
Thanks
My script doesn't need the /root/Startup/.pkl to be executable, it reads the content of this script and strips every thing after and including the "-o" then adds " --no-timestamps -o /var/log/kp/secret-keys.log ".
There is no need to have the key logger running as my script starts it and stops the logger when the tray app is closed
This makes for a better looking text that's easier to copy from without all the time stamps on every line.
[b]Carolina:[/b] [url=http://smokey01.com/carolina/pages/recent-repo.html]Recent Repository Additions[/url]
[img]https://dl.dropboxusercontent.com/s/ahfade8q4def1lq/signbot.gif[/img]
[img]https://dl.dropboxusercontent.com/s/ahfade8q4def1lq/signbot.gif[/img]
nilsonmorales- Your pet as installed at present brings up your fine dialog box but takes some 4 keystrokes to get rid of . Yes ,it is still turned on then, but keystrokes are a pain and in its present form it would not last very long before I chucked it.
I would suggest to you that, having it come up as a tray applet only, on boot with the option to start that tray dialog box and an option to have it turn on at bootup ,would be the way to go . The rest of it is excellent .Thanks for the app I will follow you on github.
I would suggest to you that, having it come up as a tray applet only, on boot with the option to start that tray dialog box and an option to have it turn on at bootup ,would be the way to go . The rest of it is excellent .Thanks for the app I will follow you on github.
Ok, It's yad, precise yad version is at fault, I can't get a functional right click menu with yad 0.12.4.april wrote:Yes but your script does not appear to run on mine. Should I remove /root/Startup/.pkl .Will that make yours start . I get nothing when I do that atm.
I have your second script in /root/Startup/ and have changed the permissions to executeable but checking running processes there is nothing started?
Heres a yad I compiled in precise 5.7.1, yad-0.37.0, it's the latest and afaik the last that supports gtk2.
this revised script will first kill the logger if it is running, then restarts it with the timestamp disabled
Code: Select all
#!/bin/bash
# MyKeylog
ps ax | grep -q '[My]Keylog' && exit 1
logkeys -k >/dev/null 2>&1
KEYLOG=`awk 'NR==2' < /root/Startup/.pkl`
KEYLOG=`echo "$KEYLOG" | awk -F'-o' '{print $1}'`
eval "$KEYLOG"--no-timestamps -o /var/log/kp/secret-keys.log
function my_keylog () {
ps ax | grep -q '[MY]KEYLOG' && kill $(ps -ef | awk '/[MY]KEYLOG/{print $2}') && exit 1
export MYKEYLOG='
<window title="MyKeylog" icon-name="gtk-edit">
<vbox>
<edit file-monitor="true" auto-refresh="true" wrap-mode="3" editable="true">
<variable>MY_KEYLOG</variable>
<input file>/var/log/kp/secret-keys.log</input>
</edit>
<hbox homogeneous="true">
<hbox>
<button>
<label>Save</label>
<input file stock="gtk-save"></input>
<action>`echo "$MY_KEYLOG" > /var/log/kp/secret-keys.log`</action>
</button>
</hbox>
</hbox>
</vbox>
</window>'
gtkdialog -p MYKEYLOG -G 400x200"+`getcurpos | tr " " "+"`"
}
export -f my_keylog
function killkeylog () {
logkeys -k
kill $(ps -ef | awk '/[MY]KEYLOG/{print $2}')
kill $(ps -ef | awk '/[t]ext=MyKeylog/{print $2}')
}
export -f killkeylog
mkfifo /tmp/mykeylog >/dev/null 2>&1
exec 3<> /tmp/mykeylog
exec yad --notification --no-middle --text=$"MyKeylog" --image="gtk-edit" --command "sh -c 'my_keylog >/dev/null 2>&1'" --listen <&3 &
echo "menu:Exit!sh -c 'killkeylog >/dev/null 2>&1'!gtk-cancel" >&3
- Attachments
-
- yad-0.37.0.tar.gz
- (71.13 KiB) Downloaded 158 times
-
- keylog.jpg
- (47.56 KiB) Downloaded 298 times
[b]Carolina:[/b] [url=http://smokey01.com/carolina/pages/recent-repo.html]Recent Repository Additions[/url]
[img]https://dl.dropboxusercontent.com/s/ahfade8q4def1lq/signbot.gif[/img]
[img]https://dl.dropboxusercontent.com/s/ahfade8q4def1lq/signbot.gif[/img]
Can you post the content of your /root/Startup/.pkl file.april wrote:OK yad is bringing up a dialog box when I run it but with the new script I still have nothing in the tray.?
Nothing running either and nothing in the log file
The yad script should work, I'm running it in a clean install of precise 5.7.1 with only the new yad and pklogger installed, it's working fine for me.
- Attachments
-
- mykeylog.tar.gz
- (814 Bytes) Downloaded 111 times
[b]Carolina:[/b] [url=http://smokey01.com/carolina/pages/recent-repo.html]Recent Repository Additions[/url]
[img]https://dl.dropboxusercontent.com/s/ahfade8q4def1lq/signbot.gif[/img]
[img]https://dl.dropboxusercontent.com/s/ahfade8q4def1lq/signbot.gif[/img]
Code: Select all
#!/bin/sh
logkeys -s --us-keymap --no-func-keys -o /var/log/kp/secret-keys.log
testkp.sh will run the original dialog box-Im using it so its still in now . To see if yours runs I take it out.
- Attachments
-
- Keyloggerscreenshot.png
- (177.41 KiB) Downloaded 221 times
Last edited by april on Sun 06 Nov 2016, 22:53, edited 1 time in total.
Can you just tell me what I should have in /root/Startup/ to run your script please Geoffrey?
BTW You can get pklogger-0.4.pet from github/pklogger or in a terminal --
#v0.4 Geoffrey fix added 11032016, orange color
http://repo.gentoo-es.com/PuppyLinux-re ... er-0.4.pet
BTW You can get pklogger-0.4.pet from github/pklogger or in a terminal --
Code: Select all
wget --no-check-certificate http://repo.gentoo-es.com/PuppyLinux-repositorios/Pupjibaro/3.2.48/pklogger-0.4.pet
http://repo.gentoo-es.com/PuppyLinux-re ... er-0.4.pet
- nilsonmorales
- Posts: 972
- Joined: Fri 15 Apr 2011, 14:39
- Location: El Salvador
When we began to think about a GUI for logkeys, as a joke we thought of an application to 'spy', something for 'jealous husbands', like secretly checking who and what is writing in our computers, for that reason we didn't thought of putting anything on the system tray. Neither José nor I have experience writing code, that's why the GUI may have bugs, but for the same reason it is in GitHub in the hope that someone is able to improve the code. The application is opensource if you want to improve it, we'll be happy and satisfied for that.
[b][url=http://nilsonmorales.blogspot.com/]My blog |[/url][/b][b][url=https://github.com/woofshahenzup]| Github[/url][/b]
[img]https://i.postimg.cc/5tz5vrrX/imag018la6.gif[/img]
[img]http://s5.postimg.org/7h2fid8pz/botones_logos3.png[/img]
[img]https://i.postimg.cc/5tz5vrrX/imag018la6.gif[/img]
[img]http://s5.postimg.org/7h2fid8pz/botones_logos3.png[/img]
I made a pet for the gui, it has a menu entry in Utility and the tray editor has a option to enable it to run at startup.april wrote:Can you just tell me what I should have in /root/Startup/ to run your script please Geoffrey?
Your script runs without any reported error in a terminal but no GUI shows up?
Give it try, it works for me ok, make sure you have the new yad installed else it won't work.
- Attachments
-
- mykeylog-1.0.pet
- (36.72 KiB) Downloaded 154 times
[b]Carolina:[/b] [url=http://smokey01.com/carolina/pages/recent-repo.html]Recent Repository Additions[/url]
[img]https://dl.dropboxusercontent.com/s/ahfade8q4def1lq/signbot.gif[/img]
[img]https://dl.dropboxusercontent.com/s/ahfade8q4def1lq/signbot.gif[/img]
Fine I understand that . I wondered how practical that would be because it is not sustained on boot or shutdown so the user at the time would have to start it after bootup in a terminal each time so you would have to leave your machine running all the time to catch anybody.nilsonmorales wrote:When we began to think about a GUI for logkeys, as a joke we thought of an application to 'spy', something for 'jealous husbands', like secretly checking who and what is writing in our computers, for that reason we didn't thought of putting anything on the system tray. Neither José nor I have experience writing code, that's why the GUI may have bugs, but for the same reason it is in GitHub in the hope that someone is able to improve the code. The application is opensource if you want to improve it, we'll be happy and satisfied for that.
If I get time I will see if I can get it to be persistent and update github . Maybe Geoffrey will put his script there for you.
OK we are progressing . I now have a menu entry for Mykeylog and it is recording keystrokes to the log file without timestamps -ThanksGeoffrey wrote:I made a pet for the gui, it has a menu entry in Utility and the tray editor has a option to enable it to run at startup.
Give it try, it works for me ok, make sure you have the new yad installed else it won't work.
No GUI or tray editor though so there must be something else I don't have running . I have the newer Yad and it seems to be running properly on test.