1
This is more out of curiosity... I’ve seen some examples of what I want to do, but in Perl. I tried to find a way to do the same in Ruby, but to no avail.
I want a function to generate an MD5 hash from a passed word as argument. The intention is to send this argument to the ruby interpreter, and then use the return in the function. I made a "pseudo-code" to illustrate what I want:
function generate_hash {
# Enviar o argumento para o interpretador e obter o retorno.
ruby "Digest::MD5.hexdigest($1)"
}
Does anyone have any idea how I could make this integration?
This is vulnerable to code injection through the variable
$1
.– Matheus Moreira
Yes, @Matheusmoreira. I did. But like I said, it’s just a curiosity I had. If I were to use that, it would be for very punctual things.
– Pedro Vinícius