Search code examples
encryptionjmeterrsajmeter-3.2

How to Extract Key from RSA from Bean Shell in Jmeter?


Using the Bean Shell Sampler , i am getting the below output .

Sun RSA public key, 2048 bits modulus: 22645393777802082209236016126079577098177798186319949526107968140080521355989491395183718699098362343956765929857695570321706899880729916472416104430270250740480253857977181966940781684127442660695227074768079572578868626318417847980637776060475992571920989510521398705182729749083041741535402186573338324131843221984077122743708605738053771684198051112417578154906794672470296699198396449111244295581371964621026618783235491999249933540697794384748872610581169875921473286879248291143441340394220262028972544072499684501740362635029199951979062722448893745158595281491224847156191030962211805545205128264731038824937

public exponent: 65537

I just need to extarct the Modulus value from the above ones. How can i achieve it using Regex Extractor in Jmeter ? Help is useful.


Solution

  • Consider upgrading to JMeter 4.0, apart from many bug fixes and performance improvements you will have a brand new Boundary Extractor which makes extraction of everything between modulus: and public exponent easy as pie:

    JMeter Boundary Extractor