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

Keymapping #202

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions After Installation Keymapping/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<html>
<head></head>
<body>
<p align="justify">
<h1>How To run on the Terminal:</h1>
<h2>Starting Key Logger</h2>
sudo logkeys --start --output filename.log -m my_keymap

<h2>After this write anything through keyboard.</h2>

<h2>Stopping Keylogger:</h2>
sudo logkeys --kill

<h2>Run the parser.py file on the same directory as:</h2>
python parser.py
<h2>What is does ?</h2>
<li>Checks the filename.log file on the same directory
<li>Then parse the file and replaces the letters according to our personal keyboard on capitalized format.

</p>
</body>
</html>
32 changes: 32 additions & 0 deletions After Installation Keymapping/filename.log
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
Logging started ...

2019-08-04 19:34:49+0545 > <LShft>fwjji u ȁv xwucd hwtjiddwa
2019-08-04 19:35:00+0545 > <Up><Up><Up><Up>
2019-08-04 19:35:06+0545 >

Logging stopped at 2019-08-04 19:35:06+0545

Logging started ...

2019-08-04 19:37:58+0545 > ȁv u xwucd hwtjiddwa
2019-08-04 19:38:05+0545 > <Up><Up><Up><Up><Up>
2019-08-04 19:38:10+0545 >

Logging stopped at 2019-08-04 19:38:10+0545

Logging started ...

2019-08-04 19:41:37+0545 > fwjji u ȁv ȁcyhyj oȁeȁgu<BckSp>yju
2019-08-04 19:41:45+0545 > <Up><Up><Up><Down><Up><Up><Up>
2019-08-04 19:41:50+0545 >

Logging stopped at 2019-08-04 19:41:50+0545

Logging started ...

2019-08-04 19:55:11+0545 > <LAlt><Tab>fiq aiw܂ ewauew\ruic qieh ic ȁ <LShft>Jȁȁ<BckSp>C eiyrwe
2019-08-04 19:55:41+0545 > <LAlt><Tab><Tab><LAlt><Tab><Tab><Up><Up><Up>
2019-08-04 19:55:48+0545 >

Logging stopped at 2019-08-04 19:55:48+0545

106 changes: 106 additions & 0 deletions After Installation Keymapping/my_keymap
Original file line number Diff line number Diff line change
@@ -0,0 +1,106 @@
<Esc>
1 !
2 @
3 #
4 $
5 %
6 ^
7 &
8 *
9 (
0 )
- _
=
<BckSp>
<Tab>

q Q
w W
e E
r R
t T
y Y
u U
i I
o O
p P
[
<Enter>
<LCtrl>
ȁ
܂
a A
s S
d D
f F
g G
h H
j J
k K
l L
;
<LShft>
' "
` ~
܀
\ |
z Z
x X
c C
v V
b B
n N
m
<RShft>
<KP*>
<LAlt>

<CpsLk>
<F1>
<F2>
<F3>
<F4>
<F5>
<F6>
<F7>
<F8>
<F9>
<F10>
<NumLk>
<ScrLk>
<KP7>
<KP8>
<KP9>
<KP->
<KP4>
<KP5>
<KP6>
<KP+>
<KP1>
<KP2>
<KP3>
<KP0>
<KP.>
ć
<F11>
<F12>
<KPEnt>
<RCtrl>
<KP/>
<PrtSc>
<AltGr>
<Break>
<Home>
<Up>
<PgUp>
<Left>
<Right>
<End>
<Down>
<PgDn>
<Ins>
<Del>
<Pause>
<LMeta>
<RMeta>
<Menu>
32 changes: 32 additions & 0 deletions After Installation Keymapping/parser.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
import string

clues = {'ȁ': 'A', 'x': 'B', '-': 'C', 'a': 'D', 'w': 'E'
, 's': 'F', 'd': 'G','f': 'H', 'u': 'I', 'g': 'J', 'h': 'K',
'j': 'L', 'v': 'M', 'c': 'N','i': 'O', 'o': 'P', ' ': 'Q',
'e': 'R', '.': 'S', 'r': 'T', 'y': 'U','z': 'V', 'q': 'W',
'܀': 'X', 't': 'Y', '`': 'Z','/.':'S'}


def decrypter(words, clues):

for i, word in enumerate(words):
for key in clues:
words[i] = words[i].replace(key, clues.get(key))

return words


s = open("filename.log","r+")
phrase = []
for line in s.readlines():
n = len(line)
for i in range(len(line)):
if line[i] == " " and line[i+1] == ">" and line[i+2] == " ":
phrase.append(line[i+3:n])

Encrypted = phrase
print (Encrypted)
Decrypted = decrypter(phrase,clues)
for i in range (len(phrase)):
print(Encrypted[i])
print(Decrypted[i])