Hello everyone, need some quick assistance.
Having difficulty grabbing these two variables and including them in a post url.
You can see ruby pulls the POST variables as expected (testing using p params or params.to_s)
{“e”=>“77”, “a”=>"", “save”=>“Save Info”}
in my .rb file I have the following:
post ‘/1.php’ do
#puts params.inspect
#p params
#params.to_s
postData = Net::HTTP.post_form(URI.parse(‘[http://XXXXXX.com/1.php](http://xxxxxx.com/1.php)’), {‘save’=>‘Save Info’, ‘e’=>‘params[:e]’, ‘a’=>‘params[:a]’})
puts postData.body
end
Now when I submit my form in the logs i see:
Array
(
[save] => Save Info
[e] => params[:e]
[a] => params[:a]
)
params[:e] info saved!
127.0.0.1 - - [18/Jul/2019:19:55:54 -0400] “POST /1.php HTTP/1.1” 200 - 0.0208
It shows whats in the ‘’ and not the actual variables. Now, I have tried all sorts of different things to pull the params but nothing seems to work. Can somebody tell me how i can pull each variable properly?
Thank you in advance.