pwnwriter / haylxon

⚡ Blazing-fast tool to grab screenshots of your domain list right from terminal.
https://crates.io/crates/hxn
MIT License
380 stars 16 forks source link

Does this run on a Mac? Can I call it from within my Rust program? #109

Closed wbpaley closed 3 days ago

wbpaley commented 6 days ago

Description

Thanks for this! Look forward to getting it working.

I compiled in RustRover & it runs fine, but can't instantiate Brave or Chrome.

Here's a grab from terminal; line 1 gets the error on line 2, line 3 opens Brave successfully so I know the path is correct.

brad@Hutchins debug % ./hxn -b "/Applications/Brave Browser.app" --url https://didi.co
error: Error instantiating browser /Applications/Brave Browser.app
brad@Hutchins debug % /usr/bin/open -a "/Applications/Brave Browser.app" https://didi.co
brad@Hutchins debug %

Am I doing something wrong--or maybe it doesn't run on Macs?

And the end goal: how do I call it from within a Rust program? (I assume I could just cut & paste the contents of main() in main.rs--but is there an API?)

Thanks! Brad

Related Documentation or Links

No response

pwnwriter commented 6 days ago

You should pass the binary path like this below.

Screenshot 2024-07-04 at 10 00 10 Screenshot 2024-07-04 at 10 00 20

And the end goal: how do I call it from within a Rust program?

I'm afraid, this is not possible since haylxon is not a (library) rather an application binary.

wbpaley commented 3 days ago

Thank you!