TransWikia.com

can a stdout captured at a parameter to python script

Reverse Engineering Asked by y_man on December 25, 2020

I’m working on a CTF challenge that is find a secret password.This secret password base on the username and password that i input and the hash value had print out after hash calculation and i want to capture this hash value at a parameter to my script to calculate the secret pass
Can someone tell me how can i do it or another solution to solve my problem
Thanks

One Answer

It sounds like you want your python script to read from stdin.

import sys
if not sys.stdin.isatty():
    param = sys.stdin.read()
    print("param",param)

To use it: echo 'param value' | python3 script.py

Answered by pythonpython on December 25, 2020

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP