mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-24 07:05:40 -07:00
remove special chars...
This commit is contained in:
parent
1ab9d24b5c
commit
67632fdc24
3 changed files with 298 additions and 267 deletions
|
@ -4,6 +4,7 @@
|
||||||
import sys
|
import sys
|
||||||
import pandas as pd
|
import pandas as pd
|
||||||
import requests
|
import requests
|
||||||
|
import re
|
||||||
|
|
||||||
ATR_URL = 'https://www.eftlab.co.uk/knowledge-base/171-atr-list-full/'
|
ATR_URL = 'https://www.eftlab.co.uk/knowledge-base/171-atr-list-full/'
|
||||||
|
|
||||||
|
@ -15,18 +16,43 @@ def print_atr(df):
|
||||||
|
|
||||||
if type(a) is not str or type(b) is not str:
|
if type(a) is not str or type(b) is not str:
|
||||||
continue
|
continue
|
||||||
|
|
||||||
a = a.replace(' ','')
|
a = a.replace(' ','')
|
||||||
|
a = a.replace('…', '..')
|
||||||
|
|
||||||
if (len(a) == 0 or len(b) == 0):
|
if (len(a) == 0 or len(b) == 0):
|
||||||
continue
|
continue
|
||||||
|
|
||||||
b = b.replace('\\', '\\\\').replace('’', '')
|
|
||||||
|
b = b.replace('\\', '\\\\')
|
||||||
|
b = b.replace('’', '\'')
|
||||||
|
b = b.replace('‘', '\'')
|
||||||
|
b = b.replace('“', '\'')
|
||||||
|
b = b.replace('”', '\'')
|
||||||
|
b = b.replace('ó', 'o')
|
||||||
|
b = b.replace('ú', 'u')
|
||||||
|
b = b.replace('–', '-')
|
||||||
|
b = b.replace('—', '-')
|
||||||
|
b = b.replace('€', '')
|
||||||
|
b = b.replace('Č', 'C')
|
||||||
|
b = b.replace('á', 'a')
|
||||||
|
b = b.replace('ř', 'r')
|
||||||
|
b = b.replace('ę', 'e')
|
||||||
|
b = b.replace('ł', 'l')
|
||||||
|
b = b.replace('İ', 'I')
|
||||||
|
b = b.replace('…', '...')
|
||||||
|
|
||||||
|
#b = re.sub('[^A-Za-zs ]+', '', b)
|
||||||
|
|
||||||
print(f' {{ "{a}", "{b}" }},')
|
print(f' {{ "{a}", "{b}" }},')
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
|
|
||||||
|
# making sure we print UTF-8
|
||||||
|
sys.stdout = open(1, 'w', encoding='utf-8', closefd=False)
|
||||||
|
|
||||||
r = requests.get(ATR_URL)
|
r = requests.get(ATR_URL)
|
||||||
r.status_code
|
r.status_code
|
||||||
list_atr = pd.read_html(r.text, header=0, keep_default_na=False)
|
list_atr = pd.read_html(r.text, header=0, keep_default_na=False)
|
||||||
|
|
|
@ -31,6 +31,11 @@ const char *getAtrInfo(const char *atr_str) {
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// iceman: how do your loop handle these?
|
||||||
|
// +++++ +
|
||||||
|
// { "3BFF1100008171404200002101314252000[0,5]63........9000.*", "Smart Card 'The Smart Way to Login' Used on Acer TravelMate to secure boot" },
|
||||||
|
|
||||||
|
|
||||||
for (int j = 0; j < slen; j++) {
|
for (int j = 0; j < slen; j++) {
|
||||||
tmp_atr[j] = AtrTable[i].bytes[j]=='.' ? '.' : atr_str[j];
|
tmp_atr[j] = AtrTable[i].bytes[j]=='.' ? '.' : atr_str[j];
|
||||||
}
|
}
|
||||||
|
|
File diff suppressed because it is too large
Load diff
Loading…
Add table
Add a link
Reference in a new issue