]> cvs.zerfleddert.de Git - proxmark3-svn/commitdiff
Add License/Copyright headers/notices. Please add your own copyright notice if you...
authorizsh@fail0verflow.com <izsh@fail0verflow.com@ef4ab9da-24cd-11de-8aaa-f3a34680c41f>
Sun, 21 Feb 2010 00:47:22 +0000 (00:47 +0000)
committerizsh@fail0verflow.com <izsh@fail0verflow.com@ef4ab9da-24cd-11de-8aaa-f3a34680c41f>
Sun, 21 Feb 2010 00:47:22 +0000 (00:47 +0000)
50 files changed:
client/Makefile
client/cli.c
client/cmddata.c
client/cmddata.h
client/cmdhf.c
client/cmdhf.h
client/cmdhf14a.c
client/cmdhf14a.h
client/cmdhf14b.c
client/cmdhf14b.h
client/cmdhf15.c
client/cmdhf15.h
client/cmdhflegic.c
client/cmdhflegic.h
client/cmdhw.c
client/cmdhw.h
client/cmdlf.c
client/cmdlf.h
client/cmdlfem4x.c
client/cmdlfem4x.h
client/cmdlfhid.c
client/cmdlfhid.h
client/cmdlfti.c
client/cmdlfti.h
client/cmdmain.c
client/cmdmain.h
client/cmdparser.c
client/cmdparser.h
client/data.c
client/data.h
client/elf.h
client/flash.c
client/flash.h
client/flasher.c
client/graph.c
client/graph.h
client/guidummy.c
client/proxgui.cpp
client/proxgui.h
client/proxguiqt.cpp
client/proxguiqt.h
client/proxmark3.c
client/proxmark3.h
client/proxusb.c
client/proxusb.h
client/sleep.h
client/snooper.c
client/ui.c
client/ui.h
client/wingui.c [deleted file]

index 87d529d5f4c604678f7812275616882f9a554457..c4696464b68138841a894bebace6ce0d780a4677 100644 (file)
@@ -1,3 +1,8 @@
+#-----------------------------------------------------------------------------
+# This code is licensed to you under the terms of the GNU GPL, version 2 or,
+# at your option, any later version. See the LICENSE.txt file for the text of
+# the license.
+#-----------------------------------------------------------------------------
 CC=gcc
 CXX=g++
 #COMMON_FLAGS = -m32
index 1fcdd0c3840366f14bb6eabc558bba34783b7151..c5c2acf46dbea4b0cef7b0188f2eb85077f3d520 100644 (file)
@@ -1,3 +1,11 @@
+//-----------------------------------------------------------------------------
+// This code is licensed to you under the terms of the GNU GPL, version 2 or,
+// at your option, any later version. See the LICENSE.txt file for the text of
+// the license.
+//-----------------------------------------------------------------------------
+// Command line binary
+//-----------------------------------------------------------------------------
+
 #include <stdio.h>
 #include "sleep.h"
 #include "ui.h"
index 561132bf16113a15a10a2eb01588172e2dad54ce..92e587abfc6c75321fee59f0cb4fb414390fbe59 100644 (file)
@@ -1,3 +1,13 @@
+//-----------------------------------------------------------------------------
+// Copyright (C) 2010 iZsh <izsh at fail0verflow.com>
+//
+// This code is licensed to you under the terms of the GNU GPL, version 2 or,
+// at your option, any later version. See the LICENSE.txt file for the text of
+// the license.
+//-----------------------------------------------------------------------------
+// Data and Graph commands
+//-----------------------------------------------------------------------------
+
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
index 73b5e56523813e39fb6dbcf70721b99d70a1adce..06ea18cc6fa3ea787957ebabd4c4148bd5d07116 100644 (file)
@@ -1,3 +1,13 @@
+//-----------------------------------------------------------------------------
+// Copyright (C) 2010 iZsh <izsh at fail0verflow.com>
+//
+// This code is licensed to you under the terms of the GNU GPL, version 2 or,
+// at your option, any later version. See the LICENSE.txt file for the text of
+// the license.
+//-----------------------------------------------------------------------------
+// Data and Graph commands
+//-----------------------------------------------------------------------------
+
 #ifndef CMDDATA_H__
 #define CMDDATA_H__
 
index a96d1178703180755ae9edc095a9e01dc69d34a0..176d99cc8928982f438061b51a24122904355758 100644 (file)
@@ -1,3 +1,13 @@
+//-----------------------------------------------------------------------------
+// Copyright (C) 2010 iZsh <izsh at fail0verflow.com>
+//
+// This code is licensed to you under the terms of the GNU GPL, version 2 or,
+// at your option, any later version. See the LICENSE.txt file for the text of
+// the license.
+//-----------------------------------------------------------------------------
+// High frequency commands
+//-----------------------------------------------------------------------------
+
 #include <stdio.h>
 #include "proxusb.h"
 #include "graph.h"
index 317ab4a73717264ef9bb8bcab8fbe535931c87e5..ff20a950a1dc63cb3ef5fd87fb13ffe9b5711c0a 100644 (file)
@@ -1,8 +1,17 @@
+//-----------------------------------------------------------------------------
+// Copyright (C) 2010 iZsh <izsh at fail0verflow.com>
+//
+// This code is licensed to you under the terms of the GNU GPL, version 2 or,
+// at your option, any later version. See the LICENSE.txt file for the text of
+// the license.
+//-----------------------------------------------------------------------------
+// High frequency commands
+//-----------------------------------------------------------------------------
+
 #ifndef CMDHF_H__
 #define CMDHF_H__
 
 int CmdHF(const char *Cmd);
-
 int CmdHFTune(const char *Cmd);
 
 #endif
index 61d337d47c9fc2b52b12d2cb7fd77fa3e48806d7..a6fa5a85e62362819d972ae7dc52d09a90fff583 100644 (file)
@@ -1,3 +1,13 @@
+//-----------------------------------------------------------------------------
+// Copyright (C) 2010 iZsh <izsh at fail0verflow.com>
+//
+// This code is licensed to you under the terms of the GNU GPL, version 2 or,
+// at your option, any later version. See the LICENSE.txt file for the text of
+// the license.
+//-----------------------------------------------------------------------------
+// High frequency ISO14443A commands
+//-----------------------------------------------------------------------------
+
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
index 2451954e7275036e66f9ddc3edd3b50372f54d1a..eaab18cb2c5fca5dd0342f8f63e312064f57daa9 100644 (file)
@@ -1,3 +1,13 @@
+//-----------------------------------------------------------------------------
+// Copyright (C) 2010 iZsh <izsh at fail0verflow.com>
+//
+// This code is licensed to you under the terms of the GNU GPL, version 2 or,
+// at your option, any later version. See the LICENSE.txt file for the text of
+// the license.
+//-----------------------------------------------------------------------------
+// High frequency ISO14443A commands
+//-----------------------------------------------------------------------------
+
 #ifndef CMDHF14A_H__
 #define CMDHF14A_H__
 
