We consider a singular or weakly hyperbolic Hamiltonian, with $n+1$ degrees of freedom, as a model for the behaviour of a nearly-integrable Hamiltonian near a simple resonance. The model consists of an integrable Hamiltonian possessing an $n$-dimensional hyperbolic invariant torus with fast frequencies $\omega/\sqrt\varepsilon$ and coincident whiskers, plus a perturbation of order $\mu=\varepsilon^p$. The vector $\omega$ is assumed to satisfy a Diophantine condition. We provide a tool to study, in this singular case, the splitting of the perturbed whiskers for $\varepsilon$ small enough, as well as their homoclinic intersections, using the Poincar\'e--Melnikov method. Due to the exponential smallness of the Melnikov function, the size of the error term has to be carefully controlled. So we introduce flow-box coordinates in order to take advantage of the quasiperiodicity properties of the splitting. As a direct application of this approach, we obtain quite general upper bounds for the splitting.