Bitcoin Forum

Other => Archival => Topic started by: DannyHamilton on December 29, 2014, 11:44:49 PM



Title: Need perl program written [CLOSED]
Post by: DannyHamilton on December 29, 2014, 11:44:49 PM
I need a perl script written quickly (preferably completed within 12 hours of my creating this post) and don't have the time to do it myself.  I suspect that any perl programmer with experience using pack and unpack as well as date manipulation will be able to create this in less than an hour.  Please contact me with an offer of how much you'd like to be paid to complete this task, and how soon you can provide the code.

When calling the perl script, it will be provided on the command line with a fully qualified path and filename.

The filename will be a 258 byte file of binary data.

The script will need to use the current system date to compute the date of the first day of the previous month. For description purposes, I'll call this startDate. (As an example, if the script were run today then the startDate would be November 1, 2014)

The script will need to use the current system date to compute the date of the last day of the previous month. For description purposes, I'll call this endDate. (As an example, if the script were run today then the endDate would be November 30, 2014)

The script will need to convert the startDate into an integer representing the number of days since December 31, 1979 (so January 1, 1980 would be an integer value of 1, and today December 30, 2014 would be an integer value of 12783). For description purposes, I'll call this intStartDate

The script will need to convert the endDate into an integer representing the number of days since December 31, 1979 (so January 1, 1980 would be an integer value of 1, and today December 30, 2014 would be an integer value of 12783). For description purposes, I'll call this intEndDate

The script will need to replace bytes 104 through 111 with the ascii representation of the startDate in the format of MM/DD/YY

The script will need to replace bytes 113 through 120 with the ascii representation of the endDate in the format of MM/DD/YY

The script will need to replace bytes 153 and 154 with the 2 byte integer value of intStartDate (in the case of a startDate of 2014-11-01 byte 153 would be 0xB4 and byte 154 would be 0x31)

The script will need to replace bytes 155 and 156 with the 2 byte integer value of intEndDate (in the case of an endDate of 2014-11-30 byte 155 would be 0xD1 and byte 156 would be 0x31)


Title: Re: Need perl program written.
Post by: lyth0s on December 30, 2014, 02:17:21 AM
Would you mind sharing the purpose of this?


Title: Re: Need perl program written.
Post by: DannyHamilton on December 30, 2014, 02:40:55 AM
Would you mind sharing the purpose of this?

I need to repeatedly modify the date stamp in two locations in two formats in a 258 byte file on a regular basis.


Title: Re: Need perl program written [CLOSED]
Post by: DannyHamilton on December 30, 2014, 05:53:30 AM
I managed to find the time to write the script myself this evening.  I no longer need someone to do this for me.  Locking topic.