index ea5b5584e960cbc14f0ecafc9bd4a9b795419b45..79c1b8ed6f689c4e22f2bd46444a80cfd6535ae7 100644 (file)
@@ -1,3 +1,13 @@
+//-----------------------------------------------------------------------------
+// Copyright (C) 2010 iZsh <izsh at fail0verflow.com>
+//
+// This code is licensed to you under the terms of the GNU GPL, version 2 or,
+// at your option, any later version. See the LICENSE.txt file for the text of
+// the license.
+//-----------------------------------------------------------------------------
+// High frequency ISO14443B commands
+//-----------------------------------------------------------------------------
+
 #include <stdio.h>
 #include <stdlib.h>
 #include <stdbool.h>
index 523f079f7a7058b94c98d1df3ded5f6e3e458f3e..50d6476286fab23f5c1f5fe80bd27930f4397e3f 100644 (file)
@@ -1,3 +1,13 @@
+//-----------------------------------------------------------------------------
+// Copyright (C) 2010 iZsh <izsh at fail0verflow.com>
+//
+// This code is licensed to you under the terms of the GNU GPL, version 2 or,
+// at your option, any later version. See the LICENSE.txt file for the text of
+// the license.
+//-----------------------------------------------------------------------------
+// High frequency ISO14443B commands
+//-----------------------------------------------------------------------------
+
 #ifndef CMDHF14B_H__
 #define CMDHF14B_H__
 
index ca3c6d9337e471e52fbd3e7fa70af71850961764..9c613b8665c9ab3db8d786e54054470806bd3426 100644 (file)
@@ -1,3 +1,13 @@
+//-----------------------------------------------------------------------------
+// Copyright (C) 2010 iZsh <izsh at fail0verflow.com>
+//
+// This code is licensed to you under the terms of the GNU GPL, version 2 or,
+// at your option, any later version. See the LICENSE.txt file for the text of
+// the license.
+//-----------------------------------------------------------------------------
+// High frequency ISO15693 commands
+//-----------------------------------------------------------------------------
+
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
index e7ca32ef346fa72d09150d51e6c40e45b3659bf8..4b9822b7aed2ca3706c75232cdc4089fbd033fdf 100644 (file)
@@ -1,3 +1,13 @@
+//-----------------------------------------------------------------------------
+// Copyright (C) 2010 iZsh <izsh at fail0verflow.com>
+//
+// This code is licensed to you under the terms of the GNU GPL, version 2 or,
+// at your option, any later version. See the LICENSE.txt file for the text of
+// the license.
+//-----------------------------------------------------------------------------
+// High frequency ISO15693 commands
+//-----------------------------------------------------------------------------
+
 #ifndef CMDHF15_H__
 #define CMDHF15_H__
 
index e9333ef91eda715598fb842a04d32195603e7089..381ad6b22e6ea2a3cd535538ffb797a7b5d58b1a 100644 (file)
@@ -1,3 +1,13 @@
+//-----------------------------------------------------------------------------
+// Copyright (C) 2010 iZsh <izsh at fail0verflow.com>
+//
+// This code is licensed to you under the terms of the GNU GPL, version 2 or,
+// at your option, any later version. See the LICENSE.txt file for the text of
+// the license.
+//-----------------------------------------------------------------------------
+// High frequency Legic commands
+//-----------------------------------------------------------------------------
+
 #include <stdio.h>
 #include <string.h>
 #include "proxusb.h"
index 7da1be61120b913fe7af33c8e2f0850b7537fdf2..4819711623eec73ac943a536c213170050527299 100644 (file)
@@ -1,3 +1,13 @@
+//-----------------------------------------------------------------------------
+// Copyright (C) 2010 iZsh <izsh at fail0verflow.com>
+//
+// This code is licensed to you under the terms of the GNU GPL, version 2 or,
+// at your option, any later version. See the LICENSE.txt file for the text of
+// the license.
+//-----------------------------------------------------------------------------
+// High frequency Legic commands
+//-----------------------------------------------------------------------------
+
 #ifndef CMDHFLEGIC_H__
 #define CMDHFLEGIC_H__
 
index c2b58c9fa2c21bb80d72d238d3a4791bcfb49fef..4dd5823df48e9b36bcedde92cc3cd809a8b98c0e 100644 (file)
@@ -1,3 +1,13 @@
+//-----------------------------------------------------------------------------
+// Copyright (C) 2010 iZsh <izsh at fail0verflow.com>
+//
+// This code is licensed to you under the terms of the GNU GPL, version 2 or,
+// at your option, any later version. See the LICENSE.txt file for the text of
+// the license.
+//-----------------------------------------------------------------------------
+// Hardware commands
+//-----------------------------------------------------------------------------
+
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
index 3a85bc73130b3863da62d5d5ce844bf49e746540..b8e10f748d5bcb97257c110263b6f02266971540 100644 (file)
@@ -1,3 +1,13 @@
+//-----------------------------------------------------------------------------
+// Copyright (C) 2010 iZsh <izsh at fail0verflow.com>
+//
+// This code is licensed to you under the terms of the GNU GPL, version 2 or,
+// at your option, any later version. See the LICENSE.txt file for the text of
+// the license.
+//-----------------------------------------------------------------------------
+// Hardware commands
+//-----------------------------------------------------------------------------
+
 #ifndef CMDHW_H__
 #define CMDHW_H__
 
index ceb84e3ebec4ee608920de04b867863ba5eb39db..7b87c70fbfcfc87f1991163215303b4d9848a5a2 100644 (file)
@@ -1,3 +1,13 @@
+//-----------------------------------------------------------------------------
+// Copyright (C) 2010 iZsh <izsh at fail0verflow.com>
+//
+// This code is licensed to you under the terms of the GNU GPL, version 2 or,
+// at your option, any later version. See the LICENSE.txt file for the text of
+// the license.
+//-----------------------------------------------------------------------------
+// Low frequency commands
+//-----------------------------------------------------------------------------
+
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
index 4055cf911e463553ce6f3f2ed960c8f597f7bbfc..e1f15d2c81343a5990390272d28e62bcb75c44c3 100644 (file)
@@ -1,3 +1,13 @@
+//-----------------------------------------------------------------------------
+// Copyright (C) 2010 iZsh <izsh at fail0verflow.com>
+//
+// This code is licensed to you under the terms of the GNU GPL, version 2 or,
+// at your option, any later version. See the LICENSE.txt file for the text of
+// the license.
+//-----------------------------------------------------------------------------
+// Low frequency commands
+//-----------------------------------------------------------------------------
+
 #ifndef CMDLF_H__
 #define CMDLF_H__
 
index 9b40d7c05f569b4b254bc94121d8526c42dd75a0..fea4bd2960409118d222f5127a697d1010449b2f 100644 (file)
@@ -1,3 +1,13 @@
+//-----------------------------------------------------------------------------
+// Copyright (C) 2010 iZsh <izsh at fail0verflow.com>
+//
+// This code is licensed to you under the terms of the GNU GPL, version 2 or,
+// at your option, any later version. See the LICENSE.txt file for the text of
+// the license.
+//-----------------------------------------------------------------------------
+// Low frequency EM4x commands
+//-----------------------------------------------------------------------------
+
 #include <stdio.h>
 #include "proxusb.h"
 #include "ui.h"
