Bitcoin Forum
December 12, 2017, 08:47:23 PM *
News: Latest stable version of Bitcoin Core: 0.15.1  [Torrent].
 
   Home   Help Search Donate Login Register  
Pages: [1]
  Print  
Author Topic: Need perl program written [CLOSED]  (Read 507 times)
DannyHamilton
Legendary
*
Online Online

Activity: 2002



View Profile
December 29, 2014, 11:44:49 PM
 #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)

1513111643
Hero Member
*
Offline Offline

Posts: 1513111643

View Profile Personal Message (Offline)

Ignore
1513111643
Reply with quote  #2

1513111643
Report to moderator
1513111643
Hero Member
*
Offline Offline

Posts: 1513111643

View Profile Personal Message (Offline)

Ignore
1513111643
Reply with quote  #2

1513111643
Report to moderator
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction. Advertise here.
1513111643
Hero Member
*
Offline Offline

Posts: 1513111643

View Profile Personal Message (Offline)

Ignore
1513111643
Reply with quote  #2

1513111643
Report to moderator
1513111643
Hero Member
*
Offline Offline

Posts: 1513111643

View Profile Personal Message (Offline)

Ignore
1513111643
Reply with quote  #2

1513111643
Report to moderator
1513111643
Hero Member
*
Offline Offline

Posts: 1513111643

View Profile Personal Message (Offline)

Ignore
1513111643
Reply with quote  #2

1513111643
Report to moderator
lyth0s
Legendary
*
Offline Offline

Activity: 1246


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
Legendary
*
Online Online

Activity: 2002



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
Legendary
*
Online Online

Activity: 2002



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:  

Sponsored by , a Bitcoin-accepting VPN.
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!