Greenwolf / social_mapper

A Social Media Enumeration & Correlation Tool by Jacob Wilkin(Greenwolf)
GNU General Public License v3.0
3.77k stars 785 forks source link

last_name = full_name.split(" ",1)[1] #121

Closed venturaEffect closed 5 years ago

venturaEffect commented 5 years ago

Hi!

Is this a kind of error because of names too long? or why could that be?

~/social_mapper$ python social_mapper.py -f csv -i SN-FB.1-SM.csv -m accurate -ig -tw -li -t strict
Traceback (most recent call last):
  File "social_mapper.py", line 918, in <module>
    last_name = full_name.split(" ",1)[1]
IndexError: list index out of range

Thank you friends.

venturaEffect commented 5 years ago

Can it be maybe because there is more than two words for name? Like Albert Gustav Bramsteidl?

Just a suggestion...

Greenwolf commented 5 years ago

Hi @venturaEffect,

In the case of 3 names it sets last_name to 'Gustav Bramsteidl'. The error here might be that your target only has a 1 word name, so the whole thing is 'Gustav'. Does that line up with your input?

venturaEffect commented 5 years ago

Hi @Greenwolf ,

I've looked on the spreadsheet and there are always minimum two words on name.

Greenwolf commented 5 years ago

Hi @venturaEffect, I would suggest adding a this print statement to the line before the one it crashed on, as its part of a loop. Then when you run it you can see which name caused the crash and we can get to the bottom of this?

So replace line 918: last_name = full_name.split(" ",1)[1]

With this: print(full_name) last_name = full_name.split(" ",1)[1]

venturaEffect commented 5 years ago

Hi @Greenwolf , it prints all of them the 800 names from the list.

Wrote the line of code on social_mapper.py how you told me.

Traceback (most recent call last):
  File "social_mapper.py", line 919, in <module>
    last_name = full_name.split(" ",1)[1]
IndexError: list index out of range

After the whole list it ends with this line.

venturaEffect commented 5 years ago

Sorry TRUE!

There was one name with just one word! The last one....

Greenwolf commented 5 years ago

Ok, but what name is printed just before the error?

venturaEffect commented 5 years ago
~/social_mapper$ python social_mapper.py -f csv -i SNOWPLAN.1.csv -m accurate -ig -tw -t strict

After printing all the main list what seems ok I get this error:

Traceback (most recent call last):
  File "social_mapper.py", line 916, in <module>
    urllib.urlretrieve(person_image, "temp-targets/" + full_name + ".jpg")
  File "/usr/lib/python2.7/urllib.py", line 98, in urlretrieve
    return opener.retrieve(url, filename, reporthook, data)
  File "/usr/lib/python2.7/urllib.py", line 245, in retrieve
    fp = self.open(url, data)
  File "/usr/lib/python2.7/urllib.py", line 213, in open
    return getattr(self, name)(url)
  File "/usr/lib/python2.7/urllib.py", line 469, in open_file
    return self.open_local_file(url)
  File "/usr/lib/python2.7/urllib.py", line 483, in open_local_file
    raise IOError(e.errno, e.strerror, e.filename)
IOError: [Errno 2] No such file or directory: ''

I mean, it seems all ok... the sintaxis, the names, the columns whithout header, the img urls,...

Why could it be? Really appreciate your time @Greenwolf

venturaEffect commented 5 years ago

Ok, but what name is printed just before the error?

Yes. All the list is print. Maybe that is because the one that is just one word is the last name of the list.

Greenwolf commented 5 years ago

I just added a fix for this, so if theres only one name it will set the lastname to an empty string. Hope this sorts it out for you!