how to get ( sop1 & sop2 ) these two value,
any formula or any script available...........
Not too easy. You should have good lib for bitcoin transactions to create "a template" and take a sha256d () of it.
Here is a piece of my code. But it will be useless for you. Just a pseudo-code
const MyKey32 Transaction::getRawHash ( const int n, const QByteArray& scr ) const
{
MyByteArray ret; // create empty array
Stream stream ( s );
ret.putInt32 ( stream.readU32 ( ) ); // version
ret.putVarInt ( stream.readVar ( ) ); // input count
for ( int i ( 0 ); i < inputs; i++ ) // copy all inputs
{
ret.append ( stream.readHash ( ) ); // copy 32 byte hash as is
ret.putInt32 ( stream.readU32 ( ) ); // copy 4 bytes index
stream.skipVarData ( ); // skip original script
ret.putPrefixedCond ( i ^ n, scr ); // script replacement
ret.putInt32 ( stream.readU32 ( ) );
}
ret.putVarInt ( stream.readVar ( ) ); // output count
for ( int i ( 0 ); i < outputs; i++ ) // copy all outputs byte-by-byte
{
ret.putInt64 ( stream.readU64 ( ) );
ret.putPrefixed ( stream.readVarData ( ) );
}
ret.putInt32 ( stream.readU32 ( ) ); // lock
ret.putInt32 ( SIGHASH_ALL ); // append hashcode
return MyKey32 ( ret.constData ( ), ret.size ( ) ); // create hash256 of array
}