We present the quantitative investigation of the submicron structure in the bulk of porous graphite by using the dark-field x-ray imaging with Hartmann masks. By scanning the correlation length and measuring the mask visibility reduction, we obtain the average pore size, relative pore fraction, fractal dimension, and Hurst exponent of the structure in a simple and flexible setup with relaxed requirements on beam coherence. Profiting from the dimensionality of the mask, we obtain scattering signals in two orthogonal directions, which reveals the anisotropy of pore sizes