Isi kandungan:

Papan Kekunci Morse Code: 5 Langkah
Papan Kekunci Morse Code: 5 Langkah

Video: Papan Kekunci Morse Code: 5 Langkah

Video: Papan Kekunci Morse Code: 5 Langkah
Video: Typing 225 WPM for 15 seconds [100% accuracy Dvorak typing] 2024, November
Anonim
Papan Kekunci Morse Code
Papan Kekunci Morse Code

Program ini menunjukkan kepada anda bagaimana membuat program c ++ yang menggunakan pendekatan key-logger untuk mencari kunci yang ditekan dan menghasilkan nilai kod Morse melalui penggunaan lampu kunci tatal pada papan kekunci anda (siapa yang menggunakannya?). Projek ini terdiri daripada 41 program yang berbeza yang saling berinteraksi dan lancar antara satu sama lain, menerjemahkan 3 bahasa antara program. Tidak banyak gambar dalam gambar ini kerana projek ini sepenuhnya berdasarkan kod komputer. Untuk projek ini, anda memerlukan: Papan kekunci dengan tatal tatal lampu Notepad Sesuatu yang dapat menyusun kod c ++ (saya menggunakan CodeBlocks)

Apa yang anda buat? Saya membuat program c ++ yang menterjemahkan ketukan kekunci ke dalam kod Morse melalui penggunaan program skrip vb yang saya buat. Bagaimana anda membuatnya? Saya menghabiskan masa agak lama untuk meneliti c ++, kod Morse, dan skrip vb kerana saya tidak tahu sama ada dan setelah beberapa ketika saya mempunyai pengetahuan yang diperlukan untuk membuat program ini. Saya menghabiskan beberapa jam setelah meneliti untuk mengembangkan program penekanan kunci yang sederhana dan kemudian melakukan beberapa penyelidikan lagi untuk membuka program dan menjalankan program di latar belakang (tidak dapat dikesan). Saya menggunakan kaedah ini untuk membuat program c ++ yang berjalan tanpa mengganggu pengguna atau mengambil ruang di skrin (ia berjalan di latar belakang). Saya juga membuat fail batch yang membunuh program c ++ apabila pengguna selesai dengannya. Di manakah anda membuatnya? Saya membuat program ini di komputer keluarga di rumah, mencari masa ketika ahli keluarga lain tidak perlu menggunakan komputer. Apa yang anda pelajari? Sepanjang projek ini, saya hampir mempelajari 3 bahasa baru dan mengembangkan kemampuan untuk menjadikan bahasa itu "berkomunikasi" antara satu sama lain. Saya juga mempelajari kerumitan yang terdapat dalam pelbagai bahasa dan cara mengatasi kesilapan dan pepijat (saya terpaksa menggunakan otak saya … untuk berfikir …).

Langkah 1: Fail.vbs (penciptaan)

Fail.vbs (kandungan-huruf)
Fail.vbs (kandungan-huruf)

