Bitcoin Forum
April 16, 2024, 10:37:04 AM *
News: Latest Bitcoin Core release: 26.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Need perl program written [CLOSED]  (Read 569 times)
DannyHamilton (OP)
Legendary
*
Offline Offline

Activity: 3360
Merit: 4570



View Profile
December 29, 2014, 11:44:49 PM
Last edit: December 30, 2014, 05:53:02 AM by DannyHamilton
 #1

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)
1713263824
Hero Member
*
Offline Offline

Posts: 1713263824

View Profile Personal Message (Offline)

Ignore
1713263824
Reply with quote  #2

1713263824
Report to moderator
The trust scores you see are subjective; they will change depending on who you have in your trust list.
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1713263824
Hero Member
*
Offline Offline

Posts: 1713263824

View Profile Personal Message (Offline)

Ignore
1713263824
Reply with quote  #2

1713263824
Report to moderator
1713263824
Hero Member
*
Offline Offline

Posts: 1713263824

View Profile Personal Message (Offline)

Ignore
1713263824
Reply with quote  #2

1713263824
Report to moderator
lyth0s
Legendary
*
Offline Offline

Activity: 1260
Merit: 1000


World Class Cryptonaire


View Profile
December 30, 2014, 02:17:21 AM
 #2

Would you mind sharing the purpose of this?

Monero - Truly Anonymous Digital Cash. Bitcoin Reading List 2017
DannyHamilton (OP)
Legendary
*
Offline Offline

Activity: 3360
Merit: 4570



View Profile
December 30, 2014, 02:40:55 AM
 #3

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.
DannyHamilton (OP)
Legendary
*
Offline Offline

Activity: 3360
Merit: 4570



View Profile
December 30, 2014, 05:53:30 AM
 #4

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.
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!