Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added User Data / Reserved data , Triggers, and Job Signature. #2

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

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.

@@ -267,7 +459,42 @@ def __repr__(self):
lines += "Working Directory: {0}\n".format(self.WorkingDirectory)
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