metacurb / HQT

🏆 A tool built in Node.js to try and help you solve those difficult HQ Trivia questions!
MIT License
5 stars 3 forks source link

Having issues setting it up #1

Closed Ayresia closed 6 years ago

Ayresia commented 6 years ago

Can you help, maybe come on discord and help?

metacurb commented 6 years ago

Hey @Ayresia , could you possibly explain your issue here? That way if others have the same problem, they'll be able to use the answer from here. Thanks!

Ayresia commented 6 years ago

I don't know how to setup this up at all. I don't know how to get the keys and where to put them, can you do an video tutorial or come on share screen discord?

metacurb commented 6 years ago

Before you can use this, you'll need to set up your own Google Custom Search, and a Google Custom Search API Key. That information is found in the readme, and is labelled as "Prerequisites"

All you need to do is go to Google Custom Search, and create your own search engine. Make sure you set it to "Search the entire web but emphasize included sites", so that it searches for everything. Under "Details" your Search Engine ID can be found, where there will be a button that reveals it.

Then, you need to get yourself an API key. via the JSON API. Select or create a project, and generate your key.

Copy both of those int your .env file, like so:

GOOGLE_KEY=YOUR KEY HERE
GOOGLE_ENGINE_ID=YOUR ID HERE
BEARER_TOKEN=YOUR BEARER TOKEN HERE

You'll also need your bearer token, which you will need to intercept from the HQTrivia socket connection.

Ayresia commented 6 years ago

What sites do we have to add?

Sites to add? In The Google Custom Search.

metacurb commented 6 years ago

If you enter any url (eg. github.com) afterward, enter the control panel for your new search and change the "sites to search" option and delete the URL you added.

Ayresia commented 6 years ago

How can i get the bearer key, can i use an emulator inorder to get it?

metacurb commented 6 years ago

You'll need to sniff your network traffic on your mobile device, so that you can intercept data being sent to it. The bearer token is sent from their API once you have opened the app.

Ayresia commented 6 years ago

How can i sniff the network traffic with Android 7.0, i know you have to use charlie but is that possible?

metacurb commented 6 years ago

As far as I'm aware, you won't be able to use Charlie for Android 7+. But please give it a go and report back!

Ayresia commented 6 years ago

What do i have to name the .env and where should i put it

metacurb commented 6 years ago

The file should literally be called .env, and needs to be in the root of your project.

Ayresia commented 6 years ago

There is nothing.

Ayresia commented 6 years ago

image

The touch.env i created it.

metacurb commented 6 years ago

Rename touch.env to .env

Ayresia commented 6 years ago

I cant, i can only rename it to env.env

metacurb commented 6 years ago

In your terminal, type touch .env, which will create the environment variables file. Inside that place your variables and delete your touch.env file.

Ayresia commented 6 years ago

Done.