|
[讨论]考研还是就业
有条件就考研,现在本科生太多了~~ |
|
[求助]linux密码存放原理:/etc/shadow
兽人永不为奴 囧,我不知道怎么才能找到我想看的那部分代码[em_85] import hashlib,math def rstr_sha512(text: bytes) -> bytes: sha512 = hashlib.sha512() sha512.update(text) return sha512.digest() def _extend(source: bytes, size_ref: int) -> bytes : extended = b""; for i in range(math.floor(size_ref/64)): extended += source; extended += source[:size_ref % 64] return extended; def _sha512crypt_intermediate(password: bytes,salt: bytes) -> bytes: #digest_a = rstr_sha512(password + salt) digest_b = rstr_sha512(password + salt + password) digest_b_extended = _extend(digest_b,len(password)) intermediate_input = password + salt + digest_b_extended passwd_len = len(password) while passwd_len!=0: if passwd_len&1 == 1: intermediate_input += digest_b else: intermediate_input += password passwd_len >>= 1 return rstr_sha512(intermediate_input) def _sha512crypt(password :bytes,salt :bytes,rounds :int) -> bytes: digest_a = _sha512crypt_intermediate(password, salt) p = _extend(rstr_sha512(password*len(password)),len(password)) s = _extend(rstr_sha512(salt*(16+digest_a[0])),len(salt)) digest = digest_a for i in range(rounds): c_input = b"" if i&1 : c_input += p else: c_input += digest if i % 3: c_input += s if i % 7: c_input += p if i & 1: c_input += digest else: c_input += p digest = rstr_sha512(c_input) return digest def sha512crypt(password :bytes,salt :bytes, rounds=5000) -> str: salt = salt[:16] # max 16 bytes for salt input = _sha512crypt(password, salt, rounds) tab = "./0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz" order = [ 42, 21, 0, 1, 43, 22, 23, 2, 44, 45, 24, 3, 4, 46, 25, 26, 5, 47, 48, 27, 6, 7, 49, 28, 29, 8, 50, 51, 30, 9, 10, 52, 31, 32, 11, 53, 54, 33, 12, 13, 55, 34, 35, 14, 56, 57, 36, 15, 16, 58, 37, 38, 17, 59, 60, 39, 18, 19, 61, 40, 41, 20, 62, 63] output = "" for i in range(0,len(input),3): # special case for the end of the input if i+1 >= len(order): # i == 63 char_1 = input[order[i+0]] & 0b00111111 char_2 = (input[order[i+0]] & 0b11000000) >> 6 output += tab[char_1] + tab[char_2] else: char_1 = input[order[i+0]] & 0b00111111 char_2 = (((input[order[i+0]] & 0b11000000) >> 6) | (input[order[i+1]] & 0b00001111) << 2) char_3 = ( ((input[order[i+1]] & 0b11110000) >> 4) | (input[order[i+2]] & 0b00000011) << 4) char_4 = (input[order[i+2]] & 0b11111100) >> 2 output += tab[char_1] + tab[char_2] + tab[char_3] + tab[char_4] if rounds!=5000: return "$6$rounds={}${}${}".format(rounds,salt.decode("utf-8"),output) else: return "$6${}${}".format(salt.decode("utf-8"),output) if __name__ == "__main__": print(sha512crypt(b"toor",b"wFL5ie31",5000)) https://www.jianshu.com/p/9da78abd6a96 https://samsclass.info/123/proj10/p12-hashcat.htm 原理看这个,不是单轮sha512 |
|
[求助]linux密码存放原理:/etc/shadow
hashcat 开源,直接看源码https://github.com/hashcat/hashcat |
|
[原创]iOS 签名杂谈(二)
NightGuard [em_63] 期待验证结果又仔细想了一下,虽然重新签名之后拥有了keychain的权限,但是因为>keychain-access-groups不一致,所以可能读不到以前的app写入的信息。 |
|
[原创]iOS 签名杂谈(二)
NightGuard 所以自己写一个app,企业签名,也是有办法读取到其他app的keychain信息(以其他开发者id为前缀)的?应该是可以的,找时间可以验证下试试~~ |
|
[原创]iOS 签名杂谈(二)
NightGuard 前排围观 大神能否请教个问题,重新打包签名的ipa,能否保持原有的 ApplicationIdentifierPrefix ? 因为有些app的keychain数据存在 755XXXXXXX.co ...严格说来并不能,前缀是开发者的id。所以创建的keychain前缀信息并不能自己定义。虽然不能创建同样的id,但是对于申请keychain权限的app,通过自己创建的keychain权限可以正常的让应用访问keychian。 |
|
|
|
|
|
[原创]iOS 签名杂谈(一)
LeoW丨 有一个问题想请教一下,我下载过xx助手的包,xx助手下载的包确实是app store的ipa包,有sc_info和iTunesMetadata.plist文件,且能通过数据线安装到手机上,xx助手是如 ...appstore 的包安装流程不会进行授权校验。所以不管是appstore的包,还是企业签名的包都是可以正常安装的。直接调用itunes的接口即可。运行的时候才会校验授权 |
|
|
|
|
|
[讨论] 你买过最实用的智能家居产品是什么?
boradlink 开关、主控+树莓派 |
|
|
|
[原创]单身大龄女青年征婚(4.13更新)
年度热帖,预祝找到如意郎君 |
操作理由
RANk
{{ user_info.golds == '' ? 0 : user_info.golds }}
雪币
{{ experience }}
课程经验
{{ score }}
学习收益
{{study_duration_fmt}}
学习时长
基本信息
荣誉称号:
{{ honorary_title }}
能力排名:
No.{{ rank_num }}
等 级:
LV{{ rank_lv-100 }}
活跃值:
在线值:
浏览人数:{{ visits }}
最近活跃:{{ last_active_time }}
注册时间:{{ user_info.create_date_jsonfmt }}
勋章
兑换勋章
证书
证书查询 >
能力值