Skip to content

Conversation

n00b-bot
Copy link
Contributor

This commit adds the ReadRaw function to the pkg package. The function reads a raw file and converts it into a []structs.Crawl slice, which represents the crawl data. It parses the raw file line by line, extracting information such as the request method, path, headers, host, and body. The function also determines whether the endpoint should use HTTP or HTTPS based on the httpP flag. The resulting crawl data is returned as a slice.

This function is useful for reading and processing raw files containing HTTP requests, enabling further analysis or manipulation of the data.

This commit adds the `ReadRaw` function to the `pkg` package. The function reads a raw file and converts it into a `[]structs.Crawl` slice, which represents the crawl data. It parses the raw file line by line, extracting information such as the request method, path, headers, host, and body. The function also determines whether the endpoint should use HTTP or HTTPS based on the `httpP` flag. The resulting crawl data is returned as a slice.

This function is useful for reading and processing raw files containing HTTP requests, enabling further analysis or manipulation of the data.
@kmzs kmzs requested a review from m10x December 11, 2023 07:04
@m10x m10x merged commit e67e1b4 into Hackmanit:main Dec 11, 2023
@m10x
Copy link
Collaborator

m10x commented Dec 11, 2023

Thank you for your pull request! The ReadRaw function worked great during our testing and is very useful 😄

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