index 53f3fe813cf261f9e6a83386427aadd0adf6e9f8..dda9d00c807d9a689a2b704ab771f42ad7030219 100644 (file)
@@ -1,3 +1,13 @@
+//-----------------------------------------------------------------------------
+// Copyright (C) 2010 iZsh <izsh at fail0verflow.com>
+//
+// This code is licensed to you under the terms of the GNU GPL, version 2 or,
+// at your option, any later version. See the LICENSE.txt file for the text of
+// the license.
+//-----------------------------------------------------------------------------
+// Low frequency EM4x commands
+//-----------------------------------------------------------------------------
+
 #ifndef CMDLFEM4X_H__
 #define CMDLFEM4X_H__
 
index 744138c09a84e8a6df65f3394dfa88e272eb9c28..344662e1dd23f61609f09676c8b12e7aa675e26e 100644 (file)
@@ -1,3 +1,13 @@
+//-----------------------------------------------------------------------------
+// Copyright (C) 2010 iZsh <izsh at fail0verflow.com>
+//
+// This code is licensed to you under the terms of the GNU GPL, version 2 or,
+// at your option, any later version. See the LICENSE.txt file for the text of
+// the license.
+//-----------------------------------------------------------------------------
+// Low frequency HID commands
+//-----------------------------------------------------------------------------
+
 #include <stdio.h>
 #include "proxusb.h"
 #include "ui.h"
index 7747fd28daec153fe9d33a8d5bf5b72e19a9d6a0..328f3b1326153f22f94dbdb90d64e201ee8d2745 100644 (file)
@@ -1,3 +1,13 @@
+//-----------------------------------------------------------------------------
+// Copyright (C) 2010 iZsh <izsh at fail0verflow.com>
+//
+// This code is licensed to you under the terms of the GNU GPL, version 2 or,
+// at your option, any later version. See the LICENSE.txt file for the text of
+// the license.
+//-----------------------------------------------------------------------------
+// Low frequency HID commands
+//-----------------------------------------------------------------------------
+
 #ifndef CMDLFHID_H__
 #define CMDLFHID_H__
 
index dcb30746caac8bf67659b9dced847d88df4e2c57..59f83f0873de3a01e83a96f5c37ff5027af9594f 100644 (file)
@@ -1,3 +1,13 @@
+//-----------------------------------------------------------------------------
+// Copyright (C) 2010 iZsh <izsh at fail0verflow.com>
+//
+// This code is licensed to you under the terms of the GNU GPL, version 2 or,
+// at your option, any later version. See the LICENSE.txt file for the text of
+// the license.
+//-----------------------------------------------------------------------------
+// Low frequency TI commands
+//-----------------------------------------------------------------------------
+
 #include <stdio.h>
 #include <stdlib.h>
 #include "crc16.h"
index 9554bb1a540a8892c63757d19282daba23ca9861..e4bbc3a0d53aa4478d7536cb71ca7df6d39ecbd2 100644 (file)
@@ -1,3 +1,13 @@
+//-----------------------------------------------------------------------------
+// Copyright (C) 2010 iZsh <izsh at fail0verflow.com>
+//
+// This code is licensed to you under the terms of the GNU GPL, version 2 or,
+// at your option, any later version. See the LICENSE.txt file for the text of
+// the license.
+//-----------------------------------------------------------------------------
+// Low frequency TI commands
+//-----------------------------------------------------------------------------
+
 #ifndef CMDLFTI_H__
 #define CMDLFTI_H__
 
index 5334384fa31827eecee6b8800153028d8d1ec00f..203a250ca7651e108735359f2e55c888ce0a38da 100644 (file)
@@ -1,3 +1,13 @@
+//-----------------------------------------------------------------------------
+// Copyright (C) 2010 iZsh <izsh at fail0verflow.com>
+//
+// This code is licensed to you under the terms of the GNU GPL, version 2 or,
+// at your option, any later version. See the LICENSE.txt file for the text of
+// the license.
+//-----------------------------------------------------------------------------
+// Main command parser entry point
+//-----------------------------------------------------------------------------
+
 #include <stdio.h>
 #include <stdlib.h>
 #include <unistd.h>
index 5a34d17868c434f25460f70154dc43a6dfa60b4d..edd0205f73b9e61de83fd19e26dd08db9c012283 100644 (file)
@@ -1,3 +1,13 @@
+//-----------------------------------------------------------------------------
+// Copyright (C) 2010 iZsh <izsh at fail0verflow.com>
+//
+// This code is licensed to you under the terms of the GNU GPL, version 2 or,
+// at your option, any later version. See the LICENSE.txt file for the text of
+// the license.
+//-----------------------------------------------------------------------------
+// Main command parser entry point
+//-----------------------------------------------------------------------------
+
 #ifndef CMDMAIN_H__
 #define CMDMAIN_H__
 
index 6bb0416467fd6dbf5af760801f555ac40d2205b1..0f97d7feede67730d0b7ea4813972de0fdbc0ed9 100644 (file)
@@ -1,3 +1,13 @@
+//-----------------------------------------------------------------------------
+// Copyright (C) 2010 iZsh <izsh at fail0verflow.com>
+//
+// This code is licensed to you under the terms of the GNU GPL, version 2 or,
+// at your option, any later version. See the LICENSE.txt file for the text of
+// the license.
+//-----------------------------------------------------------------------------
+// Command parser
+//-----------------------------------------------------------------------------
+
 #include <stdio.h>
 #include <string.h>
 #include "ui.h"
index 7d8788900037595dc1cdf639277c7db8dcf50dcb..28c2e66ef6390c840c342a6c45975dbde1b49fc5 100644 (file)
@@ -1,3 +1,13 @@
+//-----------------------------------------------------------------------------
+// Copyright (C) 2010 iZsh <izsh at fail0verflow.com>
+//
+// This code is licensed to you under the terms of the GNU GPL, version 2 or,
+// at your option, any later version. See the LICENSE.txt file for the text of
+// the license.
+//-----------------------------------------------------------------------------
+// Command parser
+//-----------------------------------------------------------------------------
+
 #ifndef CMDPARSER_H__
 #define CMDPARSER_H__ 
 
index 1fc7408ffd84d767b4cbc256e98e5d0d24327301..80374c600b826ef40ff5d3554efb0ef7ff7f8e4a 100644 (file)
@@ -1,3 +1,13 @@
+//-----------------------------------------------------------------------------
+// Copyright (C) 2010 iZsh <izsh at fail0verflow.com>
+//
+// This code is licensed to you under the terms of the GNU GPL, version 2 or,
+// at your option, any later version. See the LICENSE.txt file for the text of
+// the license.
+//-----------------------------------------------------------------------------
+// Data utilities
+//-----------------------------------------------------------------------------
+
 #include <string.h>
 #include <stdint.h>
 #include "data.h"
index e001482d4d5d7bad63876c7aa36bd19a004893f5..b60ec74dd476dc4535d8e180bac0f905bf914493 100644 (file)
@@ -1,3 +1,13 @@
+//-----------------------------------------------------------------------------
+// Copyright (C) 2010 iZsh <izsh at fail0verflow.com>
+//
+// This code is licensed to you under the terms of the GNU GPL, version 2 or,
+// at your option, any later version. See the LICENSE.txt file for the text of
+// the license.
+//-----------------------------------------------------------------------------
+// Data utilities
+//-----------------------------------------------------------------------------
+
 #ifndef DATA_H__
 #define DATA_H__
 
index c489a1372d6fa86c1bdf68648fd1f0954dfb1381..906e0cf4e726b1d4c52369bb84ff26c440758ed1 100644 (file)
@@ -1,3 +1,11 @@
+//-----------------------------------------------------------------------------
+// This code is licensed to you under the terms of the GNU GPL, version 2 or,
+// at your option, any later version. See the LICENSE.txt file for the text of
+// the license.
+//-----------------------------------------------------------------------------
+// ELF header
+//-----------------------------------------------------------------------------
+
 #ifndef __ELF_H__
 #define __ELF_H__
 
index 68d3b097000fb503b24e1377e13bdf12abfe8386..45fa63060bce8eafa0f9740ebc6aa9e92c97c3cc 100644 (file)
@@ -1,3 +1,11 @@
+//-----------------------------------------------------------------------------
+// This code is licensed to you under the terms of the GNU GPL, version 2 or,
+// at your option, any later version. See the LICENSE.txt file for the text of
+// the license.
+//-----------------------------------------------------------------------------
+// Flashing utility functions
+//-----------------------------------------------------------------------------
+
 #include <stdio.h>
 #include <string.h>
 #include <stdlib.h>
index 20090db7c88ae1e008936464ac88f1a827a5b9dc..f468de35419c0142e68b649f2fe720ea818da136 100644 (file)
@@ -1,3 +1,11 @@
+//-----------------------------------------------------------------------------
+// This code is licensed to you under the terms of the GNU GPL, version 2 or,
+// at your option, any later version. See the LICENSE.txt file for the text of
+// the license.
+//-----------------------------------------------------------------------------
+// Flashing utility functions
+//-----------------------------------------------------------------------------
+
 #ifndef __FLASH_H__
 #define __FLASH_H__
 
index 418718dd0cf44767d400b8f2f24fbb60347c5676..0b8a3368e19398f93151808609ea29eb1b5ffc58 100644 (file)
@@ -1,3 +1,11 @@
+//-----------------------------------------------------------------------------
+// This code is licensed to you under the terms of the GNU GPL, version 2 or,
+// at your option, any later version. See the LICENSE.txt file for the text of
+// the license.
+//-----------------------------------------------------------------------------
+// Flashing binary
+//-----------------------------------------------------------------------------
+
 #include <stdio.h>
 #include <stdlib.h>
 #include "sleep.h"
index 4a966676539f2c541cc7a1dd03be1ce6cb929075..541e68f3404a30c98de216c16afc70b7c7da1349 100644 (file)
@@ -1,3 +1,13 @@
+//-----------------------------------------------------------------------------
+// Copyright (C) 2010 iZsh <izsh at fail0verflow.com>
+//
+// This code is licensed to you under the terms of the GNU GPL, version 2 or,
+// at your option, any later version. See the LICENSE.txt file for the text of
+// the license.
+//-----------------------------------------------------------------------------
+// Graph utilities
+//-----------------------------------------------------------------------------
+
 #include <stdio.h>
 #include <string.h>
 #include "ui.h"
index 6704143092775dc9cd925939fe3519e71cbea375..cbe8116149a18342fa782ef058f9a0781ecc05f3 100644 (file)
@@ -1,3 +1,13 @@
+//-----------------------------------------------------------------------------
+// Copyright (C) 2010 iZsh <izsh at fail0verflow.com>
+//
+// This code is licensed to you under the terms of the GNU GPL, version 2 or,
+// at your option, any later version. See the LICENSE.txt file for the text of
+// the license.
+//-----------------------------------------------------------------------------
+// Graph utilities
+//-----------------------------------------------------------------------------
+
 #ifndef GRAPH_H__
 #define GRAPH_H__
 
index 39bcc7561e991fe7bcafec376af97e931b7d311d..2c813002637159c2bcc2f71840d3c37f4fd94aa8 100644 (file)
@@ -1,3 +1,11 @@
+//-----------------------------------------------------------------------------
+// This code is licensed to you under the terms of the GNU GPL, version 2 or,
+// at your option, any later version. See the LICENSE.txt file for the text of
+// the license.
+//-----------------------------------------------------------------------------
+// GUI dummy file
+//-----------------------------------------------------------------------------
+
 #include <stdio.h>
 
 void ShowGraphWindow(void)
index 2858157caf53c28ffe2f9a0ec66f2ac04945c449..fabbd204d20ffc9738a26c017ee62491aa3f5095 100644 (file)
@@ -1,3 +1,11 @@
+//-----------------------------------------------------------------------------
+// This code is licensed to you under the terms of the GNU GPL, version 2 or,
+// at your option, any later version. See the LICENSE.txt file for the text of
+// the license.
+//-----------------------------------------------------------------------------
+// GUI functions
+//-----------------------------------------------------------------------------
+
 #include "proxgui.h"
 #include "proxguiqt.h"
 
