Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a /network/http route #115

Merged
merged 1 commit into from
Jul 2, 2024
Merged

Conversation

AI-Mozi
Copy link
Member

@AI-Mozi AI-Mozi commented May 8, 2024

#94

Copy link
Member

@postmodern postmodern left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Submitted some comments. Looks good!

app.rb Outdated Show resolved Hide resolved
lib/ronin/app/validations/http_params.rb Show resolved Hide resolved
lib/ronin/app/validations/http_params.rb Outdated Show resolved Hide resolved
lib/ronin/app/validations/http_params.rb Show resolved Hide resolved
views/network/http.erb Show resolved Hide resolved
@AI-Mozi AI-Mozi force-pushed the add_network_http branch 2 times, most recently from c629825 to 8e5eb70 Compare May 9, 2024 14:03
Copy link
Member

@postmodern postmodern left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some of the SSL form options either need params[:ssl]&.dig(...) or we could assign ssl_params = params.fetch(:ssl,{}) in the route and use ssl_params[...] in the form.

@AI-Mozi AI-Mozi marked this pull request as ready for review May 29, 2024 09:42
@postmodern postmodern merged commit c726693 into ronin-rb:main Jul 2, 2024
4 checks passed
Headers = Types::Hash.constructor do |input, type|
if input.is_a?(String)
input.split(',').each_with_object({}) do |header, memory|
key, value = header.split(':', 2)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm, I may have merged a little too quickly. I think this code is slightly incorrect. It should parse the String by each line, then split the line by /:\s*/, then possibly check if the value part contains , to split the value by , .

We also probably want to support repeated multiple headers:

X-Foo: value1
X-Foo: value2
X-Bar: value3
{"X-Foo"=>["value1","value2"], "X-Bar"=>"value3"}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants