白帽子

c9a9298c 白帽子 pRqBriWgNGG 2010-12-18 11:33
#!/usr/bin/python
# coding:utf-8
''' shinGETsu sign generator'''
from __future__ import print_function
import sys
import getpass
try:
    import apollo
except ImportError:
    print('This script needed to run as same directory as apollo.py and compatible.py.')
    sys.exit(-2)


def gen_sgsign(sgpasswd):
    return apollo.cut_key(apollo.key_pair(sgpasswd)[0])


def main():
    print('This script will generate your shinGETsu signature.', end='\n\n')
    print('Please enter password that you want to use in shinGETsu.')
    print('''Attention: You must not type non-ASCII charactor,
           then you cannot get correct sign!''')
    while True:
        try:
            sgpasswd = getpass.getpass()
        except EOFError:
            print('\nquit')
            return 1
        sgpasswd = sgpasswd.strip('\n')
        if sgpasswd:
            break
        print('You must enter some charactors.')

    print('your shinGETsu sign: ', end='')
    print(gen_sgsign(sgpasswd))
    return 0


if __name__=='__main__':
    sys.exit(main())

↑をファイルに保存して、apollo.pyとcompatible.pyをsaku/shingetsu/から、
このスクリプトがある場所にコピーしてください。
これ署名破りに悪用されそうだな。

Top of this page. | <<last 0 1 2 3 4 5 6

limit: 15360KB

(白帽子/663/0.5MB)

Powered by shinGETsu.