n = 460657813884289609896372056585544172485318117026246263899744329237492701820627219556007788200590119136173895989001382151536006853823326382892363143604314518686388786002989248800814861248595075326277099645338694977097459168530898776007293695728101976069423971696524237755227187061418202849911479124793990722597 # factorDB p = 15991846970993213322072626901560749932686325766403404864023341810735319249066370916090640926219079368845510444031400322229147771682961132420481897362843199 q = 28805791771260259486856902729020438686670354441296247148207862836064657849735343618207098163901787287368569768472521344635567334299356760080507454640207003 assert p * q == n
# https://github.com/RsaCtfTool/RsaCtfTool/issues/304 e = 354611102441307572056572181827925899198345350228753730931089393275463916544456626894245415096107834465778409532373187125318554614722599301791528916212839368121066035541008808261534500586023652767712271625785204280964688004680328300124849680477105302519377370092578107827116821391826210972320377614967547827619
c = 49204714858589959506425439175649050431712689077552080337419353493097408019421214668787900602380476464749282877075822584378756221224722944848685142270406954588911362016685713099949058708493084032575436033859064998703946175169856560687276793237892152502134788316092552043085946089668969326209343517732349235471
import libnum d = libnum.invmod(e, (p-1)*(q-1)) m = pow(c, d, n) flag = libnum.n2s(m) #print(d) print(flag)
withopen('candump.log', 'r') as file: for line in file: line = line.strip() # 去除行尾的换行符 match = log_pattern.match(line) ifmatch: can_id, data = match.groups() # 只合并非全零的数据帧 ifnotall(c == '0'for c in data): if can_id in can_data: can_data[can_id] += data else: can_data[can_id] = data
# 现在打印输出 for can_id insorted(can_data.keys()): print(f"CAN ID {can_id}: {can_data[can_id]}")
# 读取文件内容 withopen('candump.log', 'r') as file: for line in file: match = log_pattern.search(line.strip()) ifmatch: # 添加匹配的字节(后三个字节数据) matched_bytes.append(match.group(1))