Section 25. If a plaintiff would be entitled to a judgment or decree except for the bankruptcy or insolvency of a defendant, or his discharge therein, who has given a bond to dissolve an attachment or to release money or property brought within the control of a court of equity in any manner specified in the preceding section, which attachment was made or money or property brought within control more than four months prior to the commencement of proceedings in bankruptcy, or, in voluntary proceedings in insolvency, more than four months prior to the first publication of the notice of the issuing of the warrant, or, in involuntary proceedings in insolvency, more than four months prior to the first publication of the notice of the filing of the petition, or, in proceedings in composition in insolvency in which no assignment has been made, more than four months prior to the notice by the register to the creditors of the debtor's proposal of composition, the court may at any time, upon motion, enter a special judgment or decree for the plaintiff, which shall be a sufficient judgment or decree, within the meaning of the condition of the bond, if like that set forth in sections one hundred and twenty and one hundred and twenty-five of chapter two hundred and twenty-three, to enable him to maintain an action against the sureties thereon.