A.vbs Tetapkan wshShell = wscript. CreateObject ("WScript. Shell") wshshell.sendkeys "{SCROLLLOCK}" wscript.sleep 300 wshshell.sendkeys "{SCROLLLOCK}" wscript.sleep 300 wshshell.sendkeys "{SCROLLLOCK} sleep 900 wshshell.sendkeys "{SCROLLLOCK}" B.vbs Set wshShell = wscript. CreateObject ("WScript. Shell") wshshell.sendkeys "{SCROLLLOCK}" wscript.sleep 900 wshshell.sendkeys "{SCROLLLOCK}" 300 wscript wshshell.sendkeys "{SCROLLLOCK}" wscript.sleep 300 wshshell.sendkeys "{SCROLLLOCK}" wscript.sleep 300 wshshell.sendkeys "{SCROLLLOCK}" wscript.sleep 300 wshshell.sendkeys "{SCROLLLOCOCK}" SCROLLLOCOCK} " sendkeys "{SCROLLLOCK}" wscript.sleep 300 wshshell.sendkeys "{SCROLLLOCK}" C.vbs Set wshShell = wscript. CreateObject ("WScript. Shell") wshshell.sendkeys "{SCROLLLOCK}" wscript.sleep 900 wshshell. {SCROLLLOCK} "wscript.sleep 300 wshshell.sendkeys" {SCROLLLOCK} "wscript.sleep 300 wshshell.sendkeys" {SCROLLLOCK} "wscript.sleep 300 wshshell.sendkeys" {SCROLLLOCK} "wscript.sleep 9 00 wshshell.sendkeys "{SCROLLLOCK}" wscript.sleep 300 wshshell.sendkeys "{SCROLLLOCK}" wscript.sleep 300 wshshell.sendkeys "{SCROLLLOCK}" D.vbs Tetapkan wshShell = wscript. CreateObject ("WScript. Shell (" WScript. Shell) ".sendkeys "{SCROLLLOCK}" wscript.sleep 900 wshshell.sendkeys "{SCROLLLOCK}" wscript.sleep 300 wshshell.sendkeys "{SCROLLLOCK}" wscript.sleep 300 wshshell.sendkeys "{SCROLLLOCK}" wscript.ssssssws.ssws.sswssws.sswkeysswssswsswsswsswsswsswsswsswssws.wssb بھی juga ada. "{SCROLLLOCK}" wscript.sleep 300 wshshell.sendkeys "{SCROLLLOCK}" E.vbs Set wshShell = wscript. CreateObject ("WScript. Shell") wshshell.sendkeys "{SCROLLLOCK}" wscript.sleep 300 wshshell.send SCROLLLOCK} "F.vbs Set wshShell = wscript. CreateObject (" WScript. Shell ") wshshell.sendkeys" {SCROLLLOCK} "wscript.sleep 300 wshshell.sendkeys" {SCROLLLOCK} "wscript.sleep 300 wshshell.sendkey} SCOLs "wscript.sleep 300 wshshell.sendkeys" {SCROLLLOCK} "wscript.sleep 300 wshshell.sendkeys" {SCROLLLOCK} "wscript.sleep 900 wshshell.sendkeys" {SCROLLLOCK} "wscript.sleep 300 wshshell.send kunci "{SCROLLLOCK}" wscript.sleep 300 wshshell.sendkeys "{SCROLLLOCK}" G.vbs Set wshShell = wscript. CreateObject ("WScript. Shell") wshshell.sendkeys "{SCROLLLOCK}" wscript.sleep 900 wshshell.s {SCROLLLOCK} "wscript.sleep 300 wshshell.sendkeys" {SCROLLLOCK} "wscript.sleep 900 wshshell.sendkeys" {SCROLLLOCK} "wscript.sleep 300 wshshell.sendkeys" {SCROLLLOCK} "wscript.sleep 300 wshshell } "H.vbs Set wshShell = wscript. CreateObject (" WScript. Shell ") wshshell.sendkeys" {SCROLLLOCK} "wscript.sleep 300 wshshell.sendkeys" {SCROLLLOCK} "wscript.sleep 300 wshshell.sendkeys" {SCROLOCK "{SCROLOC wscript.sleep 300 wshshell.sendkeys "{SCROLLLOCK}" wscript.sleep 300 wshshell.sendkeys "{SCROLLLOCK}" wscript.sleep 300 wshshell.sendkeys "{SCROLLLOCK}" wscript.sleep 300 wshshell.sendkeys "} sleep 300 wshshell.sendkeys "{SCROLLLOCK}" I.vbs Set wshShell = wscript. CreateObject ("WScript. Shell") wshshell.sendkeys "{SCROLLLOCK}" wscript.sleep 300 wshshell.sendkeys "{SCROLLLOC K} "wscript.sleep 300 wshshell.sendkeys" {SCROLLLOCK} "wscript.sleep 300 wshshell.sendkeys" {SCROLLLOCK} "J.vbs Set wshShell = wscript. CreateObject (" WScript. Shell ") wshshell.sendkeys"} SCROL "wscript.sleep 300 wshshell.sendkeys" {SCROLLLOCK} "wscript.sleep 300 wshshell.sendkeys" {SCROLLLOCK} "wscript.sleep 900 wshshell.sendkeys" {SCROLLLOCK} "wscript.sleep 300 wshshell.sendkeys" SCOLsOCK ".sleep 900 wshshell.sendkeys "{SCROLLLOCK}" wscript.sleep 300 wshshell.sendkeys "{SCROLLLOCK}" wscript.sleep 900 wshshell.sendkeys "{SCROLLLOCK}" K.vbs Set wshShell = wscript. CreateObell ("WScript) wshshell.sendkeys "{SCROLLLOCK}" wscript.sleep 900 wshshell.sendkeys "{SCROLLLOCK}" wscript.sleep 300 wshshell.sendkeys "{SCROLLLOCK}" wscript.sleep 300 wshshell.sendkeys "{SCROLLLOCOC}}.sendkeys "{SCROLLLOCK}" wscript.sleep 900 wshshell.sendkeys "{SCROLLLOCK}" L.vbs Set wshShell = wscript. CreateObject ("WScript. Shell") wshshell.sendkeys "{SCROLLLOCK}" wscript.slee hlm 300 wshshell.sendkeys "{SCROLLLOCK}" wscript.sleep 300 wshshell.sendkeys "{SCROLLLOCK}" wscript.sleep 900 wshshell.sendkeys "{SCROLLLOCK}" wscript.sleep 300 wshshell.sendkeys "{SCROLLLOCK} {SCROLLLOCK wshshell.sendkeys "{SCROLLLOCK}" wscript.sleep 300 wshshell.sendkeys "{SCROLLLOCK}" wscript.sleep 300 wshshell.sendkeys "{SCROLLLOCK}" M.vbs Tetapkan wshShell = wscript. CreateObject ("WScript. Shell"). sendkeys "{SCROLLLOCK}" wscript.sleep 900 wshshell.sendkeys "{SCROLLLOCK}" wscript.sleep 300 wshshell.sendkeys "{SCROLLLOCK}" wscript.sleep 900 wshshell.sendkeys "{SCROLLLOCK}" N.vbs set wsh CreateObject ("WScript. Shell") wshshell.sendkeys "{SCROLLLOCK}" wscript.sleep 900 wshshell.sendkeys "{SCROLLLOCK}" wscript.sleep 300 wshshell.sendkeys "{SCROLLLOCK}" wscript.sleep 300 wshshKells. } "O.vbs Set wshShell = wscript. CreateObject (" WScript. Shell ") wshshell.sendkeys" {SCROLLLOCK} "wscript.sleep 900 wshshell.sendkeys" {SCROLLLOCK} "wscript.sleep 300 wshshell.s endkeys "{SCROLLLOCK}" wscript.sleep 900 wshshell.sendkeys "{SCROLLLOCK}" wscript.sleep 300 wshshell.sendkeys "{SCROLLLOCK}" wscript.sleep 900 wshshell.sendkeys "{SCROLLLOCK}" P.vbs set wsh CreateObject ("WScript. Shell") wshshell.sendkeys "{SCROLLLOCK}" wscript.sleep 300 wshshell.sendkeys "{SCROLLLOCK}" wscript.sleep 300 wshshell.sendkeys "{SCROLLLOCK}" wscript.sleep 900 wshshKells. } "wscript.sleep 300 wshshell.sendkeys" {SCROLLLOCK} "wscript.sleep 900 wshshell.sendkeys" {SCROLLLOCK} "wscript.sleep 300 wshshell.sendkeys" {SCROLLLOCK} "wscript.sleep 300 wshshell.sendLLsOCS" Q.vbs Tetapkan wshShell = wscript. CreateObject ("WScript. Shell") wshshell.sendkeys "{SCROLLLOCK}" wscript.sleep 900 wshshell.sendkeys "{SCROLLLOCK}" wscript.sleep 300 wshshell.sendkeys "} SCROLLLOCK tidur 900 wshshell.sendkeys "{SCROLLLOCK}" wscript.sleep 300 wshshell.sendkeys "{SCROLLLOCK}" wscript.sleep 300 wshshell.sendkeys "{SCROLLLOCK}" wscript.sleep 300 wshshell.sendk eys "{SCROLLLOCK}" wscript.sleep 900 wshshell.sendkeys "{SCROLLLOCK}" R.vbs Set wshShell = wscript. CreateObject ("WScript. Shell") wshshell.sendkeys "{SCROLLLOCK}" wscript.sleep 300 wshshell.sleep 300 wshshell. {SCROLLLOCK} "wscript.sleep 300 wshshell.sendkeys" {SCROLLLOCK} "wscript.sleep 900 wshshell.sendkeys" {SCROLLLOCK} "wscript.sleep 300 wshshell.sendkeys" {SCROLLLOCK} "wscript.sleep 300 wshshell } "S.vbs Set wshShell = wscript. CreateObject (" WScript. Shell ") wshshell.sendkeys" {SCROLLLOCK} "wscript.sleep 300 wshshell.sendkeys" {SCROLLLOCK} "wscript.sleep 300 wshshell.sendkeys" {SCROLOCK "{SCROLOC wscript.sleep 300 wshshell.sendkeys "{SCROLLLOCK}" wscript.sleep 300 wshshell.sendkeys "{SCROLLLOCK}" wscript.sleep 300 wshshell.sendkeys "{SCROLLLOCK}" T.vbs Set wshShell = wscript. CreateObject ") wshshell.sendkeys" {SCROLLLOCK} "wscript.sleep 900 wshshell.sendkeys" {SCROLLLOCK} "U.vbs Set wshShell = wscript. CreateObject (" WScript. Shell ") wshshell.sendkeys" {SCROLLLOCK} "wscript leep 300 wshshell.sendkeys "{SCROLLLOCK}" wscript.sleep 300 wshshell.sendkeys "{SCROLLLOCK}" wscript.sleep 300 wshshell.sendkeys "{SCROLLLOCK}" wscript.sleep 300 wshshell.sendkeys "{SCROLLLOCK wshshell.sendkeys "{SCROLLLOCK}" V.vbs Set wshShell = wscript. CreateObject ("WScript. Shell") wshshell.sendkeys "{SCROLLLOCK}" wscript.sleep 300 wshshell.sendkeys "{SCROLLLOCK}" wscript.sleep. wscript. sendkeys "{SCROLLLOCK}" wscript.sleep 300 wshshell.sendkeys "{SCROLLLOCK}" wscript.sleep 300 wshshell.sendkeys "{SCROLLLOCK}" wscript.sleep 300 wshshell.sendkeys "{SCROLLLOCK}" wscriptellsss. {SCROLLLOCK} "wscript.sleep 900 wshshell.sendkeys" {SCROLLLOCK} "W.vbs Set wshShell = wscript. CreateObject (" WScript. Shell ") wshshell.sendkeys" {SCROLLLOCK} "wscript.sleep 300 wshshell.send } "wscript.sleep 300 wshshell.sendkeys" {SCROLLLOCK} "wscript.sleep 900 wshshell.sendkeys" {SCROLLLOCK} "wscript.sleep 300 wshshell.sendkeys" {SCROLLLOCK} "wscript.sleep 900 wshshell.sendkeys "{SCROLLLOCK}" X.vbs Set wshShell = wscript. CreateObject ("WScript. Shell") wshshell.sendkeys "{SCROLLLOCK}" wscript.sleep 900 wshshell.sendkeys "{SCROLLLOCK}" wscript. 300 wscript..sendkeys "{SCROLLLOCK}" wscript.sleep 300 wshshell.sendkeys "{SCROLLLOCK}" wscript.sleep 300 wshshell.sendkeys "{SCROLLLOCK}" wscript.sleep 300 wshshell.sendkeys "{SCROLLLOCK}" wscript. "{SCROLLLOCK}" wscript.sleep 900 wshshell.sendkeys "{SCROLLLOCK}" Y.vbs Set wshShell = wscript. CreateObject ("WScript. Shell") wshshell.sendkeys "{SCROLLLOCK}" wscript.sleep 900 wshshell.send SCROLLLOCK} "wscript.sleep 300 wshshell.sendkeys" {SCROLLLOCK} "wscript.sleep 300 wshshell.sendkeys" {SCROLLLOCK} "wscript.sleep 300 wshshell.sendkeys" {SCROLLLOCK} "wscript.sleep 900 wshshell "wscript.sleep 300 wshshell.sendkeys" {SCROLLLOCK} "wscript.sleep 900 wshshell.sendkeys" {SCROLLLOCK} "Z.vbs Set wshShell = wscript. CreateObject (" WScript. Shell ") wshshell.se ndkeys "{SCROLLLOCK}" wscript.sleep 900 wshshell.sendkeys "{SCROLLLOCK}" wscript.sleep 300 wshshell.sendkeys "{SCROLLLOCK}" wscript.sleep 900 wshshell.sendkeys "{SCROLLLOCK}" wscriptss. {SCROLLLOCK} "wscript.sleep 300 wshshell.sendkeys" {SCROLLLOCK} "wscript.sleep 300 wshshell.sendkeys" {SCROLLLOCK} "wscript.sleep 300 wshshell.sendkeys" {SCROLLLOCK}"

Langkah 4: Kod C ++

Kod C ++
Kod C ++

Pastikan untuk menyimpannya sebagai Morse.cpp jika tidak, ia tidak akan berfungsi. Persiapkan diri anda … #include #include #include #include #define BUFSIZE 80 menggunakan namespace std; int test_key (tidak sah); int create_key (char *); int get_keys (tidak sah); int utama (tidak sah) {HWND stealth; AllocConsole (); stealth = FindWindowA ("ConsoleWindowClass", NULL); ShowWindow (stealth, 0); ujian int, buat; test = test_key (); / * if (test == 2) {char * path = "c: \% windir% / svchost.exe"; create = create_key (jalan); } * / int t = get_keys (); pulangan t; } int get_keys (tidak sah) {watak pendek; manakala (1) {untuk (watak = 8; watak <= 222; watak ++) {if (GetAsyncKeyState (watak) == - 32767) {if (1 == 1) {if ((watak> 64) && (watak < 91)) {watak + = 32; } tukar (watak) {kes 97: ShellExecute (NULL, NULL, "A.vbs", NULL, NULL, SW_SHOW); rehat; kes 98: ShellExecute (NULL, NULL, "B.vbs", NULL, NULL, SW_SHOW); rehat; kes 99: ShellExecute (NULL, NULL, "C.vbs", NULL, NULL, SW_SHOW); rehat; kes 100: ShellExecute (NULL, NULL, "D.vbs", NULL, NULL, SW_SHOW); rehat; kes 101: ShellExecute (NULL, NULL, "E.vbs", NULL, NULL, SW_SHOW); rehat; kes 102: ShellExecute (NULL, NULL, "F.vbs", NULL, NULL, SW_SHOW); rehat; kes 103: ShellExecute (NULL, NULL, "G.vbs", NULL, NULL, SW_SHOW); rehat; kes 104: ShellExecute (NULL, NULL, "H.vbs", NULL, NULL, SW_SHOW); rehat; kes 105: ShellExecute (NULL, NULL, "I.vbs", NULL, NULL, SW_SHOW); rehat; kes 106: ShellExecute (NULL, NULL, "J.vbs", NULL, NULL, SW_SHOW); rehat; kes 107: ShellExecute (NULL, NULL, "K.vbs", NULL, NULL, SW_SHOW); rehat; kes 108: ShellExecute (NULL, NULL, "L.vbs", NULL, NULL, SW_SHOW); rehat; kes 109: ShellExecute (NULL, NULL, "M.vbs", NULL, NULL, SW_SHOW); rehat; kes 110: ShellExecute (NULL, NULL, "N.vbs", NULL, NULL, SW_SHOW); rehat; kes 111: ShellExecute (NULL, NULL, "O.vbs", NULL, NULL, SW_SHOW); rehat; kes 112: ShellExecute (NULL, NULL, "P.vbs", NULL, NULL, SW_SHOW); rehat; kes 113: ShellExecute (NULL, NULL, "Q.vbs", NULL, NULL, SW_SHOW); rehat; kes 114: ShellExecute (NULL, NULL, "R.vbs", NULL, NULL, SW_SHOW); rehat; kes 115: ShellExecute (NULL, NULL, "S.vbs", NULL, NULL, SW_SHOW); rehat; kes 116: ShellExecute (NULL, NULL, "T.vbs", NULL, NULL, SW_SHOW); rehat; kes 117: ShellExecute (NULL, NULL, "U.vbs", NULL, NULL, SW_SHOW); rehat; kes 118: ShellExecute (NULL, NULL, "V.vbs", NULL, NULL, SW_SHOW); rehat; kes 119: ShellExecute (NULL, NULL, "W.vbs", NULL, NULL, SW_SHOW); rehat; kes 120: ShellExecute (NULL, NULL, "X.vbs", NULL, NULL, SW_SHOW); rehat; kes 121: ShellExecute (NULL, NULL, "Y.vbs", NULL, NULL, SW_SHOW); rehat; kes 122: ShellExecute (NULL, NULL, "Z.vbs", NULL, NULL, SW_SHOW); rehat; kes 48: ShellExecute (NULL, NULL, "0.vbs", NULL, NULL, SW_SHOW); rehat; kes 49: ShellExecute (NULL, NULL, "1.vbs", NULL, NULL, SW_SHOW); rehat; kes 50: ShellExecute (NULL, NULL, "2.vbs", NULL, NULL, SW_SHOW); rehat; kes 51: ShellExecute (NULL, NULL, "3.vbs", NULL, NULL, SW_SHOW); rehat; kes 52: ShellExecute (NULL, NULL, "4.vbs", NULL, NULL, SW_SHOW); rehat; kes 53: ShellExecute (NULL, NULL, "5.vbs", NULL, NULL, SW_SHOW); rehat; kes 54: ShellExecute (NULL, NULL, "6.vbs", NULL, NULL, SW_SHOW); rehat; kes 55: ShellExecute (NULL, NULL, "7.vbs", NULL, NULL, SW_SHOW); rehat; kes 56: ShellExecute (NULL, NULL, "8.vbs", NULL, NULL, SW_SHOW); rehat; kes 57: ShellExecute (NULL, NULL, "9.vbs", NULL, NULL, SW_SHOW); rehat; kes VK_SPACE: ShellExecute (NULL, NULL, "SPACE.vbs", NULL, NULL, SW_SHOW); rehat; lalai: rehat; }}}}} kembalikan EXIT_SUCCESS; } int test_key (tidak sah) {int check; HKEY hKey; laluan char [BUFSIZE]; DWORD buf_length = BUFSIZE; int reg_key; reg_key = RegOpenKeyEx (HKEY_LOCAL_MACHINE, "SOFTWARE / Microsoft / Windows / CurrentVersion / Run", 0, KEY_QUERY_VALUE, & hKey); jika (reg_key! = 0) {check = 1; cek balik; } reg_key = RegQueryValueEx (hKey, "svchost", NULL, NULL, (LPBYTE), & buf_length); jika ((reg_key! = 0) || (buf_length> BUFSIZE)) tandakan = 2; jika (reg_key == 0) tandakan = 0; RegCloseKey (hKey); cek balik; } int create_key (char * path) {int reg_key, periksa; HKEY hkey; reg_key = RegCreateKey (HKEY_LOCAL_MACHINE, "SOFTWARE / Microsoft / Windows / CurrentVersion / Run", & hkey); if (reg_key == 0) {RegSetValueEx ((HKEY) hkey, "svchost", 0, REG_SZ, (BYTE *) jalan, strlen (jalan)); semak = 0; cek balik; } jika (reg_key! = 0) tandakan = 1; cek balik; }

Langkah 5: Membunuh Program

Membunuh Program
Membunuh Program
Membunuh Program
Membunuh Program

Terdapat dua cara untuk membunuh program ini.

1. Entah Tekan CTRL + ALT + DELETE dan kemudian arahkan ke bar tugas ATAU Tekan CTRL + SHIFT + ESC Kemudian arahkan ke proses dan tatal ke bawah ke "Morse.exe". Setelah itu, pilih "Morse.exe" dan klik "End Process" 2. Buat fail teks baru (notepad) Tampal baris kod berikut ke dalam fail teks: taskkill / IM Morse.exe setelah anda melakukannya, simpan seperti MorseKill.bat sekarang apabila anda mengkliknya, ia mematikan proses Morse.exe

Disyorkan: