コード例 #1
0
ファイル: credential.py プロジェクト: yarbs/jackdaw
def potfile_upload():
    disable_usercheck = False
    disable_passwordcheck = False
    file_to_upload = connexion.request.files['file_to_upload']

    db = current_app.db
    creds = JackDawCredentials(None, db_session=db.session)
    gen = HashEntry.from_potfile_stream(file_to_upload.stream)

    creds.add_cracked_passwords_gen(gen, disable_usercheck,
                                    disable_passwordcheck)

    return {}
コード例 #2
0
ファイル: credential.py プロジェクト: zimshk/jackdaw
def passwords_upload(passwords):
	def pwit(passwords):
		for pw in passwords:
			nt_hash = NT(pw).hex()
			print(pw)
			print(nt_hash)
			yield HashEntry(pw, nt_hash=nt_hash)
	
	db = current_app.db
	disable_usercheck = False
	disable_passwordcheck = False

	gen = pwit(passwords)
	creds = JackDawCredentials(None, db_session = db.session)
	creds.add_cracked_passwords_gen(gen, disable_usercheck, disable_passwordcheck)

	return {}
コード例 #3
0
ファイル: credential.py プロジェクト: zimshk/jackdaw
def passwords_upload_file():
	def pwit(fs):
		for line in fs:
			line = line.decode()
			line = line.strip()

			nt_hash = NT(line).hex()
			yield HashEntry(line, nt_hash=nt_hash)
	
	file_to_upload = connexion.request.files['file_to_upload']
	db = current_app.db
	disable_usercheck = False
	disable_passwordcheck = False

	gen = pwit(file_to_upload.stream)
	creds = JackDawCredentials(None, db_session = db.session)
	creds.add_cracked_passwords_gen(gen, disable_usercheck, disable_passwordcheck)

	return {}