Okay, I've confirmed that hashes OK using sha256sum and gets your value, 0f898c5494eaa468d12cf0630a0c0b238cc1149c1c53bbc592d16497094e95ff. So the question remains to verify the sig.
You will have to add 01 00 00 00 to the end before you hash, for the hashtype.
I'm not sure about your scriptsig shortening. You removed the sig ok, but there seems to be more stuff added at the end, after the pubkey.
Yeah, I'm adding those 4 bytes before hashing.
As for the extra stuff after the pubkey, what I'm (possibly incorrectly) doing there is using the combined scripts of scriptSig (from TxIn) and scriptPubKey (from prev TxOut), then removing the signature and OP_CODESEPARATOR (which there are none in any examples I've tried so far). So that extra stuff is the scriptPubKey...it's possible it's not supposed to be there, but even when I remove that, it still doesn't verify anyway, so I don't know yet if that's a problem, too.
Here's the original scriptSig from TxIn:
49 30 46 02 21 00 f5 74 6b 0b 25 4f 5a 37 e7 52
51 45 9c 7a 23 b6 df cb 86 8a c7 46 7e dd 9a 6f
dd 1d 96 98 71 be 02 21 00 88 94 8a ea 29 b6 91
61 ca 34 1c 49 c0 26 86 a8 1d 8c bb 73 94 0f 91
7f a0 ed 71 54 68 6d 3e 5b 01 41 04 47 d4 90 56
1f 39 6c 8a 9e fc 14 48 6b c1 98 88 4b a1 83 79
bc ac 2e 0b e2 d8 52 51 34 ab 74 2f 30 1a 9a ca
36 60 6e 5d 29 aa 23 8a 9e 29 93 00 31 50 42 3d
f6 92 45 63 64 2d 4a fe 9b f4 fe 28
Signature size:
49
Signature:
30 46 02 21 00 f5 74 6b 0b 25 4f 5a 37 e7 52 51
45 9c 7a 23 b6 df cb 86 8a c7 46 7e dd 9a 6f dd
1d 96 98 71 be 02 21 00 88 94 8a ea 29 b6 91 61
ca 34 1c 49 c0 26 86 a8 1d 8c bb 73 94 0f 91 7f
a0 ed 71 54 68 6d 3e 5b 01
Broken down further:
Public key size:
41
Public key:
04
X:
47 d4 90 56 1f 39 6c 8a 9e fc 14 48 6b c1 98 88
4b a1 83 79 bc ac 2e 0b e2 d8 52 51 34 ab 74 2f
Y:
30 1a 9a ca 36 60 6e 5d 29 aa 23 8a 9e 29 93 00
31 50 42 3d f6 92 45 63 64 2d 4a fe 9b f4 fe 28
and here's the concatenated scripts with the signature removed:
41 04 47 d4 90 56 1f 39 6c 8a 9e fc 14 48 6b c1
98 88 4b a1 83 79 bc ac 2e 0b e2 d8 52 51 34 ab
74 2f 30 1a 9a ca 36 60 6e 5d 29 aa 23 8a 9e 29
93 00 31 50 42 3d f6 92 45 63 64 2d 4a fe 9b f4
fe 28 76 a9 14 02 bf 4b 28 89 c6 ad a8 19 0c 25
2e 70 bd e1 a1 90 9f 96 17 88 ac
Broken down further:
Public key size:
41
Public key:
04
X:
47 d4 90 56 1f 39 6c 8a 9e fc 14 48 6b c1 98 88
4b a1 83 79 bc ac 2e 0b e2 d8 52 51 34 ab 74 2f
Y:
30 1a 9a ca 36 60 6e 5d 29 aa 23 8a 9e 29 93 00
31 50 42 3d f6 92 45 63 64 2d 4a fe 9b f4 fe 28
scriptPubKey:
76 - OP_DUP
a9 - OP_HASH160
14 - number of bytes to push
02 bf 4b 28 89 c6 ad a8 19 0c 25 2e 70 bd e1 a1 90 9f 96 17 - push these bytes onto stack
88 - OP_EQUALVERIFY
ac - OP_CHECKSIG
Is scriptPubKey supposed to be in here, too, when created the new temporary transaction to be hashed? So far any docs I've found make it sound like it's there or just don't specify what script or combination of scripts it's supposed to deal with when verifying a transaction.