From cb55e256e3400554407377106f28bda28f204d49 Mon Sep 17 00:00:00 2001 From: Gator96100 Date: Mon, 31 Aug 2020 14:41:40 +0200 Subject: [PATCH 1/2] Registry entries are not needed when calling SetConsoleMode --- client/src/proxmark3.c | 51 +----------------------------------------- 1 file changed, 1 insertion(+), 50 deletions(-) diff --git a/client/src/proxmark3.c b/client/src/proxmark3.c index ba2c00de1..1358137bf 100644 --- a/client/src/proxmark3.c +++ b/client/src/proxmark3.c @@ -678,55 +678,8 @@ finish2: return ret; } -// Check if windows AnsiColor Support is enabled in the registery -// [HKEY_CURRENT_USER\Console] -// "VirtualTerminalLevel"=dword:00000001 -// 2nd Key needs to be enabled... This key takes the console out of legacy mode. -// [HKEY_CURRENT_USER\Console] -// "ForceV2"=dword:00000001 - #if defined(_WIN32) static bool DetectWindowsAnsiSupport(void) { - HKEY hKey = NULL; - bool virtualTerminalLevelSet = false; - bool forceV2Set = false; - - if (RegOpenKeyA(HKEY_CURRENT_USER, "Console", &hKey) == ERROR_SUCCESS) { - DWORD dwType = REG_SZ; - BYTE KeyValue[sizeof(dwType)]; - DWORD len = sizeof(KeyValue); - - if (RegQueryValueEx(hKey, "VirtualTerminalLevel", NULL, &dwType, KeyValue, &len) != ERROR_FILE_NOT_FOUND) { - uint8_t i; - uint32_t Data = 0; - for (i = 0; i < 4; i++) - Data += KeyValue[i] << (8 * i); - - if (Data == 1) { // Reg key is set to 1, Ansi Color Enabled - virtualTerminalLevelSet = true; - } - } - RegCloseKey(hKey); - } - - if (RegOpenKeyA(HKEY_CURRENT_USER, "Console", &hKey) == ERROR_SUCCESS) { - DWORD dwType = REG_SZ; - BYTE KeyValue[sizeof(dwType)]; - DWORD len = sizeof(KeyValue); - - if (RegQueryValueEx(hKey, "ForceV2", NULL, &dwType, KeyValue, &len) != ERROR_FILE_NOT_FOUND) { - uint8_t i; - uint32_t Data = 0; - for (i = 0; i < 4; i++) - Data += KeyValue[i] << (8 * i); - - if (Data == 1) { // Reg key is set to 1, Not using legacy Mode. - forceV2Set = true; - } - } - RegCloseKey(hKey); - } - #ifndef ENABLE_VIRTUAL_TERMINAL_PROCESSING #define ENABLE_VIRTUAL_TERMINAL_PROCESSING 0x0004 #endif @@ -735,10 +688,8 @@ static bool DetectWindowsAnsiSupport(void) { DWORD dwMode = 0; GetConsoleMode(hOut, &dwMode); dwMode |= ENABLE_VIRTUAL_TERMINAL_PROCESSING; - SetConsoleMode(hOut, dwMode); - // If both VirtualTerminalLevel and ForceV2 is set, AnsiColor should work - return virtualTerminalLevelSet && forceV2Set; + return SetConsoleMode(hOut, dwMode) ? true : false; } #endif From ba884b37ab85cbe7757f17d72ce4521cc8219466 Mon Sep 17 00:00:00 2001 From: Philippe Teuwen Date: Mon, 31 Aug 2020 20:19:46 +0200 Subject: [PATCH 2/2] few changes on checklist template --- .../ISSUE_TEMPLATE/checklist-for-release.md | 59 +++++++++---------- 1 file changed, 29 insertions(+), 30 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/checklist-for-release.md b/.github/ISSUE_TEMPLATE/checklist-for-release.md index bb43dbcc5..aae8ab053 100644 --- a/.github/ISSUE_TEMPLATE/checklist-for-release.md +++ b/.github/ISSUE_TEMPLATE/checklist-for-release.md @@ -1,48 +1,47 @@ --- name: Checklist for release -about: A template when making a release -title: "[RELEASE]" +about: A template when making a release (usage reserved to repo maintainers) +title: "[RELEASE 4.x] Checklist" labels: Release assignees: doegox, iceman1001 --- -Checklist +# Checklist - [ ] CHANGELOG.md - [ ] `make style` -- [ ] `make clean; make -j; ./pm3tests` -- [ ] `( cd client;mkdir build;cd build;cmake ..;make -j ); PM3BIN=./client/build/proxmark3 ./pm3test.sh client` -- [ ] `make clean; make client CC=clang CXX=clang++ LD=clang++` +- [ ] `make clean; make client CC=clang CXX=clang++ LD=clang++` on recent Debian or Ubuntu - [ ] `mymanualchecks.sh` - [ ] `mycppcheck.sh` no alarming warning? - [ ] `mymakeclang.sh` no alarming error/warning ? - [ ] `mystandalone_makes.sh` compile all standalone modes (linux only) - [ ] [Travis](https://travis-ci.org/github/RfidResearchGroup/proxmark3/builds) green (linux noqt / osx+qt ; with makefile (w/wo bt) / with cmake) - [ ] [Appveyor](https://ci.appveyor.com/project/RfidResearchGroup/proxmark3/history) green (PS) -- [ ] WSL + +# OS compilation and tests + +```bash +make clean && make -j PLATFORM=PM3OTHER && tools/pm3test.sh +make clean && make -j PLATFORM=PM3RDV4 && tools/pm3test.sh +make clean && make -j PLATFORM=PM3RDV4 PLATFORM_EXTRAS=BTADDON && tools/pm3test.sh +make install; pushd /tmp; proxmark3 -c 'data load em4x05.pm3;lf search 1'; popd; make uninstall + +( cd client; rm -rf build; mkdir build;cd build;cmake .. && make -j PLATFORM=PM3OTHER && PM3BIN=./proxmark3 ../../tools/pm3test.sh client ) +( cd client; rm -rf build; mkdir build;cd build;cmake .. && make -j PLATFORM=PM3RDV4 && PM3BIN=./proxmark3 ../../tools/pm3test.sh client ) +( cd client; rm -rf build; mkdir build;cd build;cmake .. && make -j PLATFORM=PM3RDV4 PLATFORM_EXTRAS=BTADDON && PM3BIN=./proxmark3 ../../tools/pm3test.sh client ) +``` + - [ ] RPI Zero +- [ ] WSL +- [ ] PSv3.3 +- [ ] Kali +- [ ] Debian +- [ ] Ubuntu20 +- [ ] ParrotOS +- [ ] Fedora +- [ ] OpenSuse +- [ ] OSX +- [ ] Android +- [ ] Termux - - - -``` -#!/usr/bin/env bash - -make clean; make -j PLATFORM=PM3OTHER; ./pm3test.sh -make clean; make -j PLATFORM=PM3RDV4; ./pm3test.sh -make clean; make -j PLATFORM=PM3RDV4 PLATFORM_EXTRAS=BTADDON; ./pm3test.sh - -( cd client; rm -rf build; mkdir build;cd build;cmake ..;make -j PLATFORM=PM3OTHER ); PM3BIN=./client/build/proxmark3 ./pm3test.sh client -( cd client; rm -rf build; mkdir build;cd build;cmake ..;make -j PLATFORM=PM3RDV4 ); PM3BIN=./client/build/proxmark3 ./pm3test.sh client -( cd client; rm -rf build; mkdir build;cd build;cmake ..;make -j PLATFORM=PM3RDV4 PLATFORM_EXTRAS=BTADDON ); PM3BIN=./client/build/proxmark3 ./tools/pm3test.sh client -``` - -Also test on Debian10 / Ubuntu19.10 -```make clean; make client CC=clang CXX=clang++ LD=clang++``` - -``` -- [ ] make PLATFORM=PM3OTHER -- [ ] make PLATFORM=PM3RDV4 -- [ ] make PLATFORM=PM3RDV4 PLATFORM_EXTRAS=BTADDON -```