Skip to content

Conversation

@Beercow
Copy link

@Beercow Beercow commented Oct 22, 2018

Have not tested with multiple triggers or job file that contains User Data. I did not have job files that contained User Data. Will only print the first trigger if present.

jobparser

Added User Data / Reserved data , Triggers, and Job Signature.
Added check for multiple triggers so it doesn't error on signature check.
@Beercow
Copy link
Author

Beercow commented Oct 22, 2018

The lines that are commented out are there for troubleshooting if need be.

self.Minute = struct.unpack("<H", data[14:16])[0]
self.Second = struct.unpack("<H", data[16:18])[0]
self.Milliseconds = struct.unpack("<H", data[18:20])[0]
self.Hour = 00
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why did you make these zero ?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because Schedule Star Date and Schedule End Date Do not contain hours, minuts, second and milliseconds. It was added to keep the formating the same without having to write seperate class to handle those dates.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What you have listed as Scheduled Date is actually two dates consisting of year, month, day, year, month, day.
https://msdn.microsoft.com/en-us/library/cc248290.aspx

lines.append("Trigger Type: {0}\n".format(ttype.rstrip(", ")))
if self.TriggerSpecific != "":
lines.append("{0}".format(self.TriggerSpecific))
# lines.append("Padding: {0}".format(self.Padding))
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you remove any comment out code ? Or is there a reason to keep it ?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code removed.

lines += "User: {0}\n".format(self.User)
lines += "Comment: {0}\n".format(self.Comment)
lines += "Scheduled Date: {0}\n".format(self.ScheduledDate)
# lines += "User Data Size: {0}\n".format(self.UserDataSize)
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Might as well remove commented out code if not needed.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code removed.

Removed commented out code.
@Beercow
Copy link
Author

Beercow commented Mar 22, 2019

Just curious about an update on this.

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

Successfully merging this pull request may close these issues.

2 participants