index 6989f541807d9299c5873ba540f4d755847f356a..32121e5860c12a972a072b25d4dc22600c42c157 100644 (file)
@@ -1,3 +1,11 @@
+//-----------------------------------------------------------------------------
+// This code is licensed to you under the terms of the GNU GPL, version 2 or,
+// at your option, any later version. See the LICENSE.txt file for the text of
+// the license.
+//-----------------------------------------------------------------------------
+// GUI functions
+//-----------------------------------------------------------------------------
+
 #ifdef __cplusplus
 extern "C" {
 #endif
index 70c64fbdfc869d1736dd1ac2a21389852acdd1dd..f687bdf4a8b641793b6ef2ac99791edcdc287694 100644 (file)
@@ -1,3 +1,11 @@
+//-----------------------------------------------------------------------------
+// This code is licensed to you under the terms of the GNU GPL, version 2 or,
+// at your option, any later version. See the LICENSE.txt file for the text of
+// the license.
+//-----------------------------------------------------------------------------
+// GUI (QT)
+//-----------------------------------------------------------------------------
+
 #include <iostream>
 #include <QPainterPath>
 #include <QBrush>
index 58ff8326b839f889336f1c4be76bbf21af769f38..b76a5ea72c22041ec834bb02c47846a0bc4ff3b5 100644 (file)
@@ -1,3 +1,11 @@
+//-----------------------------------------------------------------------------
+// This code is licensed to you under the terms of the GNU GPL, version 2 or,
+// at your option, any later version. See the LICENSE.txt file for the text of
+// the license.
+//-----------------------------------------------------------------------------
+// GUI (QT)
+//-----------------------------------------------------------------------------
+
 #include <QApplication>
 #include <QPushButton>
 #include <QObject>
index 9873f26a9b246f099f0b3df7eea1ce65ec2c9477..b98afd9a5df7d0950a2740b675d20c5e3d703fdc 100644 (file)
@@ -1,3 +1,13 @@
+//-----------------------------------------------------------------------------
+// Copyright (C) 2010 iZsh <izsh at fail0verflow.com>
+//
+// This code is licensed to you under the terms of the GNU GPL, version 2 or,
+// at your option, any later version. See the LICENSE.txt file for the text of
+// the license.
+//-----------------------------------------------------------------------------
+// Main binary
+//-----------------------------------------------------------------------------
+
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
index 323480ea7e16c9bb4064ef83fc4a6c340c6bd123..d70170ddddd7cd483e39a041469ba939da8f3273 100644 (file)
@@ -1,3 +1,13 @@
+//-----------------------------------------------------------------------------
+// Copyright (C) 2010 iZsh <izsh at fail0verflow.com>
+//
+// This code is licensed to you under the terms of the GNU GPL, version 2 or,
+// at your option, any later version. See the LICENSE.txt file for the text of
+// the license.
+//-----------------------------------------------------------------------------
+// Main binary
+//-----------------------------------------------------------------------------
+
 #ifndef PROXMARK3_H__
 #define PROXMARK3_H__
 
index b71cffc1ed2745509ede3e42eabd43aaaf5490b2..0a50b9910d8f9662b4da94362f21f30aa4d9ae68 100644 (file)
@@ -1,3 +1,13 @@
+//-----------------------------------------------------------------------------
+// Copyright (C) 2010 iZsh <izsh at fail0verflow.com>
+//
+// This code is licensed to you under the terms of the GNU GPL, version 2 or,
+// at your option, any later version. See the LICENSE.txt file for the text of
+// the license.
+//-----------------------------------------------------------------------------
+// USB utilities
+//-----------------------------------------------------------------------------
+
 #include <stdio.h>
 #include <stdlib.h>
 #include <stdbool.h>
index 3842d39f041eff3ce0fecf931f850a87bd16a878..42e6c75d5f83d3ad677110eab917f200a480b6e4 100644 (file)
@@ -1,3 +1,13 @@
+//-----------------------------------------------------------------------------
+// Copyright (C) 2010 iZsh <izsh at fail0verflow.com>
+//
+// This code is licensed to you under the terms of the GNU GPL, version 2 or,
+// at your option, any later version. See the LICENSE.txt file for the text of
+// the license.
+//-----------------------------------------------------------------------------
+// USB utilities
+//-----------------------------------------------------------------------------
+
 #ifndef PROXUSB_H__
 #define PROXUSB_H__
 
index 1ff4e677a3b6771b3dec06dce8671edb629cbba0..81f4e06031943aee3c8de7b131388492d8462f80 100644 (file)
@@ -1,3 +1,13 @@
+//-----------------------------------------------------------------------------
+// Copyright (C) 2010 iZsh <izsh at fail0verflow.com>
+//
+// This code is licensed to you under the terms of the GNU GPL, version 2 or,
+// at your option, any later version. See the LICENSE.txt file for the text of
+// the license.
+//-----------------------------------------------------------------------------
+// platform-independant sleep macros
+//-----------------------------------------------------------------------------
+
 #ifndef SLEEP_H__
 #define SLEEP_H__
 
index 7723a470d8ae088aa9e2036504075ad97297f4e5..ccff8333d66e106afe15f7b0dcdb3eee6f4856af 100644 (file)
@@ -1,3 +1,11 @@
+//-----------------------------------------------------------------------------
+// This code is licensed to you under the terms of the GNU GPL, version 2 or,
+// at your option, any later version. See the LICENSE.txt file for the text of
+// the license.
+//-----------------------------------------------------------------------------
+// Snooper binary
+//-----------------------------------------------------------------------------
+
 #include "sleep.h"
 #include "ui.h"
 #include "proxusb.h"
index f0fa8e733ab94ef08e7e3c2d15876fff7e8bbdbe..0b4183dfecfb0e40eb580879cd1bb0504879ce30 100644 (file)
@@ -1,3 +1,13 @@
+//-----------------------------------------------------------------------------
+// Copyright (C) 2010 iZsh <izsh at fail0verflow.com>
+//
+// This code is licensed to you under the terms of the GNU GPL, version 2 or,
+// at your option, any later version. See the LICENSE.txt file for the text of
+// the license.
+//-----------------------------------------------------------------------------
+// UI utilities
+//-----------------------------------------------------------------------------
+
 #include <stdarg.h>
 #include <stdio.h>
 #include <time.h>
index 8d58cf35fec10585b4458ed8273bf7dba5db62c7..383ce83dbc1b04d241184c586633618d156a65d7 100644 (file)
@@ -1,3 +1,13 @@
+//-----------------------------------------------------------------------------
+// Copyright (C) 2010 iZsh <izsh at fail0verflow.com>
+//
+// This code is licensed to you under the terms of the GNU GPL, version 2 or,
+// at your option, any later version. See the LICENSE.txt file for the text of
+// the license.
+//-----------------------------------------------------------------------------
+// UI utilities
+//-----------------------------------------------------------------------------
+
 #ifndef UI_H__
 #define UI_H__
 
diff --git a/client/wingui.c b/client/wingui.c
deleted file mode 100644 (file)
index 9fcf5ea..0000000
+++ /dev/null
@@ -1,536 +0,0 @@
-//-----------------------------------------------------------------------------\r
-// Routines for the user interface when doing interactive things with prox\r
-// cards; this is basically a command line thing, in one window, and then\r
-// another window to do the graphs.\r
-// Jonathan Westhues, Sept 2005\r
-//-----------------------------------------------------------------------------\r
-#include <windows.h>\r
-#include <limits.h>\r
-#include <commctrl.h>\r
-#include <stdlib.h>\r
-#include <stdio.h>\r
-#include <math.h>\r
-\r
-#include "proxusb.h"\r
-#include "graph.h"\r
-#include "ui.h"\r
-#include "cmdmain.h"\r
-\r
-#define oops() do { \\r
-       char line[100]; \\r
-       sprintf(line, "Internal error at line %d file '%s'", __LINE__, \\r
-               __FILE__); \\r
-       MessageBox(NULL, line, "Error", MB_ICONERROR); \\r
-       exit(-1); \\r
-} while(0)\r
-\r
-void dbp(char *str, ...)\r
-{\r
-       va_list f;\r
-       char buf[1024];\r
-       va_start(f, str);\r
-       vsprintf(buf, str, f);\r
-       OutputDebugString(buf);\r
-       OutputDebugString("\n");\r
-}\r
-\r
-int GraphBuffer[MAX_GRAPH_TRACE_LEN];\r
-int GraphTraceLen;\r
-int PlotGridX, PlotGridY;\r
-\r
-HPEN GreyPenLite, GreyPen, GreenPen, WhitePen, YellowPen;\r
-HBRUSH GreenBrush, YellowBrush;\r
-\r
-static int GraphStart = 0;\r
-static double GraphPixelsPerPoint = 1;\r
-\r
-static int CursorAPos;\r
-static int CursorBPos;\r
-double CursorScaleFactor = 1.0;\r
-static HPEN CursorAPen;\r
-static HPEN CursorBPen;\r
-\r
-static HWND CommandWindow;\r
-static HWND GraphWindow;\r
-static HWND ScrollbackEdit;\r
-static HWND CommandEdit;\r
-\r
-#define COMMAND_HISTORY_MAX 16\r
-static char CommandHistory[COMMAND_HISTORY_MAX][256];\r
-static int CommandHistoryPos = -1;\r
-static int CommandHistoryNext;\r
-\r
-static HFONT MyFixedFont;\r
-#define FixedFont(x) SendMessage((x), WM_SETFONT, (WPARAM)MyFixedFont, TRUE)\r
-\r
-void ExecCmd(char *cmd)\r
-{\r
-}\r
-\r
-int CommandFinished;\r
-int offset = 64;\r
-\r
-static void ResizeCommandWindow(void)\r
-{\r
-       int w, h;\r
-       RECT r;\r
-       GetClientRect(CommandWindow, &r);\r
-       w = r.right - r.left;\r
-       h = r.bottom - r.top;\r
-       MoveWindow(ScrollbackEdit, 10, 10, w - 20, h - 50, TRUE);\r
-       MoveWindow(CommandEdit, 10, h - 29, w - 20, 22, TRUE);\r
-}\r
-\r
-void RepaintGraphWindow(void)\r
-{\r
-       InvalidateRect(GraphWindow, NULL, TRUE);\r
-}\r
-\r
-static LRESULT CALLBACK\r
-       CommandWindowProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)\r
-{\r
-       switch (msg) {\r
-               case WM_DESTROY:\r
-               case WM_QUIT:\r
-                       exit(0);\r
-                       return 0;\r
-\r
-               case WM_SIZE:\r
-                       ResizeCommandWindow();\r
-                       return 0;\r
-\r
-               case WM_SETFOCUS:\r
-                       SetFocus(CommandEdit);\r
-                       break;\r
-\r
-               default:\r
-                       return DefWindowProc(hwnd, msg, wParam, lParam);\r
-       }\r
-\r
-       return 1;\r
-}\r
-\r
-static void PaintGraph(HDC hdc)\r
-{\r
-       RECT r;\r
-       HBRUSH brush;\r
-       HPEN pen;\r
-       char str[250];\r
-       int yMin = INT_MAX;\r
-       int yMax = INT_MIN;\r
-       int yMean = 0;\r
-       int startMax = 0;\r
-       int absYMax = 1;\r
-       int n = 0, i = 0;\r
-\r
-       brush = GreenBrush;\r
-       pen = GreenPen;\r
-\r
-       GetClientRect(GraphWindow, &r);\r
-       int zeroHeight = (r.top + r.bottom) >> 1;\r
-\r
-       // plot X and Y grid lines\r
-       if ((PlotGridX > 0) && ((PlotGridX * GraphPixelsPerPoint) > 1)) {\r
-               for(i = offset; i < r.right; i += (int)(PlotGridX * GraphPixelsPerPoint)) {\r
-                       SelectObject(hdc, GreyPenLite);\r
-                       MoveToEx(hdc, r.left + i, r.top, NULL);\r
-                       LineTo(hdc, r.left + i, r.bottom);\r
-               }\r
-  }\r
-\r
-       if ((PlotGridY > 0) && ((PlotGridY * GraphPixelsPerPoint) > 1)){\r
-               for(i = 0; i < ((r.top + r.bottom)>>1); i += (int)(PlotGridY * GraphPixelsPerPoint)) {\r
-                       SelectObject(hdc, GreyPenLite);\r
-                       MoveToEx(hdc, r.left, zeroHeight + i, NULL);\r
-                       LineTo(hdc, r.right, zeroHeight + i);\r
-                       MoveToEx(hdc, r.left, zeroHeight - i, NULL);\r
-                       LineTo(hdc, r.right, zeroHeight - i);\r
-               }\r
-  }\r
-\r
-       // print vertical separator white line on the left of the window\r
-       SelectObject(hdc, WhitePen);\r
-       MoveToEx(hdc, r.left + offset, r.top, NULL);\r
-       LineTo(hdc, r.left + offset, r.bottom);\r
-\r
-       // print horizontal grey zero axis line\r
-       SelectObject(hdc, GreyPen);\r
-       MoveToEx(hdc, r.left, zeroHeight, NULL);\r
-       LineTo(hdc, r.right, zeroHeight);\r
-\r
-       startMax = (GraphTraceLen - (int)((r.right - r.left - offset) / GraphPixelsPerPoint));\r
-       // check boundaries\r
-       if(startMax < 0) startMax = 0;\r
-       if(GraphStart > startMax) GraphStart = startMax;\r
-       if(GraphStart < 0) GraphStart = 0;\r
-\r
-\r
-       SelectObject(hdc, pen);\r
-\r
-       // go over the portion of the graph to be displayed and find the largest\r
-       // absolute value which will be used to auto scale the graph when displayed\r
-       for(i = GraphStart; ; i++) {\r
-               if(i >= GraphTraceLen) {\r
-                       break;\r
-               }\r
-               if(fabs((double)GraphBuffer[i]) > absYMax) {\r
-                       absYMax = (int)fabs((double)GraphBuffer[i]);\r
-               }\r
-               int x = offset + (int)((i - GraphStart)*GraphPixelsPerPoint);\r
-               if(x > r.right) {\r
-                       break;\r
-               }\r
-       }\r
-\r
-       absYMax = (int)(absYMax*1.2 + 1);\r
-       SelectObject(hdc, MyFixedFont);\r
-       SetTextColor(hdc, RGB(255, 255, 255));\r
-       SetBkColor(hdc, RGB(0, 0, 0));\r
-\r
-       // number of points that will be plotted\r
-       double span = (int)((r.right - r.left) / GraphPixelsPerPoint);\r
-\r
-       // one label every offset pixels, let us say\r
-       int labels = (r.right - r.left - offset) / offset;\r
-       if(labels <= 0) labels = 1;\r
-       // round to nearest power of 2\r
-       int pointsPerLabel = (int)(log(span / labels)/log(2.0));\r
-       if(pointsPerLabel <= 0) pointsPerLabel = 1;\r
-       pointsPerLabel = (int)pow(2.0,pointsPerLabel);\r
-\r
-       // go over the graph and plot samples and labels\r
-       for(i = GraphStart; ; i++) {\r
-               if(i >= GraphTraceLen) {\r
-                       break;\r
-               }\r
-               int x = offset + (int)((i - GraphStart)*GraphPixelsPerPoint);\r
-               if(x > r.right + GraphPixelsPerPoint) {\r
-                       break;\r
-               }\r
-\r
-               int y = GraphBuffer[i];\r
-               if(y < yMin) yMin = y;\r
-               if(y > yMax) yMax = y;\r
-               yMean += y;\r
-               n++;\r
-\r
-               y = (y * (r.top - r.bottom) / (2*absYMax)) + zeroHeight;\r
-               if(i == GraphStart) {\r
-                       MoveToEx(hdc, x, y, NULL);\r
-               } else {\r
-                       LineTo(hdc, x, y);\r
-               }\r
-\r
-               if(GraphPixelsPerPoint > 10) {\r
-                       RECT f;\r
-                       f.left = x - 3;\r
-                       f.top = y - 3;\r
-                       f.right = x + 3;\r
-                       f.bottom = y + 3;\r
-                       FillRect(hdc, &f, brush);\r
-               }\r
-\r
-               // plot labels\r
-               if(((i - GraphStart) % pointsPerLabel == 0) && i != GraphStart) {\r
-                       SelectObject(hdc, WhitePen);\r
-                       MoveToEx(hdc, x, zeroHeight - 8, NULL);\r
-                       LineTo(hdc, x, zeroHeight + 8);\r
-\r
-                       sprintf(str, "+%d", i);\r
-                       SIZE size;\r
-                       GetTextExtentPoint32(hdc, str, strlen(str), &size);\r
-                       TextOut(hdc, x - size.cx, zeroHeight + 8, str, strlen(str));\r
-\r
-                       SelectObject(hdc, pen);\r
-                       MoveToEx(hdc, x, y, NULL);\r
-               }\r
-\r
-               // plot measurement cursors\r
-               if(i == CursorAPos || i == CursorBPos) {\r
-                       if(i == CursorAPos) {\r
-                               SelectObject(hdc, CursorAPen);\r
-                       } else {\r
-                               SelectObject(hdc, CursorBPen);\r
-                       }\r
-                       MoveToEx(hdc, x, r.top, NULL);\r
-                       LineTo(hdc, x, r.bottom);\r
-\r
-                       SelectObject(hdc, pen);\r
-                       MoveToEx(hdc, x, y, NULL);\r
-               }\r
-       }\r
-\r
-       if(n != 0) {\r
-               yMean /= n;\r
-       }\r
-\r
-       // print misc information at bottom of graph window\r
-       sprintf(str, "@%d   max=%d min=%d mean=%d n=%d/%d    dt=%d [%.3f] zoom=%.3f CursorA=%d [%d] CursorB=%d [%d]",\r
-               GraphStart, yMax, yMin, yMean, n, GraphTraceLen,\r
-               CursorBPos - CursorAPos, (CursorBPos - CursorAPos)/CursorScaleFactor, GraphPixelsPerPoint,\r
-               CursorAPos, GraphBuffer[CursorAPos], CursorBPos, GraphBuffer[CursorBPos]);\r
-       TextOut(hdc, 50, r.bottom - 20, str, strlen(str));\r
-}\r
-\r
-static LRESULT CALLBACK\r
-       GraphWindowProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)\r
-{\r
-       switch (msg) {\r
-               case WM_DESTROY:\r
-               case WM_QUIT:\r
-                       GraphWindow = NULL;\r
-                       return DefWindowProc(hwnd, msg, wParam, lParam);\r
-\r
-               case WM_SIZE:\r
-                       RepaintGraphWindow();\r
-                       return 0;\r
-\r
-               case WM_PAINT: {\r
-                       PAINTSTRUCT ps;\r
-                       HDC hdc = BeginPaint(hwnd, &ps);\r
-                       if(GraphStart < 0) {\r
-                               GraphStart = 0;\r
-                       }\r
-                       // This draws the trace.\r
-                       PaintGraph(hdc);\r
-                       EndPaint(hwnd, &ps);\r
-                       break;\r
-               }\r
-               case WM_KEYDOWN:\r
-                       switch(wParam) {\r
-                               case VK_DOWN:\r
-                                       if(GraphPixelsPerPoint <= 8) {\r
-                                               GraphPixelsPerPoint *= 2;\r
-                                       }\r
-                                       break;\r
-\r
-                               case VK_UP:\r
-                                       if(GraphPixelsPerPoint >= 0.01) {\r
-                                               GraphPixelsPerPoint /= 2;\r
-                                       }\r
-                                       break;\r
-\r
-                               case VK_RIGHT:\r
-                                       if(GraphPixelsPerPoint < 16) {\r
-                                               GraphStart += (int)(16 / GraphPixelsPerPoint);\r
-                                       } else {\r
-                                               GraphStart++;\r
-                                       }\r
-                                       break;\r
-\r
-                               case VK_LEFT:\r
-                                       if(GraphPixelsPerPoint < 16) {\r
-                                               GraphStart -= (int)(16 / GraphPixelsPerPoint);\r
-                                       } else {\r
-                                               GraphStart--;\r
-                                       }\r
-                                       break;\r
-\r
-                               default:\r
-                                       goto nopaint;\r
-                       }\r
-                       RepaintGraphWindow();\r
-nopaint:\r
-                       break;\r
-\r
-               case WM_LBUTTONDOWN:\r
-               case WM_RBUTTONDOWN: {\r
-                       int x = LOWORD(lParam);\r
-                       x -= offset;\r
-                       x = (int)(x / GraphPixelsPerPoint);\r
-                       x += GraphStart;\r
-\r
-                       if(msg == WM_LBUTTONDOWN) {\r
-                               CursorAPos = x;\r
-                       } else {\r
-                               CursorBPos = x;\r
-                       }\r
-                       RepaintGraphWindow();\r
-                       break;\r
-               }\r
-               default:\r
-                       return DefWindowProc(hwnd, msg, wParam, lParam);\r
-       }\r
-\r
-       return 1;\r
-}\r
-\r
-void PrintAndLog(char *fmt, ...)\r
-{\r
-       va_list f;\r
-       char str[1024];\r
-       strcpy(str, "\r\n");\r
-       va_start(f, fmt);\r
-       vsprintf(str+2, fmt, f);\r
-\r
-       static char TextBuf[1024*32];\r
-       SendMessage(ScrollbackEdit, WM_GETTEXT, (WPARAM)sizeof(TextBuf),\r
-               (LPARAM)TextBuf);\r
-\r
-       if(strlen(TextBuf) + strlen(str) + 1 <= sizeof(TextBuf)) {\r
-               strcat(TextBuf, str);\r
-       } else {\r
-               lstrcpyn(TextBuf, str, sizeof(TextBuf));\r
-       }\r
-\r
-       SendMessage(ScrollbackEdit, WM_SETTEXT, 0, (LPARAM)TextBuf);\r
-       SendMessage(ScrollbackEdit, EM_LINESCROLL, 0, (LPARAM)INT_MAX);\r
-}\r
-\r
-void ShowGraphWindow(void)\r
-{\r
-       if(GraphWindow) return;\r
-\r
-       GraphWindow = CreateWindowEx(0, "Graph", "graphed",\r
-               WS_OVERLAPPED | WS_BORDER | WS_MINIMIZEBOX | WS_SYSMENU |\r
-               WS_SIZEBOX | WS_VISIBLE, 200, 150, 600, 500, NULL, NULL, NULL,\r
-               NULL);\r
-       if(!GraphWindow) oops();\r
-}\r
-\r
-void HideGraphWindow(void)\r
-{\r
-       if(GraphWindow) {\r
-               DestroyWindow(GraphWindow);\r
-               GraphWindow = NULL;\r
-       }\r
-}\r
-\r
-static void SetCommandEditTo(char *str)\r
-{\r
-       SendMessage(CommandEdit, WM_SETTEXT, 0, (LPARAM)str);\r
-       SendMessage(CommandEdit, EM_SETSEL, strlen(str), strlen(str));\r
-}\r
-\r
-void ShowGui()\r
-{\r
-       WNDCLASSEX wc;\r
-       memset(&wc, 0, sizeof(wc));\r
-       wc.cbSize = sizeof(wc);\r
-\r
-       wc.style                        = CS_BYTEALIGNCLIENT | CS_BYTEALIGNWINDOW | CS_OWNDC;\r
-       wc.lpfnWndProc          = (WNDPROC)CommandWindowProc;\r
-       wc.hInstance            = NULL;\r
-       wc.hbrBackground        = (HBRUSH)(COLOR_BTNSHADOW);\r
-       wc.lpszClassName        = "Command";\r
-       wc.lpszMenuName         = NULL;\r
-       wc.hCursor                      = LoadCursor(NULL, IDC_ARROW);\r
-\r
-       if(!RegisterClassEx(&wc)) oops();\r
-\r
-       wc.lpszClassName        = "Graph";\r
-       wc.lpfnWndProc          = (WNDPROC)GraphWindowProc;\r
-       wc.hbrBackground        = (HBRUSH)GetStockObject(BLACK_BRUSH);\r
-\r
-       if(!RegisterClassEx(&wc)) oops();\r
-\r
-       CommandWindow = CreateWindowEx(0, "Command", "prox",\r
-               WS_OVERLAPPED | WS_BORDER | WS_MINIMIZEBOX | WS_SYSMENU |\r
-               WS_SIZEBOX | WS_VISIBLE, 20, 20, 500, 400, NULL, NULL, NULL,\r
-               NULL);\r
-       if(!CommandWindow) oops();\r
-\r
-       ScrollbackEdit = CreateWindowEx(WS_EX_CLIENTEDGE, "edit", "",\r
-               WS_CHILD | WS_CLIPSIBLINGS | WS_VISIBLE | ES_MULTILINE |\r
-               ES_AUTOVSCROLL | WS_VSCROLL, 0, 0, 0, 0, CommandWindow, NULL,\r
-               NULL, NULL);\r
-\r
-       CommandEdit = CreateWindowEx(WS_EX_CLIENTEDGE, "edit", "",\r
-               WS_CHILD | WS_CLIPSIBLINGS | WS_TABSTOP | WS_VISIBLE |\r
-               ES_AUTOHSCROLL, 0, 0, 0, 0, CommandWindow, NULL, NULL, NULL);\r
-\r
-       MyFixedFont = CreateFont(14, 0, 0, 0, FW_REGULAR, FALSE, FALSE, FALSE,\r
-               ANSI_CHARSET, OUT_DEFAULT_PRECIS, CLIP_DEFAULT_PRECIS, DEFAULT_QUALITY,\r
-               FF_DONTCARE, "Lucida Console");\r
-       if(!MyFixedFont)\r
-               MyFixedFont = (HFONT)GetStockObject(SYSTEM_FONT);\r
-\r
-       FixedFont(ScrollbackEdit);\r
-       FixedFont(CommandEdit);\r
-\r
-       ResizeCommandWindow();\r
-       SetFocus(CommandEdit);\r
-\r
-       PrintAndLog(">> Started prox, built " __DATE__ " " __TIME__);\r
-       PrintAndLog(">> Connected to device");\r
-\r
-       GreyPenLite = CreatePen(PS_SOLID, 1, RGB(50, 50, 50));\r
-       GreyPen = CreatePen(PS_SOLID, 1, RGB(100, 100, 100));\r
-       GreenPen = CreatePen(PS_SOLID, 1, RGB(100, 255, 100));\r
-       YellowPen = CreatePen(PS_SOLID, 1, RGB(255, 255, 0));\r
-       GreenBrush = CreateSolidBrush(RGB(100, 255, 100));\r
-       YellowBrush = CreateSolidBrush(RGB(255, 255, 0));\r
-       WhitePen = CreatePen(PS_SOLID, 1, RGB(255, 255, 255));\r
-\r
-       CursorAPen = CreatePen(PS_DASH, 1, RGB(255, 255, 0));\r
-       CursorBPen = CreatePen(PS_DASH, 1, RGB(255, 0, 255));\r
-\r
-       MSG msg;\r
-       for(;;) {\r
-               if(PeekMessage(&msg, NULL, 0, 0, PM_REMOVE)) {\r
-                       if(msg.message == WM_KEYDOWN && msg.wParam == VK_RETURN) {\r
-                               char got[1024];\r
-                               SendMessage(CommandEdit, WM_GETTEXT, (WPARAM)sizeof(got),\r
-                                       (LPARAM)got);\r
-\r
-                               if(strcmp(got, "cls")==0) {\r
-                                       SendMessage(ScrollbackEdit, WM_SETTEXT, 0, (LPARAM)"");\r
-                               } else {\r
-                                       CommandReceived(got);\r
-                               }\r
-                               SendMessage(CommandEdit, WM_SETTEXT, 0, (LPARAM)"");\r
-\r
-                               // Insert it into the command history, unless it is\r
-                               // identical to the previous command in the history.\r
-                               int prev = CommandHistoryNext - 1;\r
-                               if(prev < 0) prev += COMMAND_HISTORY_MAX;\r
-                               if(strcmp(CommandHistory[prev], got) != 0) {\r
-                                       strcpy(CommandHistory[CommandHistoryNext], got);\r
-                                       CommandHistoryNext++;\r
-                                       if(CommandHistoryNext == COMMAND_HISTORY_MAX) {\r
-                                               CommandHistoryNext = 0;\r
-                                       }\r
-                               }\r
-                               CommandHistoryPos = -1;\r
-                       } else if(msg.message == WM_KEYDOWN && msg.wParam == VK_UP &&\r
-                               msg.hwnd == CommandEdit)\r
-                       {\r
-                               if(CommandHistoryPos == -1) {\r
-                                       CommandHistoryPos = CommandHistoryNext;\r
-                               }\r
-                               CommandHistoryPos--;\r
-                               if(CommandHistoryPos < 0) {\r
-                                       CommandHistoryPos = COMMAND_HISTORY_MAX-1;\r
-                               }\r
-                               SetCommandEditTo(CommandHistory[CommandHistoryPos]);\r
-                       } else if(msg.message == WM_KEYDOWN && msg.wParam == VK_DOWN &&\r
-                               msg.hwnd == CommandEdit)\r
-                       {\r
-                               CommandHistoryPos++;\r
-                               if(CommandHistoryPos >= COMMAND_HISTORY_MAX) {\r
-                                       CommandHistoryPos = 0;\r
-                               }\r
-                               SetCommandEditTo(CommandHistory[CommandHistoryPos]);\r
-                       } else if(msg.message == WM_KEYDOWN && msg.wParam == VK_ESCAPE &&\r
-                               msg.hwnd == CommandEdit)\r
-                       {\r
-                               SendMessage(CommandEdit, WM_SETTEXT, 0, (LPARAM)"");\r
-                       } else {\r
-                               if(msg.message == WM_KEYDOWN) {\r
-                                       CommandHistoryPos = -1;\r
-                               }\r
-                               TranslateMessage(&msg);\r
-                               DispatchMessage(&msg);\r
-                       }\r
-               }\r
-\r
-               if (!offline)\r
-               {\r
-                       UsbCommand c;\r
-                       if(ReceiveCommandPoll(&c))\r
-                               UsbCommandReceived(&c);\r
-               }\r
-\r
-               Sleep(10);\r
-       }\r
-}\r
Impressum, Datenschutz