Python Issue

the_Grinchthe_Grinch Member Posts: 4,165 ■■■■■■■■■■
We are doing some open source information gathering and wanted to automate the process. I found the script below and it worked without issue yesterday. I go to run it today and am getting the following error:

https://github.com/milo2012/osintstalker/blob/master/fbstalker1.py

[*] Caching Pages Liked By:
Traceback (most recent call last):
File "FBStalker.py", line 2030, in
options(sys.argv)
File "FBStalker.py", line 1974, in options
mainProcess(user)
File "FBStalker.py", line 1790, in mainProcess
dataList = parsePagesLiked(html)
File "FBStalker.py", line 1146, in parsePagesLiked
pageCategory[count]
IndexError: list index out of range

For the life of me I cannot figure out what the issue is.
WIP:
PHP
Kotlin
Intro to Discrete Math
Programming Languages
Work stuff

Comments

  • NotHackingYouNotHackingYou Member Posts: 1,460 ■■■■■■■■□□
    The error indicates to me index out of range for an array. If there are 2 elements in an array, you have element [0] and element [1]. Trying to access index [2] will throw an exception.

    Line 2030 of your code is: options(sys.argv) Are you able to examine the sys.argv object to ensure it contains the data you require? That's probably where I would start.
    When you go the extra mile, there's no traffic.
  • NovaHaxNovaHax Member Posts: 502 ■■■■□□□□□□
    SpiderLabs is awesome!!!
  • the_Grinchthe_Grinch Member Posts: 4,165 ■■■■■■■■■■
    How could I go about examining the sys.argv?
    WIP:
    PHP
    Kotlin
    Intro to Discrete Math
    Programming Languages
    Work stuff
  • the_Grinchthe_Grinch Member Posts: 4,165 ■■■■■■■■■■
    I've taken to writing my own script so I can follow and to pull out the parts that actually matter to me (there's a lot in there I don't need). So far so good! Got it to login to Facebook and do the searches I need. Next will be to scroll through the friends list, then download as html, remove the tags, and then import the data to SQLite :)
    WIP:
    PHP
    Kotlin
    Intro to Discrete Math
    Programming Languages
    Work stuff
  • YFZbluYFZblu Member Posts: 1,462 ■■■■■■■■□□
    the_Grinch wrote: »
    How could I go about examining the sys.argv?

    It's a list.
    for item in sys.argv:
        Print item
    
  • muthupavithranmuthupavithran Registered Users Posts: 1 ■□□□□□□□□□
    hi guys i am muthu i have problem in fbstalker.py Traceback (most recent call last):
    File "fbstalker1.py", line 2030, in <module>
    options(sys.argv)
    File "fbstalker1.py", line 1974, in options
    mainProcess(user)
    File "fbstalker1.py", line 1790, in mainProcess
    dataList = parsePagesLiked(html)
    File "fbstalker1.py", line 1146, in parsePagesLiked
    pageCategory[count]
    IndexError: list index out of range

    tell me how can solve this problem
Sign In or Register to comment.