Skip to content

Commit

Permalink
com実装
Browse files Browse the repository at this point in the history
  • Loading branch information
pinfort committed Dec 8, 2018
1 parent 8bbc4a9 commit 38e7fb5
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion main.py
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ def __AnalyzeMarkers(self, bt):
pass
elif bt == self.COM:
# do com
pass
return self.__analyzeCom(body)
elif bt in self.APP:
# do app
return self.__analyzeApp(bt, body)
Expand Down Expand Up @@ -367,6 +367,7 @@ def __analyzeAppNotImplemented(self, bt, body):

def __analyzeSos(self, body):
analyzed = {}
analyzed["segmentName"] = "SOS"
analyzed["ns"] = body[0]
analyzed["cs"] = []
offset = 0
Expand All @@ -385,6 +386,12 @@ def __analyzeSos(self, body):
print(analyzed)
return analyzed

def __analyzeCom(self, body):
analyzed = {}
analyzed["segmentName"] = "COM"
analyzed["comment"] = ''.join([chr(i) for i in body])
return analyzed


if __name__ == "__main__":
# path = "C:\\Users\\pinfo\\Downloads\\DsmAkbxVYAEKktJ_orig.jpg"
Expand Down

0 comments on commit 38e7fb5

Please sign in to comment.