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

Issue when running recon on mac addresses #1

Open
TotallyNotAHaxxer opened this issue Sep 15, 2023 · 0 comments
Open

Issue when running recon on mac addresses #1

TotallyNotAHaxxer opened this issue Sep 15, 2023 · 0 comments

Comments

@TotallyNotAHaxxer
Copy link

When running option 1 on the recon section in the tool, I got the following error when I selected a captured MAC.

SCANNING MAC ADDRESS...
Traceback (most recent call last):
  File "/home/totallynotahaxxer/netspionage/netspionage.py", line 6, in <module>
    from core import prompts
  File "/home/totallynotahaxxer/netspionage/core/__init__.py", line 1, in <module>
    from .prompts import *
  File "/home/totallynotahaxxer/netspionage/core/prompts.py", line 106, in <module>
    prompt_display()
  File "/home/totallynotahaxxer/netspionage/core/prompts.py", line 84, in prompt_display
    recon_choice(resp, target, manual_input)
  File "/home/totallynotahaxxer/netspionage/core/reconnaissance.py", line 11, in recon_choice
    choose_mac_address(target)
  File "/home/totallynotahaxxer/netspionage/core/reconnaissance.py", line 20, in choose_mac_address
    scan_addresses(target)
  File "/home/totallynotahaxxer/netspionage/core/reconnaissance.py", line 61, in scan_addresses
    display_picker(entries)
  File "/home/totallynotahaxxer/netspionage/core/reconnaissance.py", line 83, in display_picker
    address_api_call(option, element_entries[index]['ip'])
  File "/home/totallynotahaxxer/netspionage/core/reconnaissance.py", line 33, in address_api_call
    result=response.json()
  File "/usr/lib/python3/dist-packages/requests/models.py", line 900, in json
    return complexjson.loads(self.text, **kwargs)
  File "/usr/lib/python3/dist-packages/simplejson/__init__.py", line 525, in loads
    return _default_decoder.decode(s)
  File "/usr/lib/python3/dist-packages/simplejson/decoder.py", line 370, in decode
    obj, end = self.raw_decode(s)
  File "/usr/lib/python3/dist-packages/simplejson/decoder.py", line 400, in raw_decode
    return self.scan_once(s, idx=_w(s, idx).end())
simplejson.errors.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

I am assuming this is a decoding error from the API that is used on the backend which is called from one of the scanning functions.

def address_api_call(address, ip_address):
    print_output('\n SCANNING MAC ADDRESS...')
    url = ("https://macvendors.co/api/" + address)
    response=requests.get(url)
    result=response.json()
    if result["result"]:
        json_object=result['result']
        if "error" in json_object:
            print_output("\n No MAC Address Found!")
            return()
        transcribe_api_results(json_object, ip_address)
    else:
        print_output("\n ERROR: Something Went Wrong")
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

No branches or pull requests

1 participant