DataSploit / datasploit

An #OSINT Framework to perform various recon techniques on Companies, People, Phone Number, Bitcoin Addresses, etc., aggregate all the raw data, and give data in multiple formats.
GNU General Public License v3.0
2.97k stars 426 forks source link

Python code issues when scraping Git. #140

Closed Cinnamonstrosity closed 6 years ago

Cinnamonstrosity commented 6 years ago

I've scoured the web for the solution for this issue and for the life of me I can't find the solution. I heavily suspect it's a user issue rather than an issue with your code, but you might be able to point me in the right direction. The following error appears when username0sint runs. It gets to the point where gitscrape.py runs, and then fails with the following error. I'm running python2.7 on Debian inside a Hyper-V instance on my laptop. All pre-requisites were installed, though I had some problems with lxms on install.

Traceback (most recent call last):
  File "datasploit.py", line 55, in <module>
    main(user_input, options.output)
  File "datasploit.py", line 46, in main
    usernameOsint.run(user_input, output)
  File "/etc/datasploit/usernameOsint.py", line 9, in run
    osint_runner.run("username", "username", username, output)
  File "/etc/datasploit/osint_runner.py", line 29, in run
    data = x.main(m_input)
  File "/etc/datasploit/username/username_gitscrape.py", line 62, in main
    repo_list = find_repos(username)
  File "/etc/datasploit/username/username_gitscrape.py", line 37, in find_repos
list_repos.append(repos['full_name'])
TypeError: string indices must be integers
meme-lord commented 6 years ago

Do you have github api keys set in your config?

github_access_token=""

Cinnamonstrosity commented 6 years ago

I didn't think to include the API key for github because the install guide didn't state it as a necessary part of the install / set up. You'd have thought the program would pass if no api key was found, rather than crashing outright. I'll look at getting one and get back to you when I've tested it.

Cinnamonstrosity commented 6 years ago

Adding a Github API key did not solve the problem, the error remains.

meme-lord commented 6 years ago

Yeah I thought the same and I've raised the API key thing in this issue: https://github.com/DataSploit/datasploit/issues/139 , just waiting for a response

Cinnamonstrosity commented 6 years ago

Does your console spit the same error out if you're missing API keys?

Cinnamonstrosity commented 6 years ago

Resolved my own issue, had pasted the key in with a cheeky trailing whitespace afterwards, rendering it an invalid API key. My mistake!