muccc / iridium-toolkit

A set of tools to parse Iridium frames
483 stars 112 forks source link

--interesting breaks with some message types #81

Closed muaddib1984 closed 2 years ago

muaddib1984 commented 2 years ago

On the parsing side, I'm also experimenting with --interesting and getting this error

  File "/home/user/iridium-toolkit/iridium-parser.py", line 407, in <module>
    do_input(input)
  File "/home/user/iridium-toolkit/iridium-parser.py", line 291, in do_input
    perline(bitsparser.Message(line.strip()).upgrade())
  File "/home/user/iridium-toolkit/iridium-parser.py", line 361, in perline
    print(q.pretty())
  File "/home/user/iridium-toolkit/bitsparser.py", line 1009, in pretty
    s+= " ["+" ".join(["%s"%x for x in self.descrambled])+"]"
AttributeError: 'IridiumIPMessage' object has no attribute 'descrambled'

this happens with a few other message types. if the line here is changed to this: if type(q).__name__ == "IridiumMessage" or type(q).__name__ == "IridiumECCMessage" or type(q).__name__ == "IridiumBCMessage" or type(q).__name__ == "Message" or type(q).__name__ == "IridiumSYMessage" or type(q).__name__ == "IridiumMSMessage" or type(q).__name__ == "IridiumIPMessage" or type(q).__name__ == "IridiumLCWMessage" or type(q).__name__ == "IridiumLCW3Message" or q.error:

It doesn't give anymore errors for my particular file. Is that the correct change?

Can you elaborate on what --interesting is doing? I'm going through the source now and re-watching the HOPE talk. just want to get a feel for it's relevance.

Sec42 commented 2 years ago

--intresting is just a filter that prints a subset of iridium packets that I (at that time) deemed interesting. You can see the classes in that it selects in that if statement. I'll take a look and fix it later :-)

Sec42 commented 2 years ago

Looking at it some more, i don't really remember what that mode was useful for. Your fix is as good as any. I think I'll just remove this mode.

muaddib1984 commented 2 years ago

But by removing --interesting won't that possibly make iridium-toolkit less interesting :)