commit
Showing
9 changed files
with
1883 additions
and
0 deletions
jmeterTool/.gitignore
0 → 100644
jmeterTool/pom.xml
0 → 100644
| 1 | <?xml version="1.0" encoding="UTF-8"?> | ||
| 2 | <project xmlns="http://maven.apache.org/POM/4.0.0" | ||
| 3 | xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
| 4 | xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | ||
| 5 | <modelVersion>4.0.0</modelVersion> | ||
| 6 | |||
| 7 | <groupId>com.chinabr.jmetertool</groupId> | ||
| 8 | <artifactId>jmeterTool</artifactId> | ||
| 9 | <version>1.0.0</version> | ||
| 10 | <packaging>jar</packaging> | ||
| 11 | <name>BrApiTest</name> | ||
| 12 | <url>http://maven.apache.org</url> | ||
| 13 | |||
| 14 | <properties> | ||
| 15 | <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> | ||
| 16 | <aspectj.version>1.8.10</aspectj.version> | ||
| 17 | </properties> | ||
| 18 | |||
| 19 | <build> | ||
| 20 | <plugins> | ||
| 21 | <plugin> | ||
| 22 | <!--定义编译版本 --> | ||
| 23 | <groupId>org.apache.maven.plugins</groupId> | ||
| 24 | <artifactId>maven-compiler-plugin</artifactId> | ||
| 25 | <version>3.0</version> | ||
| 26 | <configuration> | ||
| 27 | <source>1.8</source> | ||
| 28 | <target>1.8</target> | ||
| 29 | <encoding>UTF-8</encoding> | ||
| 30 | </configuration> | ||
| 31 | </plugin> | ||
| 32 | </plugins> | ||
| 33 | </build> | ||
| 34 | </project> | ||
| ... | \ No newline at end of file | ... | \ No newline at end of file |
| 1 | package com.chinabr.jmetertool; | ||
| 2 | |||
| 3 | import java.io.UnsupportedEncodingException; | ||
| 4 | |||
| 5 | /** | ||
| 6 | * Utilities for encoding and decoding the Base64 representation of | ||
| 7 | * binary data. See RFCs <a | ||
| 8 | * href="http://www.ietf.org/rfc/rfc2045.txt">2045</a> and <a | ||
| 9 | * href="http://www.ietf.org/rfc/rfc3548.txt">3548</a>. | ||
| 10 | */ | ||
| 11 | public class Base64 { | ||
| 12 | /** | ||
| 13 | * Default values for encoder/decoder flags. | ||
| 14 | */ | ||
| 15 | public static final int DEFAULT = 0; | ||
| 16 | |||
| 17 | /** | ||
| 18 | * Encoder flag bit to omit the padding '=' characters at the end | ||
| 19 | * of the output (if any). | ||
| 20 | */ | ||
| 21 | public static final int NO_PADDING = 1; | ||
| 22 | |||
| 23 | /** | ||
| 24 | * Encoder flag bit to omit all line terminators (i.e., the output | ||
| 25 | * will be on one long line). | ||
| 26 | */ | ||
| 27 | public static final int NO_WRAP = 2; | ||
| 28 | |||
| 29 | /** | ||
| 30 | * Encoder flag bit to indicate lines should be terminated with a | ||
| 31 | * CRLF pair instead of just an LF. Has no effect if {@code | ||
| 32 | * NO_WRAP} is specified as well. | ||
| 33 | */ | ||
| 34 | public static final int CRLF = 4; | ||
| 35 | |||
| 36 | /** | ||
| 37 | * Encoder/decoder flag bit to indicate using the "URL and | ||
| 38 | * filename safe" variant of Base64 (see RFC 3548 section 4) where | ||
| 39 | * {@code -} and {@code _} are used in place of {@code +} and | ||
| 40 | * {@code /}. | ||
| 41 | */ | ||
| 42 | public static final int URL_SAFE = 8; | ||
| 43 | |||
| 44 | /** | ||
| 45 | * Flag to pass to {@link } to indicate that it | ||
| 46 | * should not close the output stream it is wrapping when it | ||
| 47 | * itself is closed. | ||
| 48 | */ | ||
| 49 | public static final int NO_CLOSE = 16; | ||
| 50 | |||
| 51 | // -------------------------------------------------------- | ||
| 52 | // shared code | ||
| 53 | // -------------------------------------------------------- | ||
| 54 | |||
| 55 | /* package */ static abstract class Coder { | ||
| 56 | public byte[] output; | ||
| 57 | public int op; | ||
| 58 | |||
| 59 | /** | ||
| 60 | * Encode/decode another block of input data. this.output is | ||
| 61 | * provided by the caller, and must be big enough to hold all | ||
| 62 | * the coded data. On exit, this.opwill be set to the length | ||
| 63 | * of the coded data. | ||
| 64 | * | ||
| 65 | * @param finish true if this is the final call to process for | ||
| 66 | * this object. Will finalize the coder state and | ||
| 67 | * include any final bytes in the output. | ||
| 68 | * | ||
| 69 | * @return true if the input so far is good; false if some | ||
| 70 | * error has been detected in the input stream.. | ||
| 71 | */ | ||
| 72 | public abstract boolean process(byte[] input, int offset, int len, boolean finish); | ||
| 73 | |||
| 74 | /** | ||
| 75 | * @return the maximum number of bytes a call to process() | ||
| 76 | * could produce for the given number of input bytes. This may | ||
| 77 | * be an overestimate. | ||
| 78 | */ | ||
| 79 | public abstract int maxOutputSize(int len); | ||
| 80 | } | ||
| 81 | |||
| 82 | // -------------------------------------------------------- | ||
| 83 | // decoding | ||
| 84 | // -------------------------------------------------------- | ||
| 85 | |||
| 86 | /** | ||
| 87 | * Decode the Base64-encoded data in input and return the data in | ||
| 88 | * a new byte array. | ||
| 89 | * | ||
| 90 | * <p>The padding '=' characters at the end are considered optional, but | ||
| 91 | * if any are present, there must be the correct number of them. | ||
| 92 | * | ||
| 93 | * @param str the input String to decode, which is converted to | ||
| 94 | * bytes using the default charset | ||
| 95 | * @param flags controls certain features of the decoded output. | ||
| 96 | * Pass {@code DEFAULT} to decode standard Base64. | ||
| 97 | * | ||
| 98 | * @throws IllegalArgumentException if the input contains | ||
| 99 | * incorrect padding | ||
| 100 | */ | ||
| 101 | public static byte[] decode(String str, int flags) { | ||
| 102 | return decode(str.getBytes(), flags); | ||
| 103 | } | ||
| 104 | |||
| 105 | /** | ||
| 106 | * Decode the Base64-encoded data in input and return the data in | ||
| 107 | * a new byte array. | ||
| 108 | * | ||
| 109 | * <p>The padding '=' characters at the end are considered optional, but | ||
| 110 | * if any are present, there must be the correct number of them. | ||
| 111 | * | ||
| 112 | * @param input the input array to decode | ||
| 113 | * @param flags controls certain features of the decoded output. | ||
| 114 | * Pass {@code DEFAULT} to decode standard Base64. | ||
| 115 | * | ||
| 116 | * @throws IllegalArgumentException if the input contains | ||
| 117 | * incorrect padding | ||
| 118 | */ | ||
| 119 | public static byte[] decode(byte[] input, int flags) { | ||
| 120 | return decode(input, 0, input.length, flags); | ||
| 121 | } | ||
| 122 | |||
| 123 | /** | ||
| 124 | * Decode the Base64-encoded data in input and return the data in | ||
| 125 | * a new byte array. | ||
| 126 | * | ||
| 127 | * <p>The padding '=' characters at the end are considered optional, but | ||
| 128 | * if any are present, there must be the correct number of them. | ||
| 129 | * | ||
| 130 | * @param input the data to decode | ||
| 131 | * @param offset the position within the input array at which to start | ||
| 132 | * @param len the number of bytes of input to decode | ||
| 133 | * @param flags controls certain features of the decoded output. | ||
| 134 | * Pass {@code DEFAULT} to decode standard Base64. | ||
| 135 | * | ||
| 136 | * @throws IllegalArgumentException if the input contains | ||
| 137 | * incorrect padding | ||
| 138 | */ | ||
| 139 | public static byte[] decode(byte[] input, int offset, int len, int flags) { | ||
| 140 | // Allocate space for the most data the input could represent. | ||
| 141 | // (It could contain less if it contains whitespace, etc.) | ||
| 142 | Decoder decoder = new Decoder(flags, new byte[len*3/4]); | ||
| 143 | |||
| 144 | if (!decoder.process(input, offset, len, true)) { | ||
| 145 | throw new IllegalArgumentException("bad base-64"); | ||
| 146 | } | ||
| 147 | |||
| 148 | // Maybe we got lucky and allocated exactly enough output space. | ||
| 149 | if (decoder.op == decoder.output.length) { | ||
| 150 | return decoder.output; | ||
| 151 | } | ||
| 152 | |||
| 153 | // Need to shorten the array, so allocate a new one of the | ||
| 154 | // right size and copy. | ||
| 155 | byte[] temp = new byte[decoder.op]; | ||
| 156 | System.arraycopy(decoder.output, 0, temp, 0, decoder.op); | ||
| 157 | return temp; | ||
| 158 | } | ||
| 159 | |||
| 160 | /* package */ static class Decoder extends Coder { | ||
| 161 | /** | ||
| 162 | * Lookup table for turning bytes into their position in the | ||
| 163 | * Base64 alphabet. | ||
| 164 | */ | ||
| 165 | private static final int DECODE[] = { | ||
| 166 | -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, | ||
| 167 | -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, | ||
| 168 | -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 62, -1, -1, -1, 63, | ||
| 169 | 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, -1, -1, -1, -2, -1, -1, | ||
| 170 | -1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, | ||
| 171 | 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, -1, -1, -1, -1, -1, | ||
| 172 | -1, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, | ||
| 173 | 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, -1, -1, -1, -1, -1, | ||
| 174 | -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, | ||
| 175 | -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, | ||
| 176 | -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, | ||
| 177 | -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, | ||
| 178 | -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, | ||
| 179 | -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, | ||
| 180 | -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, | ||
| 181 | -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, | ||
| 182 | }; | ||
| 183 | |||
| 184 | /** | ||
| 185 | * Decode lookup table for the "web safe" variant (RFC 3548 | ||
| 186 | * sec. 4) where - and _ replace + and /. | ||
| 187 | */ | ||
| 188 | private static final int DECODE_WEBSAFE[] = { | ||
| 189 | -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, | ||
| 190 | -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, | ||
| 191 | -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 62, -1, -1, | ||
| 192 | 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, -1, -1, -1, -2, -1, -1, | ||
| 193 | -1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, | ||
| 194 | 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, -1, -1, -1, -1, 63, | ||
| 195 | -1, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, | ||
| 196 | 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, -1, -1, -1, -1, -1, | ||
| 197 | -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, | ||
| 198 | -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, | ||
| 199 | -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, | ||
| 200 | -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, | ||
| 201 | -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, | ||
| 202 | -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, | ||
| 203 | -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, | ||
| 204 | -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, | ||
| 205 | }; | ||
| 206 | |||
| 207 | /** Non-data values in the DECODE arrays. */ | ||
| 208 | private static final int SKIP = -1; | ||
| 209 | private static final int EQUALS = -2; | ||
| 210 | |||
| 211 | /** | ||
| 212 | * States 0-3 are reading through the next input tuple. | ||
| 213 | * State 4 is having read one '=' and expecting exactly | ||
| 214 | * one more. | ||
| 215 | * State 5 is expecting no more data or padding characters | ||
| 216 | * in the input. | ||
| 217 | * State 6 is the error state; an error has been detected | ||
| 218 | * in the input and no future input can "fix" it. | ||
| 219 | */ | ||
| 220 | private int state; // state number (0 to 6) | ||
| 221 | private int value; | ||
| 222 | |||
| 223 | final private int[] alphabet; | ||
| 224 | |||
| 225 | public Decoder(int flags, byte[] output) { | ||
| 226 | this.output = output; | ||
| 227 | |||
| 228 | alphabet = ((flags & URL_SAFE) == 0) ? DECODE : DECODE_WEBSAFE; | ||
| 229 | state = 0; | ||
| 230 | value = 0; | ||
| 231 | } | ||
| 232 | |||
| 233 | /** | ||
| 234 | * @return an overestimate for the number of bytes {@code | ||
| 235 | * len} bytes could decode to. | ||
| 236 | */ | ||
| 237 | public int maxOutputSize(int len) { | ||
| 238 | return len * 3/4 + 10; | ||
| 239 | } | ||
| 240 | |||
| 241 | /** | ||
| 242 | * Decode another block of input data. | ||
| 243 | * | ||
| 244 | * @return true if the state machine is still healthy. false if | ||
| 245 | * bad base-64 data has been detected in the input stream. | ||
| 246 | */ | ||
| 247 | public boolean process(byte[] input, int offset, int len, boolean finish) { | ||
| 248 | if (this.state == 6) return false; | ||
| 249 | |||
| 250 | int p = offset; | ||
| 251 | len += offset; | ||
| 252 | |||
| 253 | // Using local variables makes the decoder about 12% | ||
| 254 | // faster than if we manipulate the member variables in | ||
| 255 | // the loop. (Even alphabet makes a measurable | ||
| 256 | // difference, which is somewhat surprising to me since | ||
| 257 | // the member variable is final.) | ||
| 258 | int state = this.state; | ||
| 259 | int value = this.value; | ||
| 260 | int op = 0; | ||
| 261 | final byte[] output = this.output; | ||
| 262 | final int[] alphabet = this.alphabet; | ||
| 263 | |||
| 264 | while (p < len) { | ||
| 265 | // Try the fast path: we're starting a new tuple and the | ||
| 266 | // next four bytes of the input stream are all data | ||
| 267 | // bytes. This corresponds to going through states | ||
| 268 | // 0-1-2-3-0. We expect to use this method for most of | ||
| 269 | // the data. | ||
| 270 | // | ||
| 271 | // If any of the next four bytes of input are non-data | ||
| 272 | // (whitespace, etc.), value will end up negative. (All | ||
| 273 | // the non-data values in decode are small negative | ||
| 274 | // numbers, so shifting any of them up and or'ing them | ||
| 275 | // together will result in a value with its top bit set.) | ||
| 276 | // | ||
| 277 | // You can remove this whole block and the output should | ||
| 278 | // be the same, just slower. | ||
| 279 | if (state == 0) { | ||
| 280 | while (p+4 <= len && | ||
| 281 | (value = ((alphabet[input[p] & 0xff] << 18) | | ||
| 282 | (alphabet[input[p+1] & 0xff] << 12) | | ||
| 283 | (alphabet[input[p+2] & 0xff] << 6) | | ||
| 284 | (alphabet[input[p+3] & 0xff]))) >= 0) { | ||
| 285 | output[op+2] = (byte) value; | ||
| 286 | output[op+1] = (byte) (value >> 8); | ||
| 287 | output[op] = (byte) (value >> 16); | ||
| 288 | op += 3; | ||
| 289 | p += 4; | ||
| 290 | } | ||
| 291 | if (p >= len) break; | ||
| 292 | } | ||
| 293 | |||
| 294 | // The fast path isn't available -- either we've read a | ||
| 295 | // partial tuple, or the next four input bytes aren't all | ||
| 296 | // data, or whatever. Fall back to the slower state | ||
| 297 | // machine implementation. | ||
| 298 | |||
| 299 | int d = alphabet[input[p++] & 0xff]; | ||
| 300 | |||
| 301 | switch (state) { | ||
| 302 | case 0: | ||
| 303 | if (d >= 0) { | ||
| 304 | value = d; | ||
| 305 | ++state; | ||
| 306 | } else if (d != SKIP) { | ||
| 307 | this.state = 6; | ||
| 308 | return false; | ||
| 309 | } | ||
| 310 | break; | ||
| 311 | |||
| 312 | case 1: | ||
| 313 | if (d >= 0) { | ||
| 314 | value = (value << 6) | d; | ||
| 315 | ++state; | ||
| 316 | } else if (d != SKIP) { | ||
| 317 | this.state = 6; | ||
| 318 | return false; | ||
| 319 | } | ||
| 320 | break; | ||
| 321 | |||
| 322 | case 2: | ||
| 323 | if (d >= 0) { | ||
| 324 | value = (value << 6) | d; | ||
| 325 | ++state; | ||
| 326 | } else if (d == EQUALS) { | ||
| 327 | // Emit the last (partial) output tuple; | ||
| 328 | // expect exactly one more padding character. | ||
| 329 | output[op++] = (byte) (value >> 4); | ||
| 330 | state = 4; | ||
| 331 | } else if (d != SKIP) { | ||
| 332 | this.state = 6; | ||
| 333 | return false; | ||
| 334 | } | ||
| 335 | break; | ||
| 336 | |||
| 337 | case 3: | ||
| 338 | if (d >= 0) { | ||
| 339 | // Emit the output triple and return to state 0. | ||
| 340 | value = (value << 6) | d; | ||
| 341 | output[op+2] = (byte) value; | ||
| 342 | output[op+1] = (byte) (value >> 8); | ||
| 343 | output[op] = (byte) (value >> 16); | ||
| 344 | op += 3; | ||
| 345 | state = 0; | ||
| 346 | } else if (d == EQUALS) { | ||
| 347 | // Emit the last (partial) output tuple; | ||
| 348 | // expect no further data or padding characters. | ||
| 349 | output[op+1] = (byte) (value >> 2); | ||
| 350 | output[op] = (byte) (value >> 10); | ||
| 351 | op += 2; | ||
| 352 | state = 5; | ||
| 353 | } else if (d != SKIP) { | ||
| 354 | this.state = 6; | ||
| 355 | return false; | ||
| 356 | } | ||
| 357 | break; | ||
| 358 | |||
| 359 | case 4: | ||
| 360 | if (d == EQUALS) { | ||
| 361 | ++state; | ||
| 362 | } else if (d != SKIP) { | ||
| 363 | this.state = 6; | ||
| 364 | return false; | ||
| 365 | } | ||
| 366 | break; | ||
| 367 | |||
| 368 | case 5: | ||
| 369 | if (d != SKIP) { | ||
| 370 | this.state = 6; | ||
| 371 | return false; | ||
| 372 | } | ||
| 373 | break; | ||
| 374 | } | ||
| 375 | } | ||
| 376 | |||
| 377 | if (!finish) { | ||
| 378 | // We're out of input, but a future call could provide | ||
| 379 | // more. | ||
| 380 | this.state = state; | ||
| 381 | this.value = value; | ||
| 382 | this.op = op; | ||
| 383 | return true; | ||
| 384 | } | ||
| 385 | |||
| 386 | // Done reading input. Now figure out where we are left in | ||
| 387 | // the state machine and finish up. | ||
| 388 | |||
| 389 | switch (state) { | ||
| 390 | case 0: | ||
| 391 | // Output length is a multiple of three. Fine. | ||
| 392 | break; | ||
| 393 | case 1: | ||
| 394 | // Read one extra input byte, which isn't enough to | ||
| 395 | // make another output byte. Illegal. | ||
| 396 | this.state = 6; | ||
| 397 | return false; | ||
| 398 | case 2: | ||
| 399 | // Read two extra input bytes, enough to emit 1 more | ||
| 400 | // output byte. Fine. | ||
| 401 | output[op++] = (byte) (value >> 4); | ||
| 402 | break; | ||
| 403 | case 3: | ||
| 404 | // Read three extra input bytes, enough to emit 2 more | ||
| 405 | // output bytes. Fine. | ||
| 406 | output[op++] = (byte) (value >> 10); | ||
| 407 | output[op++] = (byte) (value >> 2); | ||
| 408 | break; | ||
| 409 | case 4: | ||
| 410 | // Read one padding '=' when we expected 2. Illegal. | ||
| 411 | this.state = 6; | ||
| 412 | return false; | ||
| 413 | case 5: | ||
| 414 | // Read all the padding '='s we expected and no more. | ||
| 415 | // Fine. | ||
| 416 | break; | ||
| 417 | } | ||
| 418 | |||
| 419 | this.state = state; | ||
| 420 | this.op = op; | ||
| 421 | return true; | ||
| 422 | } | ||
| 423 | } | ||
| 424 | |||
| 425 | // -------------------------------------------------------- | ||
| 426 | // encoding | ||
| 427 | // -------------------------------------------------------- | ||
| 428 | |||
| 429 | /** | ||
| 430 | * Base64-encode the given data and return a newly allocated | ||
| 431 | * String with the result. | ||
| 432 | * | ||
| 433 | * @param input the data to encode | ||
| 434 | * @param flags controls certain features of the encoded output. | ||
| 435 | * Passing {@code DEFAULT} results in output that | ||
| 436 | * adheres to RFC 2045. | ||
| 437 | */ | ||
| 438 | public static String encodeToString(byte[] input, int flags) { | ||
| 439 | try { | ||
| 440 | return new String(encode(input, flags), "US-ASCII"); | ||
| 441 | } catch (UnsupportedEncodingException e) { | ||
| 442 | // US-ASCII is guaranteed to be available. | ||
| 443 | throw new AssertionError(e); | ||
| 444 | } | ||
| 445 | } | ||
| 446 | |||
| 447 | /** | ||
| 448 | * Base64-encode the given data and return a newly allocated | ||
| 449 | * String with the result. | ||
| 450 | * | ||
| 451 | * @param input the data to encode | ||
| 452 | * @param offset the position within the input array at which to | ||
| 453 | * start | ||
| 454 | * @param len the number of bytes of input to encode | ||
| 455 | * @param flags controls certain features of the encoded output. | ||
| 456 | * Passing {@code DEFAULT} results in output that | ||
| 457 | * adheres to RFC 2045. | ||
| 458 | */ | ||
| 459 | public static String encodeToString(byte[] input, int offset, int len, int flags) { | ||
| 460 | try { | ||
| 461 | return new String(encode(input, offset, len, flags), "US-ASCII"); | ||
| 462 | } catch (UnsupportedEncodingException e) { | ||
| 463 | // US-ASCII is guaranteed to be available. | ||
| 464 | throw new AssertionError(e); | ||
| 465 | } | ||
| 466 | } | ||
| 467 | |||
| 468 | /** | ||
| 469 | * Base64-encode the given data and return a newly allocated | ||
| 470 | * byte[] with the result. | ||
| 471 | * | ||
| 472 | * @param input the data to encode | ||
| 473 | * @param flags controls certain features of the encoded output. | ||
| 474 | * Passing {@code DEFAULT} results in output that | ||
| 475 | * adheres to RFC 2045. | ||
| 476 | */ | ||
| 477 | public static byte[] encode(byte[] input, int flags) { | ||
| 478 | return encode(input, 0, input.length, flags); | ||
| 479 | } | ||
| 480 | |||
| 481 | /** | ||
| 482 | * Base64-encode the given data and return a newly allocated | ||
| 483 | * byte[] with the result. | ||
| 484 | * | ||
| 485 | * @param input the data to encode | ||
| 486 | * @param offset the position within the input array at which to | ||
| 487 | * start | ||
| 488 | * @param len the number of bytes of input to encode | ||
| 489 | * @param flags controls certain features of the encoded output. | ||
| 490 | * Passing {@code DEFAULT} results in output that | ||
| 491 | * adheres to RFC 2045. | ||
| 492 | */ | ||
| 493 | public static byte[] encode(byte[] input, int offset, int len, int flags) { | ||
| 494 | Encoder encoder = new Encoder(flags, null); | ||
| 495 | |||
| 496 | // Compute the exact length of the array we will produce. | ||
| 497 | int output_len = len / 3 * 4; | ||
| 498 | |||
| 499 | // Account for the tail of the data and the padding bytes, if any. | ||
| 500 | if (encoder.do_padding) { | ||
| 501 | if (len % 3 > 0) { | ||
| 502 | output_len += 4; | ||
| 503 | } | ||
| 504 | } else { | ||
| 505 | switch (len % 3) { | ||
| 506 | case 0: break; | ||
| 507 | case 1: output_len += 2; break; | ||
| 508 | case 2: output_len += 3; break; | ||
| 509 | } | ||
| 510 | } | ||
| 511 | |||
| 512 | // Account for the newlines, if any. | ||
| 513 | if (encoder.do_newline && len > 0) { | ||
| 514 | output_len += (((len-1) / (3 * Encoder.LINE_GROUPS)) + 1) * | ||
| 515 | (encoder.do_cr ? 2 : 1); | ||
| 516 | } | ||
| 517 | |||
| 518 | encoder.output = new byte[output_len]; | ||
| 519 | encoder.process(input, offset, len, true); | ||
| 520 | |||
| 521 | assert encoder.op == output_len; | ||
| 522 | |||
| 523 | return encoder.output; | ||
| 524 | } | ||
| 525 | |||
| 526 | /* package */ static class Encoder extends Coder { | ||
| 527 | /** | ||
| 528 | * Emit a new line every this many output tuples. Corresponds to | ||
| 529 | * a 76-character line length (the maximum allowable according to | ||
| 530 | * <a href="http://www.ietf.org/rfc/rfc2045.txt">RFC 2045</a>). | ||
| 531 | */ | ||
| 532 | public static final int LINE_GROUPS = 19; | ||
| 533 | |||
| 534 | /** | ||
| 535 | * Lookup table for turning Base64 alphabet positions (6 bits) | ||
| 536 | * into output bytes. | ||
| 537 | */ | ||
| 538 | private static final byte ENCODE[] = { | ||
| 539 | 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', | ||
| 540 | 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', 'a', 'b', 'c', 'd', 'e', 'f', | ||
| 541 | 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', | ||
| 542 | 'w', 'x', 'y', 'z', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '+', '/', | ||
| 543 | }; | ||
| 544 | |||
| 545 | /** | ||
| 546 | * Lookup table for turning Base64 alphabet positions (6 bits) | ||
| 547 | * into output bytes. | ||
| 548 | */ | ||
| 549 | private static final byte ENCODE_WEBSAFE[] = { | ||
| 550 | 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', | ||
| 551 | 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', 'a', 'b', 'c', 'd', 'e', 'f', | ||
| 552 | 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', | ||
| 553 | 'w', 'x', 'y', 'z', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '-', '_', | ||
| 554 | }; | ||
| 555 | |||
| 556 | final private byte[] tail; | ||
| 557 | /* package */ int tailLen; | ||
| 558 | private int count; | ||
| 559 | |||
| 560 | final public boolean do_padding; | ||
| 561 | final public boolean do_newline; | ||
| 562 | final public boolean do_cr; | ||
| 563 | final private byte[] alphabet; | ||
| 564 | |||
| 565 | public Encoder(int flags, byte[] output) { | ||
| 566 | this.output = output; | ||
| 567 | |||
| 568 | do_padding = (flags & NO_PADDING) == 0; | ||
| 569 | do_newline = (flags & NO_WRAP) == 0; | ||
| 570 | do_cr = (flags & CRLF) != 0; | ||
| 571 | alphabet = ((flags & URL_SAFE) == 0) ? ENCODE : ENCODE_WEBSAFE; | ||
| 572 | |||
| 573 | tail = new byte[2]; | ||
| 574 | tailLen = 0; | ||
| 575 | |||
| 576 | count = do_newline ? LINE_GROUPS : -1; | ||
| 577 | } | ||
| 578 | |||
| 579 | /** | ||
| 580 | * @return an overestimate for the number of bytes {@code | ||
| 581 | * len} bytes could encode to. | ||
| 582 | */ | ||
| 583 | public int maxOutputSize(int len) { | ||
| 584 | return len * 8/5 + 10; | ||
| 585 | } | ||
| 586 | |||
| 587 | public boolean process(byte[] input, int offset, int len, boolean finish) { | ||
| 588 | // Using local variables makes the encoder about 9% faster. | ||
| 589 | final byte[] alphabet = this.alphabet; | ||
| 590 | final byte[] output = this.output; | ||
| 591 | int op = 0; | ||
| 592 | int count = this.count; | ||
| 593 | |||
| 594 | int p = offset; | ||
| 595 | len += offset; | ||
| 596 | int v = -1; | ||
| 597 | |||
| 598 | // First we need to concatenate the tail of the previous call | ||
| 599 | // with any input bytes available now and see if we can empty | ||
| 600 | // the tail. | ||
| 601 | |||
| 602 | switch (tailLen) { | ||
| 603 | case 0: | ||
| 604 | // There was no tail. | ||
| 605 | break; | ||
| 606 | |||
| 607 | case 1: | ||
| 608 | if (p+2 <= len) { | ||
| 609 | // A 1-byte tail with at least 2 bytes of | ||
| 610 | // input available now. | ||
| 611 | v = ((tail[0] & 0xff) << 16) | | ||
| 612 | ((input[p++] & 0xff) << 8) | | ||
| 613 | (input[p++] & 0xff); | ||
| 614 | tailLen = 0; | ||
| 615 | }; | ||
| 616 | break; | ||
| 617 | |||
| 618 | case 2: | ||
| 619 | if (p+1 <= len) { | ||
| 620 | // A 2-byte tail with at least 1 byte of input. | ||
| 621 | v = ((tail[0] & 0xff) << 16) | | ||
| 622 | ((tail[1] & 0xff) << 8) | | ||
| 623 | (input[p++] & 0xff); | ||
| 624 | tailLen = 0; | ||
| 625 | } | ||
| 626 | break; | ||
| 627 | } | ||
| 628 | |||
| 629 | if (v != -1) { | ||
| 630 | output[op++] = alphabet[(v >> 18) & 0x3f]; | ||
| 631 | output[op++] = alphabet[(v >> 12) & 0x3f]; | ||
| 632 | output[op++] = alphabet[(v >> 6) & 0x3f]; | ||
| 633 | output[op++] = alphabet[v & 0x3f]; | ||
| 634 | if (--count == 0) { | ||
| 635 | if (do_cr) output[op++] = '\r'; | ||
| 636 | output[op++] = '\n'; | ||
| 637 | count = LINE_GROUPS; | ||
| 638 | } | ||
| 639 | } | ||
| 640 | |||
| 641 | // At this point either there is no tail, or there are fewer | ||
| 642 | // than 3 bytes of input available. | ||
| 643 | |||
| 644 | // The main loop, turning 3 input bytes into 4 output bytes on | ||
| 645 | // each iteration. | ||
| 646 | while (p+3 <= len) { | ||
| 647 | v = ((input[p] & 0xff) << 16) | | ||
| 648 | ((input[p+1] & 0xff) << 8) | | ||
| 649 | (input[p+2] & 0xff); | ||
| 650 | output[op] = alphabet[(v >> 18) & 0x3f]; | ||
| 651 | output[op+1] = alphabet[(v >> 12) & 0x3f]; | ||
| 652 | output[op+2] = alphabet[(v >> 6) & 0x3f]; | ||
| 653 | output[op+3] = alphabet[v & 0x3f]; | ||
| 654 | p += 3; | ||
| 655 | op += 4; | ||
| 656 | if (--count == 0) { | ||
| 657 | if (do_cr) output[op++] = '\r'; | ||
| 658 | output[op++] = '\n'; | ||
| 659 | count = LINE_GROUPS; | ||
| 660 | } | ||
| 661 | } | ||
| 662 | |||
| 663 | if (finish) { | ||
| 664 | // Finish up the tail of the input. Note that we need to | ||
| 665 | // consume any bytes in tail before any bytes | ||
| 666 | // remaining in input; there should be at most two bytes | ||
| 667 | // total. | ||
| 668 | |||
| 669 | if (p-tailLen == len-1) { | ||
| 670 | int t = 0; | ||
| 671 | v = ((tailLen > 0 ? tail[t++] : input[p++]) & 0xff) << 4; | ||
| 672 | tailLen -= t; | ||
| 673 | output[op++] = alphabet[(v >> 6) & 0x3f]; | ||
| 674 | output[op++] = alphabet[v & 0x3f]; | ||
| 675 | if (do_padding) { | ||
| 676 | output[op++] = '='; | ||
| 677 | output[op++] = '='; | ||
| 678 | } | ||
| 679 | if (do_newline) { | ||
| 680 | if (do_cr) output[op++] = '\r'; | ||
| 681 | output[op++] = '\n'; | ||
| 682 | } | ||
| 683 | } else if (p-tailLen == len-2) { | ||
| 684 | int t = 0; | ||
| 685 | v = (((tailLen > 1 ? tail[t++] : input[p++]) & 0xff) << 10) | | ||
| 686 | (((tailLen > 0 ? tail[t++] : input[p++]) & 0xff) << 2); | ||
| 687 | tailLen -= t; | ||
| 688 | output[op++] = alphabet[(v >> 12) & 0x3f]; | ||
| 689 | output[op++] = alphabet[(v >> 6) & 0x3f]; | ||
| 690 | output[op++] = alphabet[v & 0x3f]; | ||
| 691 | if (do_padding) { | ||
| 692 | output[op++] = '='; | ||
| 693 | } | ||
| 694 | if (do_newline) { | ||
| 695 | if (do_cr) output[op++] = '\r'; | ||
| 696 | output[op++] = '\n'; | ||
| 697 | } | ||
| 698 | } else if (do_newline && op > 0 && count != LINE_GROUPS) { | ||
| 699 | if (do_cr) output[op++] = '\r'; | ||
| 700 | output[op++] = '\n'; | ||
| 701 | } | ||
| 702 | |||
| 703 | assert tailLen == 0; | ||
| 704 | assert p == len; | ||
| 705 | } else { | ||
| 706 | // Save the leftovers in tail to be consumed on the next | ||
| 707 | // call to encodeInternal. | ||
| 708 | |||
| 709 | if (p == len-1) { | ||
| 710 | tail[tailLen++] = input[p]; | ||
| 711 | } else if (p == len-2) { | ||
| 712 | tail[tailLen++] = input[p]; | ||
| 713 | tail[tailLen++] = input[p+1]; | ||
| 714 | } | ||
| 715 | } | ||
| 716 | |||
| 717 | this.op = op; | ||
| 718 | this.count = count; | ||
| 719 | |||
| 720 | return true; | ||
| 721 | } | ||
| 722 | } | ||
| 723 | |||
| 724 | //@UnsupportedAppUsage | ||
| 725 | private Base64() { } // don't instantiate | ||
| 726 | } | ||
| ... | \ No newline at end of file | ... | \ No newline at end of file |
| 1 | package com.chinabr.jmetertool; | ||
| 2 | |||
| 3 | import java.util.Date; | ||
| 4 | |||
| 5 | public class RequestParamsBean { | ||
| 6 | private String app_id = ""; | ||
| 7 | private String auth_data = ""; | ||
| 8 | private String biz_data = ""; | ||
| 9 | private String imei = ""; | ||
| 10 | private String method = ""; | ||
| 11 | private String otaKey = ""; | ||
| 12 | private String platform = ""; | ||
| 13 | private String version = ""; | ||
| 14 | private String timestamp = String.valueOf(new Date().getTime()); | ||
| 15 | private String token = ""; | ||
| 16 | private String uid = ""; | ||
| 17 | private String sign = ""; | ||
| 18 | |||
| 19 | public String getApp_id() { | ||
| 20 | return app_id; | ||
| 21 | } | ||
| 22 | |||
| 23 | public void setApp_id(String app_id) { | ||
| 24 | this.app_id = app_id; | ||
| 25 | } | ||
| 26 | |||
| 27 | public String getAuth_data() { | ||
| 28 | return auth_data; | ||
| 29 | } | ||
| 30 | |||
| 31 | public void setAuth_data(String auth_data) { | ||
| 32 | this.auth_data = auth_data; | ||
| 33 | } | ||
| 34 | |||
| 35 | public String getBiz_data() { | ||
| 36 | return biz_data; | ||
| 37 | } | ||
| 38 | |||
| 39 | public void setBiz_data(String biz_data) { | ||
| 40 | this.biz_data = biz_data; | ||
| 41 | } | ||
| 42 | |||
| 43 | public String getImei() { | ||
| 44 | return imei; | ||
| 45 | } | ||
| 46 | |||
| 47 | public void setImei(String imei) { | ||
| 48 | this.imei = imei; | ||
| 49 | } | ||
| 50 | |||
| 51 | public String getMethod() { | ||
| 52 | return method; | ||
| 53 | } | ||
| 54 | |||
| 55 | public void setMethod(String method) { | ||
| 56 | this.method = method; | ||
| 57 | } | ||
| 58 | |||
| 59 | public String getOtaKey() { | ||
| 60 | return otaKey; | ||
| 61 | } | ||
| 62 | |||
| 63 | public void setOtaKey(String otaKey) { | ||
| 64 | this.otaKey = otaKey; | ||
| 65 | } | ||
| 66 | |||
| 67 | public String getPlatform() { | ||
| 68 | return platform; | ||
| 69 | } | ||
| 70 | |||
| 71 | public void setPlatform(String platform) { | ||
| 72 | this.platform = platform; | ||
| 73 | } | ||
| 74 | |||
| 75 | public String getVersion() { | ||
| 76 | return version; | ||
| 77 | } | ||
| 78 | |||
| 79 | public void setVersion(String version) { | ||
| 80 | this.version = version; | ||
| 81 | } | ||
| 82 | |||
| 83 | public String getTimestamp() { | ||
| 84 | return timestamp; | ||
| 85 | } | ||
| 86 | |||
| 87 | public void setTimestamp(String timestamp) { | ||
| 88 | this.timestamp = timestamp; | ||
| 89 | } | ||
| 90 | |||
| 91 | public String getToken() { | ||
| 92 | if(token == null) { | ||
| 93 | token = ""; | ||
| 94 | } | ||
| 95 | return token; | ||
| 96 | } | ||
| 97 | |||
| 98 | public void setToken(String token) { | ||
| 99 | this.token = token; | ||
| 100 | } | ||
| 101 | |||
| 102 | public String getUid() { | ||
| 103 | if(uid == null) { | ||
| 104 | uid = ""; | ||
| 105 | } | ||
| 106 | return uid; | ||
| 107 | } | ||
| 108 | |||
| 109 | public void setUid(String uid) { | ||
| 110 | this.uid = uid; | ||
| 111 | } | ||
| 112 | |||
| 113 | public String getSign() { | ||
| 114 | return sign; | ||
| 115 | } | ||
| 116 | |||
| 117 | public void setSign(String sign) { | ||
| 118 | this.sign = sign; | ||
| 119 | } | ||
| 120 | } |
| 1 | package com.chinabr.jmetertool; | ||
| 2 | |||
| 3 | import javax.crypto.Cipher; | ||
| 4 | import javax.crypto.spec.SecretKeySpec; | ||
| 5 | import java.security.MessageDigest; | ||
| 6 | import java.security.NoSuchAlgorithmException; | ||
| 7 | import java.util.regex.Matcher; | ||
| 8 | import java.util.regex.Pattern; | ||
| 9 | |||
| 10 | /** | ||
| 11 | * Created by Wang on 2016/9/23. | ||
| 12 | * 类描述:加密工具类 | ||
| 13 | * 修改描述: | ||
| 14 | */ | ||
| 15 | |||
| 16 | public class SecurityUtil { | ||
| 17 | private static final String ALGO = "AES"; | ||
| 18 | |||
| 19 | private static final String DEFAULT_ENCODING = "UTF-8"; | ||
| 20 | private static final char[] DIGITS = {'0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'a', 'b', 'c', 'd', 'e', 'f'}; | ||
| 21 | |||
| 22 | private static final String old_ENCRYPT_KEY = "UymLGWztn9eWhLIR"; | ||
| 23 | private static final String old_APP_SIGN_KEY = "6sZUoGeHzIdmp5u8"; | ||
| 24 | |||
| 25 | /** | ||
| 26 | * AES base64 接口请求参数加密 | ||
| 27 | * | ||
| 28 | * @param key 加密秘钥 | ||
| 29 | * @param params 参数字符串 | ||
| 30 | * @return | ||
| 31 | */ | ||
| 32 | private static String paramEncrypt(String key, String params) { | ||
| 33 | try { | ||
| 34 | SecretKeySpec secretKeySpec = new SecretKeySpec(key.getBytes(DEFAULT_ENCODING), ALGO); | ||
| 35 | Cipher cipher = Cipher.getInstance(ALGO); | ||
| 36 | cipher.init(Cipher.ENCRYPT_MODE, secretKeySpec); | ||
| 37 | return replaceBlank(Base64.encodeToString(cipher.doFinal(params.getBytes(DEFAULT_ENCODING)), Base64.URL_SAFE)); | ||
| 38 | } catch (Exception e) { | ||
| 39 | e.printStackTrace(); | ||
| 40 | throw new IllegalStateException("failed to encrypt password.", e); | ||
| 41 | } | ||
| 42 | } | ||
| 43 | |||
| 44 | /** | ||
| 45 | * BizData字段解密 | ||
| 46 | * @param params | ||
| 47 | * @return | ||
| 48 | */ | ||
| 49 | public static String paramDecrypt(String params, String type) { | ||
| 50 | byte[] bytes= Base64.decode(params,Base64.URL_SAFE); | ||
| 51 | if("old".equals(type)) { | ||
| 52 | return aesDecrypt(old_ENCRYPT_KEY,bytes); | ||
| 53 | } else if("new".equals(type)) { | ||
| 54 | return aesDecrypt(Constants.AES_KEY,bytes); | ||
| 55 | } | ||
| 56 | return null; | ||
| 57 | } | ||
| 58 | |||
| 59 | public static String getAppBizData(String params, String type) { | ||
| 60 | if("old".equals(type)) { | ||
| 61 | return paramEncrypt(old_ENCRYPT_KEY,params); | ||
| 62 | } else if("new".equals(type)) { | ||
| 63 | return paramEncrypt(Constants.AES_KEY,params); | ||
| 64 | } | ||
| 65 | return null; | ||
| 66 | } | ||
| 67 | |||
| 68 | public static String getAppSignKey(String app_id, String biz_data, String imei, | ||
| 69 | String method, String otaKey, String timestamp, | ||
| 70 | String token, String uid, String version, String type) { | ||
| 71 | String builder = "app_id" + "=" + app_id + | ||
| 72 | "&" + "biz_data" + "=" + biz_data + | ||
| 73 | "&" + "imei" + "=" + imei + | ||
| 74 | "&" + "method" + "=" + method + | ||
| 75 | "&" + "otaKey" + "=" + otaKey + | ||
| 76 | "&" + "timestamp" + "=" + timestamp + | ||
| 77 | "&" + "token" + "=" + token + | ||
| 78 | "&" + "uid" + "=" + uid + | ||
| 79 | "&" + "version" + "=" + version + | ||
| 80 | "&" + "key" + "="; | ||
| 81 | if("old".equals(type)) { | ||
| 82 | builder = builder + old_APP_SIGN_KEY; | ||
| 83 | } else if("new".equals(type)) { | ||
| 84 | builder = builder + Constants.SIGN_KEY; | ||
| 85 | } else { | ||
| 86 | return null; | ||
| 87 | } | ||
| 88 | return replaceBlank(Base64.encodeToString(MD5ToByte(builder), Base64.URL_SAFE)); | ||
| 89 | } | ||
| 90 | |||
| 91 | private static String base64Encrypt(String key, String params) { | ||
| 92 | try { | ||
| 93 | return replaceBlank(Base64.encodeToString(params.getBytes(DEFAULT_ENCODING), Base64.URL_SAFE)); | ||
| 94 | } catch (Exception e) { | ||
| 95 | e.printStackTrace(); | ||
| 96 | throw new IllegalStateException("failed to encrypt password.", e); | ||
| 97 | } | ||
| 98 | } | ||
| 99 | |||
| 100 | /** | ||
| 101 | * 去掉空格字符串 | ||
| 102 | * | ||
| 103 | * @param str | ||
| 104 | * @return | ||
| 105 | */ | ||
| 106 | private static String replaceBlank(String str) { | ||
| 107 | String dest = ""; | ||
| 108 | if (str != null) { | ||
| 109 | Pattern BLANK_PATTERN = Pattern.compile("\\s*"); | ||
| 110 | Matcher m = BLANK_PATTERN.matcher(str); | ||
| 111 | dest = m.replaceAll(""); | ||
| 112 | } | ||
| 113 | return dest; | ||
| 114 | } | ||
| 115 | |||
| 116 | /** | ||
| 117 | * AES 加密 通用 | ||
| 118 | * | ||
| 119 | * @param key 秘钥 | ||
| 120 | * @param input String字符串 | ||
| 121 | * @return | ||
| 122 | */ | ||
| 123 | private static byte[] aesEncrypt(String key, String input) { | ||
| 124 | try { | ||
| 125 | SecretKeySpec secretKeySpec = new SecretKeySpec(key.getBytes(DEFAULT_ENCODING), ALGO); | ||
| 126 | Cipher cipher = Cipher.getInstance(ALGO); | ||
| 127 | cipher.init(Cipher.ENCRYPT_MODE, secretKeySpec); | ||
| 128 | return cipher.doFinal(input.getBytes(DEFAULT_ENCODING)); | ||
| 129 | } catch (Exception e) { | ||
| 130 | e.printStackTrace(); | ||
| 131 | throw new IllegalStateException("failed to encrypt password.", e); | ||
| 132 | } | ||
| 133 | } | ||
| 134 | |||
| 135 | |||
| 136 | /** | ||
| 137 | * AES 解密 通用 | ||
| 138 | * | ||
| 139 | * @param key 秘钥 | ||
| 140 | * @param input byte数组 | ||
| 141 | * @return | ||
| 142 | */ | ||
| 143 | private static String aesDecrypt(String key, byte[] input) { | ||
| 144 | try { | ||
| 145 | Cipher cipher = Cipher.getInstance(ALGO); | ||
| 146 | SecretKeySpec secretKeySpec = new SecretKeySpec(key.getBytes(DEFAULT_ENCODING), ALGO); | ||
| 147 | cipher.init(Cipher.DECRYPT_MODE, secretKeySpec); | ||
| 148 | return new String(cipher.doFinal(input), DEFAULT_ENCODING); | ||
| 149 | } catch (Exception e) { | ||
| 150 | e.printStackTrace(); | ||
| 151 | throw new IllegalStateException("failed to decrypt password.", e); | ||
| 152 | } | ||
| 153 | } | ||
| 154 | |||
| 155 | /** | ||
| 156 | * base64 decode | ||
| 157 | * @param input 输入 | ||
| 158 | * @param flags Base64.URL_SAFE 等 | ||
| 159 | * @return | ||
| 160 | */ | ||
| 161 | private static String base64Encode(byte[] input, int flags){ | ||
| 162 | return Base64.encodeToString(input, flags); | ||
| 163 | } | ||
| 164 | |||
| 165 | /** | ||
| 166 | * base64 encode | ||
| 167 | * @param input 输入 | ||
| 168 | * @param flags Base64.URL_SAFE 等 | ||
| 169 | * @return | ||
| 170 | */ | ||
| 171 | private static byte[] base64Decode(String input, int flags){ | ||
| 172 | return Base64.decode(input,flags); | ||
| 173 | } | ||
| 174 | |||
| 175 | private static char[] encodeHex(byte[] data) { | ||
| 176 | int l = data.length; | ||
| 177 | char[] out = new char[l << 1]; | ||
| 178 | for (int i = 0, j = 0; i < l; i++) { | ||
| 179 | |||
| 180 | out[j++] = DIGITS[(0xF0 & data[i]) >>> 4]; | ||
| 181 | out[j++] = DIGITS[0x0F & data[i]]; | ||
| 182 | } | ||
| 183 | return out; | ||
| 184 | } | ||
| 185 | |||
| 186 | private static byte[] decodeHex(char[] data) { | ||
| 187 | int len = data.length; | ||
| 188 | if ((len & 0x01) != 0) { | ||
| 189 | throw new IllegalStateException("Odd number of characters."); | ||
| 190 | } | ||
| 191 | |||
| 192 | byte[] out = new byte[len >> 1]; | ||
| 193 | for (int i = 0, j = 0; j < len; i++) { | ||
| 194 | int f = toDigit(data[j], j) << 4; | ||
| 195 | j++; | ||
| 196 | f = f | toDigit(data[j], j); | ||
| 197 | j++; | ||
| 198 | out[i] = (byte) (f & 0xFF); | ||
| 199 | } | ||
| 200 | return out; | ||
| 201 | } | ||
| 202 | |||
| 203 | private static int toDigit(char ch, int index) { | ||
| 204 | int digit = Character.digit(ch, 16); | ||
| 205 | if (digit == -1) { | ||
| 206 | throw new IllegalStateException("Illegal hexadecimal character " + ch + " at index " + index); | ||
| 207 | } | ||
| 208 | return digit; | ||
| 209 | } | ||
| 210 | |||
| 211 | private static String MD5(String sourceStr) { | ||
| 212 | String result = ""; | ||
| 213 | try { | ||
| 214 | MessageDigest md = MessageDigest.getInstance("MD5"); | ||
| 215 | md.update(sourceStr.getBytes()); | ||
| 216 | byte b[] = md.digest(); | ||
| 217 | int i; | ||
| 218 | StringBuffer buf = new StringBuffer(""); | ||
| 219 | for (int offset = 0; offset < b.length; offset++) { | ||
| 220 | i = b[offset]; | ||
| 221 | if (i < 0) | ||
| 222 | i += 256; | ||
| 223 | if (i < 16) | ||
| 224 | buf.append("0"); | ||
| 225 | buf.append(Integer.toHexString(i)); | ||
| 226 | } | ||
| 227 | result = buf.toString(); | ||
| 228 | } catch (NoSuchAlgorithmException e) { | ||
| 229 | } | ||
| 230 | return result.toString().substring(8, 24); | ||
| 231 | } | ||
| 232 | |||
| 233 | private static String MD5ToHex(String sourceStr) { | ||
| 234 | String result = ""; | ||
| 235 | try { | ||
| 236 | MessageDigest md = MessageDigest.getInstance("MD5"); | ||
| 237 | md.update(sourceStr.getBytes()); | ||
| 238 | byte b[] = md.digest(); | ||
| 239 | int i; | ||
| 240 | StringBuffer buf = new StringBuffer(""); | ||
| 241 | for (int offset = 0; offset < b.length; offset++) { | ||
| 242 | i = b[offset]; | ||
| 243 | if (i < 0) | ||
| 244 | i += 256; | ||
| 245 | if (i < 16) | ||
| 246 | buf.append("0"); | ||
| 247 | buf.append(Integer.toHexString(i)); | ||
| 248 | } | ||
| 249 | result = buf.toString(); | ||
| 250 | } catch (NoSuchAlgorithmException e) { | ||
| 251 | } | ||
| 252 | return result.toString(); | ||
| 253 | } | ||
| 254 | |||
| 255 | private static byte[] MD5ToByte(String sourceStr) { | ||
| 256 | byte b[] = new byte[32]; | ||
| 257 | try { | ||
| 258 | MessageDigest md = MessageDigest.getInstance("MD5"); | ||
| 259 | md.update(sourceStr.getBytes()); | ||
| 260 | b = md.digest(); | ||
| 261 | return b; | ||
| 262 | } catch (NoSuchAlgorithmException e) { | ||
| 263 | } | ||
| 264 | return b; | ||
| 265 | } | ||
| 266 | |||
| 267 | public static void main(String[] args) { | ||
| 268 | String a = "wfIoA0F5ojfBm8PoKx4JoA=="; | ||
| 269 | System.out.println(paramDecrypt(a,"new")); | ||
| 270 | String b = "{ \"id\": \"0\" }"; | ||
| 271 | System.out.println(getAppBizData(b,"new")); | ||
| 272 | System.out.println(getAppBizData(b,"old")); | ||
| 273 | // String biz_data = "{\"id\":\"0\"}"; | ||
| 274 | // String method = "com.lejane.handler.common.app.launch.advertise.query"; | ||
| 275 | // String uid = "11406869"; | ||
| 276 | // String token = "7HMuJHHSPOsEeuG1_0o9h3QiPursw8WTMejfVG6ba-jkArmocfW6tN4-dOo355_7GdwrCjA1TSD27jHAjh-wIFtFapzp1IiaZVyORdqGqSwmDvENOecheyWYzds50A2AT-FYxChOFlUSAJjcXig7WUjHTQZrJ_b5jU3l_L-VNik="; | ||
| 277 | // RequestParamsBean requestParamsBean = new RequestParamsBean(); | ||
| 278 | // requestParamsBean.setApp_id("110"); | ||
| 279 | // requestParamsBean.setImei("bc28204e3c3767af81791d485ce8946500a0178e"); | ||
| 280 | // requestParamsBean.setPlatform("iOS"); | ||
| 281 | // requestParamsBean.setVersion("1.21.0"); | ||
| 282 | // requestParamsBean.setOtaKey("e86ce4752ba46a06035db951531caf2d"); | ||
| 283 | // requestParamsBean.setToken(token); | ||
| 284 | // requestParamsBean.setUid(uid); | ||
| 285 | // requestParamsBean.setMethod(method); | ||
| 286 | // biz_data = SecurityUtil.getAppBizData(biz_data,"old"); | ||
| 287 | // requestParamsBean.setBiz_data(biz_data); | ||
| 288 | // String sign = SecurityUtil.getAppSignKey(requestParamsBean.getApp_id(),requestParamsBean.getBiz_data(),requestParamsBean.getImei(),requestParamsBean.getMethod(),requestParamsBean.getOtaKey(),requestParamsBean.getTimestamp(),requestParamsBean.getToken(),requestParamsBean.getUid(),requestParamsBean.getVersion(),"old"); | ||
| 289 | // requestParamsBean.setSign(sign); | ||
| 290 | // String request_params = JSONObject.toJSONString(requestParamsBean); | ||
| 291 | // System.out.println(biz_data); | ||
| 292 | // System.out.println(sign); | ||
| 293 | // System.out.println(requestParamsBean.getTimestamp()); | ||
| 294 | } | ||
| 295 | } |
jmeterTool/src/main/resources/分享接口压测.jmx
0 → 100644
| 1 | <?xml version="1.0" encoding="UTF-8"?> | ||
| 2 | <jmeterTestPlan version="1.2" properties="5.0" jmeter="5.3"> | ||
| 3 | <hashTree> | ||
| 4 | <TestPlan guiclass="TestPlanGui" testclass="TestPlan" testname="分享接口压测" enabled="true"> | ||
| 5 | <stringProp name="TestPlan.comments"></stringProp> | ||
| 6 | <boolProp name="TestPlan.functional_mode">false</boolProp> | ||
| 7 | <boolProp name="TestPlan.tearDown_on_shutdown">true</boolProp> | ||
| 8 | <boolProp name="TestPlan.serialize_threadgroups">false</boolProp> | ||
| 9 | <elementProp name="TestPlan.user_defined_variables" elementType="Arguments" guiclass="ArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true"> | ||
| 10 | <collectionProp name="Arguments.arguments"/> | ||
| 11 | </elementProp> | ||
| 12 | <stringProp name="TestPlan.user_define_classpath"></stringProp> | ||
| 13 | </TestPlan> | ||
| 14 | <hashTree> | ||
| 15 | <ThreadGroup guiclass="ThreadGroupGui" testclass="ThreadGroup" testname="线程组" enabled="true"> | ||
| 16 | <stringProp name="ThreadGroup.on_sample_error">continue</stringProp> | ||
| 17 | <elementProp name="ThreadGroup.main_controller" elementType="LoopController" guiclass="LoopControlPanel" testclass="LoopController" testname="循环控制器" enabled="true"> | ||
| 18 | <boolProp name="LoopController.continue_forever">false</boolProp> | ||
| 19 | <stringProp name="LoopController.loops">1</stringProp> | ||
| 20 | </elementProp> | ||
| 21 | <stringProp name="ThreadGroup.num_threads">1</stringProp> | ||
| 22 | <stringProp name="ThreadGroup.ramp_time">1</stringProp> | ||
| 23 | <boolProp name="ThreadGroup.scheduler">false</boolProp> | ||
| 24 | <stringProp name="ThreadGroup.duration">60</stringProp> | ||
| 25 | <stringProp name="ThreadGroup.delay"></stringProp> | ||
| 26 | <boolProp name="ThreadGroup.same_user_on_next_iteration">true</boolProp> | ||
| 27 | </ThreadGroup> | ||
| 28 | <hashTree> | ||
| 29 | <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="分享接口-测试" enabled="false"> | ||
| 30 | <elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" testname="用户定义的变量" enabled="true"> | ||
| 31 | <collectionProp name="Arguments.arguments"> | ||
| 32 | <elementProp name="app_id" elementType="HTTPArgument"> | ||
| 33 | <boolProp name="HTTPArgument.always_encode">false</boolProp> | ||
| 34 | <stringProp name="Argument.value">110</stringProp> | ||
| 35 | <stringProp name="Argument.metadata">=</stringProp> | ||
| 36 | <boolProp name="HTTPArgument.use_equals">true</boolProp> | ||
| 37 | <stringProp name="Argument.name">app_id</stringProp> | ||
| 38 | </elementProp> | ||
| 39 | <elementProp name="method" elementType="HTTPArgument"> | ||
| 40 | <boolProp name="HTTPArgument.always_encode">false</boolProp> | ||
| 41 | <stringProp name="Argument.value">com.insurance.handler.user.visit.share.save</stringProp> | ||
| 42 | <stringProp name="Argument.metadata">=</stringProp> | ||
| 43 | <boolProp name="HTTPArgument.use_equals">true</boolProp> | ||
| 44 | <stringProp name="Argument.name">method</stringProp> | ||
| 45 | </elementProp> | ||
| 46 | <elementProp name="uid" elementType="HTTPArgument"> | ||
| 47 | <boolProp name="HTTPArgument.always_encode">false</boolProp> | ||
| 48 | <stringProp name="Argument.value">5034720</stringProp> | ||
| 49 | <stringProp name="Argument.metadata">=</stringProp> | ||
| 50 | <boolProp name="HTTPArgument.use_equals">true</boolProp> | ||
| 51 | <stringProp name="Argument.name">uid</stringProp> | ||
| 52 | </elementProp> | ||
| 53 | <elementProp name="imei" elementType="HTTPArgument"> | ||
| 54 | <boolProp name="HTTPArgument.always_encode">false</boolProp> | ||
| 55 | <stringProp name="Argument.value">bc28204e3c3767af81791d485ce8946500a0178e</stringProp> | ||
| 56 | <stringProp name="Argument.metadata">=</stringProp> | ||
| 57 | <boolProp name="HTTPArgument.use_equals">true</boolProp> | ||
| 58 | <stringProp name="Argument.name">imei</stringProp> | ||
| 59 | </elementProp> | ||
| 60 | <elementProp name="version" elementType="HTTPArgument"> | ||
| 61 | <boolProp name="HTTPArgument.always_encode">false</boolProp> | ||
| 62 | <stringProp name="Argument.value">1.23.1</stringProp> | ||
| 63 | <stringProp name="Argument.metadata">=</stringProp> | ||
| 64 | <boolProp name="HTTPArgument.use_equals">true</boolProp> | ||
| 65 | <stringProp name="Argument.name">version</stringProp> | ||
| 66 | </elementProp> | ||
| 67 | <elementProp name="timestamp" elementType="HTTPArgument"> | ||
| 68 | <boolProp name="HTTPArgument.always_encode">false</boolProp> | ||
| 69 | <stringProp name="Argument.value">1597304311673</stringProp> | ||
| 70 | <stringProp name="Argument.metadata">=</stringProp> | ||
| 71 | <boolProp name="HTTPArgument.use_equals">true</boolProp> | ||
| 72 | <stringProp name="Argument.name">timestamp</stringProp> | ||
| 73 | </elementProp> | ||
| 74 | <elementProp name="biz_data" elementType="HTTPArgument"> | ||
| 75 | <boolProp name="HTTPArgument.always_encode">false</boolProp> | ||
| 76 | <stringProp name="Argument.value">1m_uGlY1EJm_XrECDJLOttkDLyiOLFSO7yv6bbWh7rk=</stringProp> | ||
| 77 | <stringProp name="Argument.metadata">=</stringProp> | ||
| 78 | <boolProp name="HTTPArgument.use_equals">true</boolProp> | ||
| 79 | <stringProp name="Argument.name">biz_data</stringProp> | ||
| 80 | </elementProp> | ||
| 81 | <elementProp name="otaKey" elementType="HTTPArgument"> | ||
| 82 | <boolProp name="HTTPArgument.always_encode">false</boolProp> | ||
| 83 | <stringProp name="Argument.value">e86ce4752ba46a06035db951531caf2d</stringProp> | ||
| 84 | <stringProp name="Argument.metadata">=</stringProp> | ||
| 85 | <boolProp name="HTTPArgument.use_equals">true</boolProp> | ||
| 86 | <stringProp name="Argument.name">otaKey</stringProp> | ||
| 87 | </elementProp> | ||
| 88 | <elementProp name="platform" elementType="HTTPArgument"> | ||
| 89 | <boolProp name="HTTPArgument.always_encode">false</boolProp> | ||
| 90 | <stringProp name="Argument.value">iOS</stringProp> | ||
| 91 | <stringProp name="Argument.metadata">=</stringProp> | ||
| 92 | <boolProp name="HTTPArgument.use_equals">true</boolProp> | ||
| 93 | <stringProp name="Argument.name">platform</stringProp> | ||
| 94 | </elementProp> | ||
| 95 | <elementProp name="sign" elementType="HTTPArgument"> | ||
| 96 | <boolProp name="HTTPArgument.always_encode">false</boolProp> | ||
| 97 | <stringProp name="Argument.value">6tpSBywcMyaqsELl1Wu_6Q==</stringProp> | ||
| 98 | <stringProp name="Argument.metadata">=</stringProp> | ||
| 99 | <boolProp name="HTTPArgument.use_equals">true</boolProp> | ||
| 100 | <stringProp name="Argument.name">sign</stringProp> | ||
| 101 | </elementProp> | ||
| 102 | <elementProp name="token" elementType="HTTPArgument"> | ||
| 103 | <boolProp name="HTTPArgument.always_encode">false</boolProp> | ||
| 104 | <stringProp name="Argument.value">oVVeAl2eERPxiU1eY1LXf_nteJusfuDzYFQV3s0zhwQZ2azjBnPJ8Jkfvh2xNP_3RvaxMpX5-x_9EiQLDJ7lZaBXaDd_tsVoLf_PC4eA_No4SbKjzqZq1tcgz3TtlsI_-MV9-LmqhvKpS7rCTt7WuQ==</stringProp> | ||
| 105 | <stringProp name="Argument.metadata">=</stringProp> | ||
| 106 | <boolProp name="HTTPArgument.use_equals">true</boolProp> | ||
| 107 | <stringProp name="Argument.name">token</stringProp> | ||
| 108 | </elementProp> | ||
| 109 | </collectionProp> | ||
| 110 | </elementProp> | ||
| 111 | <stringProp name="HTTPSampler.domain">health-qa.jxbrty.com</stringProp> | ||
| 112 | <stringProp name="HTTPSampler.port"></stringProp> | ||
| 113 | <stringProp name="HTTPSampler.protocol">http</stringProp> | ||
| 114 | <stringProp name="HTTPSampler.contentEncoding"></stringProp> | ||
| 115 | <stringProp name="HTTPSampler.path">/insurance/gateway.do</stringProp> | ||
| 116 | <stringProp name="HTTPSampler.method">POST</stringProp> | ||
| 117 | <boolProp name="HTTPSampler.follow_redirects">true</boolProp> | ||
| 118 | <boolProp name="HTTPSampler.auto_redirects">false</boolProp> | ||
| 119 | <boolProp name="HTTPSampler.use_keepalive">true</boolProp> | ||
| 120 | <boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp> | ||
| 121 | <stringProp name="HTTPSampler.embedded_url_re"></stringProp> | ||
| 122 | <stringProp name="HTTPSampler.connect_timeout"></stringProp> | ||
| 123 | <stringProp name="HTTPSampler.response_timeout"></stringProp> | ||
| 124 | </HTTPSamplerProxy> | ||
| 125 | <hashTree/> | ||
| 126 | <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="分享接口-线上" enabled="false"> | ||
| 127 | <elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" testname="用户定义的变量" enabled="true"> | ||
| 128 | <collectionProp name="Arguments.arguments"> | ||
| 129 | <elementProp name="app_id" elementType="HTTPArgument"> | ||
| 130 | <boolProp name="HTTPArgument.always_encode">false</boolProp> | ||
| 131 | <stringProp name="Argument.value">110</stringProp> | ||
| 132 | <stringProp name="Argument.metadata">=</stringProp> | ||
| 133 | <boolProp name="HTTPArgument.use_equals">true</boolProp> | ||
| 134 | <stringProp name="Argument.name">app_id</stringProp> | ||
| 135 | </elementProp> | ||
| 136 | <elementProp name="method" elementType="HTTPArgument"> | ||
| 137 | <boolProp name="HTTPArgument.always_encode">false</boolProp> | ||
| 138 | <stringProp name="Argument.value">com.insurance.handler.user.visit.share.save</stringProp> | ||
| 139 | <stringProp name="Argument.metadata">=</stringProp> | ||
| 140 | <boolProp name="HTTPArgument.use_equals">true</boolProp> | ||
| 141 | <stringProp name="Argument.name">method</stringProp> | ||
| 142 | </elementProp> | ||
| 143 | <elementProp name="uid" elementType="HTTPArgument"> | ||
| 144 | <boolProp name="HTTPArgument.always_encode">false</boolProp> | ||
| 145 | <stringProp name="Argument.value">11406869</stringProp> | ||
| 146 | <stringProp name="Argument.metadata">=</stringProp> | ||
| 147 | <boolProp name="HTTPArgument.use_equals">true</boolProp> | ||
| 148 | <stringProp name="Argument.name">uid</stringProp> | ||
| 149 | </elementProp> | ||
| 150 | <elementProp name="imei" elementType="HTTPArgument"> | ||
| 151 | <boolProp name="HTTPArgument.always_encode">false</boolProp> | ||
| 152 | <stringProp name="Argument.value">bc28204e3c3767af81791d485ce8946500a0178e</stringProp> | ||
| 153 | <stringProp name="Argument.metadata">=</stringProp> | ||
| 154 | <boolProp name="HTTPArgument.use_equals">true</boolProp> | ||
| 155 | <stringProp name="Argument.name">imei</stringProp> | ||
| 156 | </elementProp> | ||
| 157 | <elementProp name="version" elementType="HTTPArgument"> | ||
| 158 | <boolProp name="HTTPArgument.always_encode">false</boolProp> | ||
| 159 | <stringProp name="Argument.value">1.21.0</stringProp> | ||
| 160 | <stringProp name="Argument.metadata">=</stringProp> | ||
| 161 | <boolProp name="HTTPArgument.use_equals">true</boolProp> | ||
| 162 | <stringProp name="Argument.name">version</stringProp> | ||
| 163 | </elementProp> | ||
| 164 | <elementProp name="timestamp" elementType="HTTPArgument"> | ||
| 165 | <boolProp name="HTTPArgument.always_encode">false</boolProp> | ||
| 166 | <stringProp name="Argument.value">1597307386807</stringProp> | ||
| 167 | <stringProp name="Argument.metadata">=</stringProp> | ||
| 168 | <boolProp name="HTTPArgument.use_equals">true</boolProp> | ||
| 169 | <stringProp name="Argument.name">timestamp</stringProp> | ||
| 170 | </elementProp> | ||
| 171 | <elementProp name="biz_data" elementType="HTTPArgument"> | ||
| 172 | <boolProp name="HTTPArgument.always_encode">false</boolProp> | ||
| 173 | <stringProp name="Argument.value">cWyDxpfVmCNN1xpI-ESdi3xmf9-Qm9tTRj544CsXtdw=</stringProp> | ||
| 174 | <stringProp name="Argument.metadata">=</stringProp> | ||
| 175 | <boolProp name="HTTPArgument.use_equals">true</boolProp> | ||
| 176 | <stringProp name="Argument.name">biz_data</stringProp> | ||
| 177 | </elementProp> | ||
| 178 | <elementProp name="otaKey" elementType="HTTPArgument"> | ||
| 179 | <boolProp name="HTTPArgument.always_encode">false</boolProp> | ||
| 180 | <stringProp name="Argument.value">e86ce4752ba46a06035db951531caf2d</stringProp> | ||
| 181 | <stringProp name="Argument.metadata">=</stringProp> | ||
| 182 | <boolProp name="HTTPArgument.use_equals">true</boolProp> | ||
| 183 | <stringProp name="Argument.name">otaKey</stringProp> | ||
| 184 | </elementProp> | ||
| 185 | <elementProp name="platform" elementType="HTTPArgument"> | ||
| 186 | <boolProp name="HTTPArgument.always_encode">false</boolProp> | ||
| 187 | <stringProp name="Argument.value">iOS</stringProp> | ||
| 188 | <stringProp name="Argument.metadata">=</stringProp> | ||
| 189 | <boolProp name="HTTPArgument.use_equals">true</boolProp> | ||
| 190 | <stringProp name="Argument.name">platform</stringProp> | ||
| 191 | </elementProp> | ||
| 192 | <elementProp name="sign" elementType="HTTPArgument"> | ||
| 193 | <boolProp name="HTTPArgument.always_encode">false</boolProp> | ||
| 194 | <stringProp name="Argument.value">OGPMX2oEnOU2yVu939EohQ==</stringProp> | ||
| 195 | <stringProp name="Argument.metadata">=</stringProp> | ||
| 196 | <boolProp name="HTTPArgument.use_equals">true</boolProp> | ||
| 197 | <stringProp name="Argument.name">sign</stringProp> | ||
| 198 | </elementProp> | ||
| 199 | <elementProp name="token" elementType="HTTPArgument"> | ||
| 200 | <boolProp name="HTTPArgument.always_encode">false</boolProp> | ||
| 201 | <stringProp name="Argument.value">7HMuJHHSPOsEeuG1_0o9h3QiPursw8WTMejfVG6ba-jJzAmAfONSDElaneEQxRvgdEKps58uaw1LtwRTEcfN2OGrBl1Ar8l6Vwqvj_IBoPTwIa_qPp9WIW71vqLW3qr6Rr6oaAuk2i0elVyL-ygc60jHTQZrJ_b5jU3l_L-VNik=</stringProp> | ||
| 202 | <stringProp name="Argument.metadata">=</stringProp> | ||
| 203 | <boolProp name="HTTPArgument.use_equals">true</boolProp> | ||
| 204 | <stringProp name="Argument.name">token</stringProp> | ||
| 205 | </elementProp> | ||
| 206 | </collectionProp> | ||
| 207 | </elementProp> | ||
| 208 | <stringProp name="HTTPSampler.domain">health.jxbrty.com</stringProp> | ||
| 209 | <stringProp name="HTTPSampler.port"></stringProp> | ||
| 210 | <stringProp name="HTTPSampler.protocol">http</stringProp> | ||
| 211 | <stringProp name="HTTPSampler.contentEncoding"></stringProp> | ||
| 212 | <stringProp name="HTTPSampler.path">/insurance/gateway.do</stringProp> | ||
| 213 | <stringProp name="HTTPSampler.method">POST</stringProp> | ||
| 214 | <boolProp name="HTTPSampler.follow_redirects">true</boolProp> | ||
| 215 | <boolProp name="HTTPSampler.auto_redirects">false</boolProp> | ||
| 216 | <boolProp name="HTTPSampler.use_keepalive">true</boolProp> | ||
| 217 | <boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp> | ||
| 218 | <stringProp name="HTTPSampler.embedded_url_re"></stringProp> | ||
| 219 | <stringProp name="HTTPSampler.connect_timeout"></stringProp> | ||
| 220 | <stringProp name="HTTPSampler.response_timeout"></stringProp> | ||
| 221 | </HTTPSamplerProxy> | ||
| 222 | <hashTree/> | ||
| 223 | <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="首页提示栏-测试" enabled="false"> | ||
| 224 | <elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" testname="用户定义的变量" enabled="true"> | ||
| 225 | <collectionProp name="Arguments.arguments"> | ||
| 226 | <elementProp name="app_id" elementType="HTTPArgument"> | ||
| 227 | <boolProp name="HTTPArgument.always_encode">false</boolProp> | ||
| 228 | <stringProp name="Argument.value">110</stringProp> | ||
| 229 | <stringProp name="Argument.metadata">=</stringProp> | ||
| 230 | <boolProp name="HTTPArgument.use_equals">true</boolProp> | ||
| 231 | <stringProp name="Argument.name">app_id</stringProp> | ||
| 232 | </elementProp> | ||
| 233 | <elementProp name="method" elementType="HTTPArgument"> | ||
| 234 | <boolProp name="HTTPArgument.always_encode">false</boolProp> | ||
| 235 | <stringProp name="Argument.value">com.lejane.handler.user.dynamicanswers</stringProp> | ||
| 236 | <stringProp name="Argument.metadata">=</stringProp> | ||
| 237 | <boolProp name="HTTPArgument.use_equals">true</boolProp> | ||
| 238 | <stringProp name="Argument.name">method</stringProp> | ||
| 239 | </elementProp> | ||
| 240 | <elementProp name="uid" elementType="HTTPArgument"> | ||
| 241 | <boolProp name="HTTPArgument.always_encode">false</boolProp> | ||
| 242 | <stringProp name="Argument.value">5034720</stringProp> | ||
| 243 | <stringProp name="Argument.metadata">=</stringProp> | ||
| 244 | <boolProp name="HTTPArgument.use_equals">true</boolProp> | ||
| 245 | <stringProp name="Argument.name">uid</stringProp> | ||
| 246 | </elementProp> | ||
| 247 | <elementProp name="imei" elementType="HTTPArgument"> | ||
| 248 | <boolProp name="HTTPArgument.always_encode">false</boolProp> | ||
| 249 | <stringProp name="Argument.value">bc28204e3c3767af81791d485ce8946500a0178e</stringProp> | ||
| 250 | <stringProp name="Argument.metadata">=</stringProp> | ||
| 251 | <boolProp name="HTTPArgument.use_equals">true</boolProp> | ||
| 252 | <stringProp name="Argument.name">imei</stringProp> | ||
| 253 | </elementProp> | ||
| 254 | <elementProp name="version" elementType="HTTPArgument"> | ||
| 255 | <boolProp name="HTTPArgument.always_encode">false</boolProp> | ||
| 256 | <stringProp name="Argument.value">1.23.1</stringProp> | ||
| 257 | <stringProp name="Argument.metadata">=</stringProp> | ||
| 258 | <boolProp name="HTTPArgument.use_equals">true</boolProp> | ||
| 259 | <stringProp name="Argument.name">version</stringProp> | ||
| 260 | </elementProp> | ||
| 261 | <elementProp name="timestamp" elementType="HTTPArgument"> | ||
| 262 | <boolProp name="HTTPArgument.always_encode">false</boolProp> | ||
| 263 | <stringProp name="Argument.value">1597660527708</stringProp> | ||
| 264 | <stringProp name="Argument.metadata">=</stringProp> | ||
| 265 | <boolProp name="HTTPArgument.use_equals">true</boolProp> | ||
| 266 | <stringProp name="Argument.name">timestamp</stringProp> | ||
| 267 | </elementProp> | ||
| 268 | <elementProp name="biz_data" elementType="HTTPArgument"> | ||
| 269 | <boolProp name="HTTPArgument.always_encode">false</boolProp> | ||
| 270 | <stringProp name="Argument.value">yRWlD8ZISRaiQ6ZzS7verg==</stringProp> | ||
| 271 | <stringProp name="Argument.metadata">=</stringProp> | ||
| 272 | <boolProp name="HTTPArgument.use_equals">true</boolProp> | ||
| 273 | <stringProp name="Argument.name">biz_data</stringProp> | ||
| 274 | </elementProp> | ||
| 275 | <elementProp name="otaKey" elementType="HTTPArgument"> | ||
| 276 | <boolProp name="HTTPArgument.always_encode">false</boolProp> | ||
| 277 | <stringProp name="Argument.value">e86ce4752ba46a06035db951531caf2d</stringProp> | ||
| 278 | <stringProp name="Argument.metadata">=</stringProp> | ||
| 279 | <boolProp name="HTTPArgument.use_equals">true</boolProp> | ||
| 280 | <stringProp name="Argument.name">otaKey</stringProp> | ||
| 281 | </elementProp> | ||
| 282 | <elementProp name="platform" elementType="HTTPArgument"> | ||
| 283 | <boolProp name="HTTPArgument.always_encode">false</boolProp> | ||
| 284 | <stringProp name="Argument.value">iOS</stringProp> | ||
| 285 | <stringProp name="Argument.metadata">=</stringProp> | ||
| 286 | <boolProp name="HTTPArgument.use_equals">true</boolProp> | ||
| 287 | <stringProp name="Argument.name">platform</stringProp> | ||
| 288 | </elementProp> | ||
| 289 | <elementProp name="sign" elementType="HTTPArgument"> | ||
| 290 | <boolProp name="HTTPArgument.always_encode">false</boolProp> | ||
| 291 | <stringProp name="Argument.value">pwZTITopB9Xy1A-YbgvHHg==</stringProp> | ||
| 292 | <stringProp name="Argument.metadata">=</stringProp> | ||
| 293 | <boolProp name="HTTPArgument.use_equals">true</boolProp> | ||
| 294 | <stringProp name="Argument.name">sign</stringProp> | ||
| 295 | </elementProp> | ||
| 296 | <elementProp name="token" elementType="HTTPArgument"> | ||
| 297 | <boolProp name="HTTPArgument.always_encode">false</boolProp> | ||
| 298 | <stringProp name="Argument.value">oVVeAl2eERPxiU1eY1LXf_nteJusfuDzYFQV3s0zhwQZ2azjBnPJ8Jkfvh2xNP_3RvaxMpX5-x_9EiQLDJ7lZaBXaDd_tsVoLf_PC4eA_No4SbKjzqZq1tcgz3TtlsI_5dLu06D68gEAsOb0_CnBWQ==</stringProp> | ||
| 299 | <stringProp name="Argument.metadata">=</stringProp> | ||
| 300 | <boolProp name="HTTPArgument.use_equals">true</boolProp> | ||
| 301 | <stringProp name="Argument.name">token</stringProp> | ||
| 302 | </elementProp> | ||
| 303 | </collectionProp> | ||
| 304 | </elementProp> | ||
| 305 | <stringProp name="HTTPSampler.domain">health-qa.jxbrty.com</stringProp> | ||
| 306 | <stringProp name="HTTPSampler.port"></stringProp> | ||
| 307 | <stringProp name="HTTPSampler.protocol">http</stringProp> | ||
| 308 | <stringProp name="HTTPSampler.contentEncoding"></stringProp> | ||
| 309 | <stringProp name="HTTPSampler.path">/business/gateway.do</stringProp> | ||
| 310 | <stringProp name="HTTPSampler.method">POST</stringProp> | ||
| 311 | <boolProp name="HTTPSampler.follow_redirects">true</boolProp> | ||
| 312 | <boolProp name="HTTPSampler.auto_redirects">false</boolProp> | ||
| 313 | <boolProp name="HTTPSampler.use_keepalive">true</boolProp> | ||
| 314 | <boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp> | ||
| 315 | <stringProp name="HTTPSampler.embedded_url_re"></stringProp> | ||
| 316 | <stringProp name="HTTPSampler.connect_timeout"></stringProp> | ||
| 317 | <stringProp name="HTTPSampler.response_timeout"></stringProp> | ||
| 318 | </HTTPSamplerProxy> | ||
| 319 | <hashTree/> | ||
| 320 | <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="AI分享列表-测试" enabled="false"> | ||
| 321 | <elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" testname="用户定义的变量" enabled="true"> | ||
| 322 | <collectionProp name="Arguments.arguments"> | ||
| 323 | <elementProp name="app_id" elementType="HTTPArgument"> | ||
| 324 | <boolProp name="HTTPArgument.always_encode">false</boolProp> | ||
| 325 | <stringProp name="Argument.value">110</stringProp> | ||
| 326 | <stringProp name="Argument.metadata">=</stringProp> | ||
| 327 | <boolProp name="HTTPArgument.use_equals">true</boolProp> | ||
| 328 | <stringProp name="Argument.name">app_id</stringProp> | ||
| 329 | </elementProp> | ||
| 330 | <elementProp name="method" elementType="HTTPArgument"> | ||
| 331 | <boolProp name="HTTPArgument.always_encode">false</boolProp> | ||
| 332 | <stringProp name="Argument.value">com.insurance.handler.user.visit.list.query</stringProp> | ||
| 333 | <stringProp name="Argument.metadata">=</stringProp> | ||
| 334 | <boolProp name="HTTPArgument.use_equals">true</boolProp> | ||
| 335 | <stringProp name="Argument.name">method</stringProp> | ||
| 336 | </elementProp> | ||
| 337 | <elementProp name="uid" elementType="HTTPArgument"> | ||
| 338 | <boolProp name="HTTPArgument.always_encode">false</boolProp> | ||
| 339 | <stringProp name="Argument.value">5034720</stringProp> | ||
| 340 | <stringProp name="Argument.metadata">=</stringProp> | ||
| 341 | <boolProp name="HTTPArgument.use_equals">true</boolProp> | ||
| 342 | <stringProp name="Argument.name">uid</stringProp> | ||
| 343 | </elementProp> | ||
| 344 | <elementProp name="imei" elementType="HTTPArgument"> | ||
| 345 | <boolProp name="HTTPArgument.always_encode">false</boolProp> | ||
| 346 | <stringProp name="Argument.value">bc28204e3c3767af81791d485ce8946500a0178e</stringProp> | ||
| 347 | <stringProp name="Argument.metadata">=</stringProp> | ||
| 348 | <boolProp name="HTTPArgument.use_equals">true</boolProp> | ||
| 349 | <stringProp name="Argument.name">imei</stringProp> | ||
| 350 | </elementProp> | ||
| 351 | <elementProp name="version" elementType="HTTPArgument"> | ||
| 352 | <boolProp name="HTTPArgument.always_encode">false</boolProp> | ||
| 353 | <stringProp name="Argument.value">1.23.1</stringProp> | ||
| 354 | <stringProp name="Argument.metadata">=</stringProp> | ||
| 355 | <boolProp name="HTTPArgument.use_equals">true</boolProp> | ||
| 356 | <stringProp name="Argument.name">version</stringProp> | ||
| 357 | </elementProp> | ||
| 358 | <elementProp name="timestamp" elementType="HTTPArgument"> | ||
| 359 | <boolProp name="HTTPArgument.always_encode">false</boolProp> | ||
| 360 | <stringProp name="Argument.value">1597890662805</stringProp> | ||
| 361 | <stringProp name="Argument.metadata">=</stringProp> | ||
| 362 | <boolProp name="HTTPArgument.use_equals">true</boolProp> | ||
| 363 | <stringProp name="Argument.name">timestamp</stringProp> | ||
| 364 | </elementProp> | ||
| 365 | <elementProp name="biz_data" elementType="HTTPArgument"> | ||
| 366 | <boolProp name="HTTPArgument.always_encode">false</boolProp> | ||
| 367 | <stringProp name="Argument.value">8uw1rgLQCc9APu1GKXitGOdM0dkXFZWB01mmy2_8mNitLEFyqbTrxHX7QwYL5v-QfOna2nEeWfzsdnSnX9P-oRu7qVOzU8-prmJePAiAAlk=</stringProp> | ||
| 368 | <stringProp name="Argument.metadata">=</stringProp> | ||
| 369 | <boolProp name="HTTPArgument.use_equals">true</boolProp> | ||
| 370 | <stringProp name="Argument.name">biz_data</stringProp> | ||
| 371 | </elementProp> | ||
| 372 | <elementProp name="otaKey" elementType="HTTPArgument"> | ||
| 373 | <boolProp name="HTTPArgument.always_encode">false</boolProp> | ||
| 374 | <stringProp name="Argument.value">e86ce4752ba46a06035db951531caf2d</stringProp> | ||
| 375 | <stringProp name="Argument.metadata">=</stringProp> | ||
| 376 | <boolProp name="HTTPArgument.use_equals">true</boolProp> | ||
| 377 | <stringProp name="Argument.name">otaKey</stringProp> | ||
| 378 | </elementProp> | ||
| 379 | <elementProp name="platform" elementType="HTTPArgument"> | ||
| 380 | <boolProp name="HTTPArgument.always_encode">false</boolProp> | ||
| 381 | <stringProp name="Argument.value">iOS</stringProp> | ||
| 382 | <stringProp name="Argument.metadata">=</stringProp> | ||
| 383 | <boolProp name="HTTPArgument.use_equals">true</boolProp> | ||
| 384 | <stringProp name="Argument.name">platform</stringProp> | ||
| 385 | </elementProp> | ||
| 386 | <elementProp name="sign" elementType="HTTPArgument"> | ||
| 387 | <boolProp name="HTTPArgument.always_encode">false</boolProp> | ||
| 388 | <stringProp name="Argument.value">ssp6-NB6YhqVnxe4aDFJrw==</stringProp> | ||
| 389 | <stringProp name="Argument.metadata">=</stringProp> | ||
| 390 | <boolProp name="HTTPArgument.use_equals">true</boolProp> | ||
| 391 | <stringProp name="Argument.name">sign</stringProp> | ||
| 392 | </elementProp> | ||
| 393 | <elementProp name="token" elementType="HTTPArgument"> | ||
| 394 | <boolProp name="HTTPArgument.always_encode">false</boolProp> | ||
| 395 | <stringProp name="Argument.value">oVVeAl2eERPxiU1eY1LXf_nteJusfuDzYFQV3s0zhwQZ2azjBnPJ8Jkfvh2xNP_3RvaxMpX5-x_9EiQLDJ7lZaBXaDd_tsVoLf_PC4eA_No4SbKjzqZq1tcgz3TtlsI_kA-O9MisQ_CRVM523CPyPQ==</stringProp> | ||
| 396 | <stringProp name="Argument.metadata">=</stringProp> | ||
| 397 | <boolProp name="HTTPArgument.use_equals">true</boolProp> | ||
| 398 | <stringProp name="Argument.name">token</stringProp> | ||
| 399 | </elementProp> | ||
| 400 | </collectionProp> | ||
| 401 | </elementProp> | ||
| 402 | <stringProp name="HTTPSampler.domain">health-qa.jxbrty.com</stringProp> | ||
| 403 | <stringProp name="HTTPSampler.port"></stringProp> | ||
| 404 | <stringProp name="HTTPSampler.protocol">http</stringProp> | ||
| 405 | <stringProp name="HTTPSampler.contentEncoding"></stringProp> | ||
| 406 | <stringProp name="HTTPSampler.path">/insurance/gateway.do</stringProp> | ||
| 407 | <stringProp name="HTTPSampler.method">POST</stringProp> | ||
| 408 | <boolProp name="HTTPSampler.follow_redirects">true</boolProp> | ||
| 409 | <boolProp name="HTTPSampler.auto_redirects">false</boolProp> | ||
| 410 | <boolProp name="HTTPSampler.use_keepalive">true</boolProp> | ||
| 411 | <boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp> | ||
| 412 | <stringProp name="HTTPSampler.embedded_url_re"></stringProp> | ||
| 413 | <stringProp name="HTTPSampler.connect_timeout"></stringProp> | ||
| 414 | <stringProp name="HTTPSampler.response_timeout"></stringProp> | ||
| 415 | </HTTPSamplerProxy> | ||
| 416 | <hashTree/> | ||
| 417 | <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="AI分享列表-线上" enabled="false"> | ||
| 418 | <elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" testname="用户定义的变量" enabled="true"> | ||
| 419 | <collectionProp name="Arguments.arguments"> | ||
| 420 | <elementProp name="app_id" elementType="HTTPArgument"> | ||
| 421 | <boolProp name="HTTPArgument.always_encode">false</boolProp> | ||
| 422 | <stringProp name="Argument.value">110</stringProp> | ||
| 423 | <stringProp name="Argument.metadata">=</stringProp> | ||
| 424 | <boolProp name="HTTPArgument.use_equals">true</boolProp> | ||
| 425 | <stringProp name="Argument.name">app_id</stringProp> | ||
| 426 | </elementProp> | ||
| 427 | <elementProp name="method" elementType="HTTPArgument"> | ||
| 428 | <boolProp name="HTTPArgument.always_encode">false</boolProp> | ||
| 429 | <stringProp name="Argument.value">com.insurance.handler.user.visit.list.query</stringProp> | ||
| 430 | <stringProp name="Argument.metadata">=</stringProp> | ||
| 431 | <boolProp name="HTTPArgument.use_equals">true</boolProp> | ||
| 432 | <stringProp name="Argument.name">method</stringProp> | ||
| 433 | </elementProp> | ||
| 434 | <elementProp name="uid" elementType="HTTPArgument"> | ||
| 435 | <boolProp name="HTTPArgument.always_encode">false</boolProp> | ||
| 436 | <stringProp name="Argument.value">11406869</stringProp> | ||
| 437 | <stringProp name="Argument.metadata">=</stringProp> | ||
| 438 | <boolProp name="HTTPArgument.use_equals">true</boolProp> | ||
| 439 | <stringProp name="Argument.name">uid</stringProp> | ||
| 440 | </elementProp> | ||
| 441 | <elementProp name="imei" elementType="HTTPArgument"> | ||
| 442 | <boolProp name="HTTPArgument.always_encode">false</boolProp> | ||
| 443 | <stringProp name="Argument.value">bc28204e3c3767af81791d485ce8946500a0178e</stringProp> | ||
| 444 | <stringProp name="Argument.metadata">=</stringProp> | ||
| 445 | <boolProp name="HTTPArgument.use_equals">true</boolProp> | ||
| 446 | <stringProp name="Argument.name">imei</stringProp> | ||
| 447 | </elementProp> | ||
| 448 | <elementProp name="version" elementType="HTTPArgument"> | ||
| 449 | <boolProp name="HTTPArgument.always_encode">false</boolProp> | ||
| 450 | <stringProp name="Argument.value">1.21.0</stringProp> | ||
| 451 | <stringProp name="Argument.metadata">=</stringProp> | ||
| 452 | <boolProp name="HTTPArgument.use_equals">true</boolProp> | ||
| 453 | <stringProp name="Argument.name">version</stringProp> | ||
| 454 | </elementProp> | ||
| 455 | <elementProp name="timestamp" elementType="HTTPArgument"> | ||
| 456 | <boolProp name="HTTPArgument.always_encode">false</boolProp> | ||
| 457 | <stringProp name="Argument.value">1597894424672</stringProp> | ||
| 458 | <stringProp name="Argument.metadata">=</stringProp> | ||
| 459 | <boolProp name="HTTPArgument.use_equals">true</boolProp> | ||
| 460 | <stringProp name="Argument.name">timestamp</stringProp> | ||
| 461 | </elementProp> | ||
| 462 | <elementProp name="biz_data" elementType="HTTPArgument"> | ||
| 463 | <boolProp name="HTTPArgument.always_encode">false</boolProp> | ||
| 464 | <stringProp name="Argument.value">L1XohzuIVUnqxJD-D5F8uhFPrqCU6NwX-NYla2pDIOsRt7F62MQpgztbN4WefLBJHrUD0JJ8f8Z2y8WhqdiVv6uMsrYbuX7aF5F_myPVego=</stringProp> | ||
| 465 | <stringProp name="Argument.metadata">=</stringProp> | ||
| 466 | <boolProp name="HTTPArgument.use_equals">true</boolProp> | ||
| 467 | <stringProp name="Argument.name">biz_data</stringProp> | ||
| 468 | </elementProp> | ||
| 469 | <elementProp name="otaKey" elementType="HTTPArgument"> | ||
| 470 | <boolProp name="HTTPArgument.always_encode">false</boolProp> | ||
| 471 | <stringProp name="Argument.value">e86ce4752ba46a06035db951531caf2d</stringProp> | ||
| 472 | <stringProp name="Argument.metadata">=</stringProp> | ||
| 473 | <boolProp name="HTTPArgument.use_equals">true</boolProp> | ||
| 474 | <stringProp name="Argument.name">otaKey</stringProp> | ||
| 475 | </elementProp> | ||
| 476 | <elementProp name="platform" elementType="HTTPArgument"> | ||
| 477 | <boolProp name="HTTPArgument.always_encode">false</boolProp> | ||
| 478 | <stringProp name="Argument.value">iOS</stringProp> | ||
| 479 | <stringProp name="Argument.metadata">=</stringProp> | ||
| 480 | <boolProp name="HTTPArgument.use_equals">true</boolProp> | ||
| 481 | <stringProp name="Argument.name">platform</stringProp> | ||
| 482 | </elementProp> | ||
| 483 | <elementProp name="sign" elementType="HTTPArgument"> | ||
| 484 | <boolProp name="HTTPArgument.always_encode">false</boolProp> | ||
| 485 | <stringProp name="Argument.value">k1U8XaNF6gXsXic1PsdyXg==</stringProp> | ||
| 486 | <stringProp name="Argument.metadata">=</stringProp> | ||
| 487 | <boolProp name="HTTPArgument.use_equals">true</boolProp> | ||
| 488 | <stringProp name="Argument.name">sign</stringProp> | ||
| 489 | </elementProp> | ||
| 490 | <elementProp name="token" elementType="HTTPArgument"> | ||
| 491 | <boolProp name="HTTPArgument.always_encode">false</boolProp> | ||
| 492 | <stringProp name="Argument.value">7HMuJHHSPOsEeuG1_0o9h3QiPursw8WTMejfVG6ba-jJzAmAfONSDElaneEQxRvgdEKps58uaw1LtwRTEcfN2OGrBl1Ar8l6Vwqvj_IBoPTwIa_qPp9WIW71vqLW3qr60Uws_RkxN8khE6GjXIUcekjHTQZrJ_b5jU3l_L-VNik=</stringProp> | ||
| 493 | <stringProp name="Argument.metadata">=</stringProp> | ||
| 494 | <boolProp name="HTTPArgument.use_equals">true</boolProp> | ||
| 495 | <stringProp name="Argument.name">token</stringProp> | ||
| 496 | </elementProp> | ||
| 497 | </collectionProp> | ||
| 498 | </elementProp> | ||
| 499 | <stringProp name="HTTPSampler.domain">health.jxbrty.com</stringProp> | ||
| 500 | <stringProp name="HTTPSampler.port"></stringProp> | ||
| 501 | <stringProp name="HTTPSampler.protocol">http</stringProp> | ||
| 502 | <stringProp name="HTTPSampler.contentEncoding"></stringProp> | ||
| 503 | <stringProp name="HTTPSampler.path">/insurance/gateway.do</stringProp> | ||
| 504 | <stringProp name="HTTPSampler.method">POST</stringProp> | ||
| 505 | <boolProp name="HTTPSampler.follow_redirects">true</boolProp> | ||
| 506 | <boolProp name="HTTPSampler.auto_redirects">false</boolProp> | ||
| 507 | <boolProp name="HTTPSampler.use_keepalive">true</boolProp> | ||
| 508 | <boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp> | ||
| 509 | <stringProp name="HTTPSampler.embedded_url_re"></stringProp> | ||
| 510 | <stringProp name="HTTPSampler.connect_timeout"></stringProp> | ||
| 511 | <stringProp name="HTTPSampler.response_timeout"></stringProp> | ||
| 512 | </HTTPSamplerProxy> | ||
| 513 | <hashTree/> | ||
| 514 | <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="测试接口" enabled="true"> | ||
| 515 | <elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" testname="用户定义的变量" enabled="true"> | ||
| 516 | <collectionProp name="Arguments.arguments"> | ||
| 517 | <elementProp name="app_id" elementType="HTTPArgument"> | ||
| 518 | <boolProp name="HTTPArgument.always_encode">false</boolProp> | ||
| 519 | <stringProp name="Argument.value">110</stringProp> | ||
| 520 | <stringProp name="Argument.metadata">=</stringProp> | ||
| 521 | <boolProp name="HTTPArgument.use_equals">true</boolProp> | ||
| 522 | <stringProp name="Argument.name">app_id</stringProp> | ||
| 523 | </elementProp> | ||
| 524 | <elementProp name="method" elementType="HTTPArgument"> | ||
| 525 | <boolProp name="HTTPArgument.always_encode">false</boolProp> | ||
| 526 | <stringProp name="Argument.value">com.insurance.handler.user.visit.share.save</stringProp> | ||
| 527 | <stringProp name="Argument.metadata">=</stringProp> | ||
| 528 | <boolProp name="HTTPArgument.use_equals">true</boolProp> | ||
| 529 | <stringProp name="Argument.name">method</stringProp> | ||
| 530 | </elementProp> | ||
| 531 | <elementProp name="uid" elementType="HTTPArgument"> | ||
| 532 | <boolProp name="HTTPArgument.always_encode">false</boolProp> | ||
| 533 | <stringProp name="Argument.value">5034720</stringProp> | ||
| 534 | <stringProp name="Argument.metadata">=</stringProp> | ||
| 535 | <boolProp name="HTTPArgument.use_equals">true</boolProp> | ||
| 536 | <stringProp name="Argument.name">uid</stringProp> | ||
| 537 | </elementProp> | ||
| 538 | <elementProp name="imei" elementType="HTTPArgument"> | ||
| 539 | <boolProp name="HTTPArgument.always_encode">false</boolProp> | ||
| 540 | <stringProp name="Argument.value">bc28204e3c3767af81791d485ce8946500a0178e</stringProp> | ||
| 541 | <stringProp name="Argument.metadata">=</stringProp> | ||
| 542 | <boolProp name="HTTPArgument.use_equals">true</boolProp> | ||
| 543 | <stringProp name="Argument.name">imei</stringProp> | ||
| 544 | </elementProp> | ||
| 545 | <elementProp name="version" elementType="HTTPArgument"> | ||
| 546 | <boolProp name="HTTPArgument.always_encode">false</boolProp> | ||
| 547 | <stringProp name="Argument.value">1.23.1</stringProp> | ||
| 548 | <stringProp name="Argument.metadata">=</stringProp> | ||
| 549 | <boolProp name="HTTPArgument.use_equals">true</boolProp> | ||
| 550 | <stringProp name="Argument.name">version</stringProp> | ||
| 551 | </elementProp> | ||
| 552 | <elementProp name="timestamp" elementType="HTTPArgument"> | ||
| 553 | <boolProp name="HTTPArgument.always_encode">false</boolProp> | ||
| 554 | <stringProp name="Argument.value">1600331612118</stringProp> | ||
| 555 | <stringProp name="Argument.metadata">=</stringProp> | ||
| 556 | <boolProp name="HTTPArgument.use_equals">true</boolProp> | ||
| 557 | <stringProp name="Argument.name">timestamp</stringProp> | ||
| 558 | </elementProp> | ||
| 559 | <elementProp name="biz_data" elementType="HTTPArgument"> | ||
| 560 | <boolProp name="HTTPArgument.always_encode">false</boolProp> | ||
| 561 | <stringProp name="Argument.value">1m_uGlY1EJm_XrECDJLOttkDLyiOLFSO7yv6bbWh7rk=</stringProp> | ||
| 562 | <stringProp name="Argument.metadata">=</stringProp> | ||
| 563 | <boolProp name="HTTPArgument.use_equals">true</boolProp> | ||
| 564 | <stringProp name="Argument.name">biz_data</stringProp> | ||
| 565 | </elementProp> | ||
| 566 | <elementProp name="otaKey" elementType="HTTPArgument"> | ||
| 567 | <boolProp name="HTTPArgument.always_encode">false</boolProp> | ||
| 568 | <stringProp name="Argument.value">e86ce4752ba46a06035db951531caf2d</stringProp> | ||
| 569 | <stringProp name="Argument.metadata">=</stringProp> | ||
| 570 | <boolProp name="HTTPArgument.use_equals">true</boolProp> | ||
| 571 | <stringProp name="Argument.name">otaKey</stringProp> | ||
| 572 | </elementProp> | ||
| 573 | <elementProp name="platform" elementType="HTTPArgument"> | ||
| 574 | <boolProp name="HTTPArgument.always_encode">false</boolProp> | ||
| 575 | <stringProp name="Argument.value">iOS</stringProp> | ||
| 576 | <stringProp name="Argument.metadata">=</stringProp> | ||
| 577 | <boolProp name="HTTPArgument.use_equals">true</boolProp> | ||
| 578 | <stringProp name="Argument.name">platform</stringProp> | ||
| 579 | </elementProp> | ||
| 580 | <elementProp name="sign" elementType="HTTPArgument"> | ||
| 581 | <boolProp name="HTTPArgument.always_encode">false</boolProp> | ||
| 582 | <stringProp name="Argument.value">BsPiCJTJ1FfJ9q8XhOsNHg==</stringProp> | ||
| 583 | <stringProp name="Argument.metadata">=</stringProp> | ||
| 584 | <boolProp name="HTTPArgument.use_equals">true</boolProp> | ||
| 585 | <stringProp name="Argument.name">sign</stringProp> | ||
| 586 | </elementProp> | ||
| 587 | <elementProp name="token" elementType="HTTPArgument"> | ||
| 588 | <boolProp name="HTTPArgument.always_encode">false</boolProp> | ||
| 589 | <stringProp name="Argument.value">oVVeAl2eERPxiU1eY1LXf_nteJusfuDzYFQV3s0zhwRwQt1gyo-W13JiPaxE0msWRHSV_3cCrGXbdLUFZjHmJJrPWj4a1hYY2oTWgD2gbgelxZrHQ9D_U9ms-k7LX9Br8SeYfdhUJImw_x_YTEViMw==</stringProp> | ||
| 590 | <stringProp name="Argument.metadata">=</stringProp> | ||
| 591 | <boolProp name="HTTPArgument.use_equals">true</boolProp> | ||
| 592 | <stringProp name="Argument.name">token</stringProp> | ||
| 593 | </elementProp> | ||
| 594 | </collectionProp> | ||
| 595 | </elementProp> | ||
| 596 | <stringProp name="HTTPSampler.domain">health-qa.jxbrty.com</stringProp> | ||
| 597 | <stringProp name="HTTPSampler.port"></stringProp> | ||
| 598 | <stringProp name="HTTPSampler.protocol">http</stringProp> | ||
| 599 | <stringProp name="HTTPSampler.contentEncoding"></stringProp> | ||
| 600 | <stringProp name="HTTPSampler.path">/insurance/gateway.do</stringProp> | ||
| 601 | <stringProp name="HTTPSampler.method">POST</stringProp> | ||
| 602 | <boolProp name="HTTPSampler.follow_redirects">true</boolProp> | ||
| 603 | <boolProp name="HTTPSampler.auto_redirects">false</boolProp> | ||
| 604 | <boolProp name="HTTPSampler.use_keepalive">true</boolProp> | ||
| 605 | <boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp> | ||
| 606 | <stringProp name="HTTPSampler.embedded_url_re"></stringProp> | ||
| 607 | <stringProp name="HTTPSampler.connect_timeout"></stringProp> | ||
| 608 | <stringProp name="HTTPSampler.response_timeout"></stringProp> | ||
| 609 | </HTTPSamplerProxy> | ||
| 610 | <hashTree/> | ||
| 611 | <ResultCollector guiclass="StatVisualizer" testclass="ResultCollector" testname="聚合报告" enabled="true"> | ||
| 612 | <boolProp name="ResultCollector.error_logging">false</boolProp> | ||
| 613 | <objProp> | ||
| 614 | <name>saveConfig</name> | ||
| 615 | <value class="SampleSaveConfiguration"> | ||
| 616 | <time>true</time> | ||
| 617 | <latency>true</latency> | ||
| 618 | <timestamp>true</timestamp> | ||
| 619 | <success>true</success> | ||
| 620 | <label>true</label> | ||
| 621 | <code>true</code> | ||
| 622 | <message>true</message> | ||
| 623 | <threadName>true</threadName> | ||
| 624 | <dataType>true</dataType> | ||
| 625 | <encoding>false</encoding> | ||
| 626 | <assertions>true</assertions> | ||
| 627 | <subresults>true</subresults> | ||
| 628 | <responseData>false</responseData> | ||
| 629 | <samplerData>false</samplerData> | ||
| 630 | <xml>false</xml> | ||
| 631 | <fieldNames>true</fieldNames> | ||
| 632 | <responseHeaders>false</responseHeaders> | ||
| 633 | <requestHeaders>false</requestHeaders> | ||
| 634 | <responseDataOnError>false</responseDataOnError> | ||
| 635 | <saveAssertionResultsFailureMessage>true</saveAssertionResultsFailureMessage> | ||
| 636 | <assertionsResultsToSave>0</assertionsResultsToSave> | ||
| 637 | <bytes>true</bytes> | ||
| 638 | <sentBytes>true</sentBytes> | ||
| 639 | <url>true</url> | ||
| 640 | <threadCounts>true</threadCounts> | ||
| 641 | <idleTime>true</idleTime> | ||
| 642 | <connectTime>true</connectTime> | ||
| 643 | </value> | ||
| 644 | </objProp> | ||
| 645 | <stringProp name="filename"></stringProp> | ||
| 646 | </ResultCollector> | ||
| 647 | <hashTree/> | ||
| 648 | <ResultCollector guiclass="ViewResultsFullVisualizer" testclass="ResultCollector" testname="察看结果树" enabled="true"> | ||
| 649 | <boolProp name="ResultCollector.error_logging">false</boolProp> | ||
| 650 | <objProp> | ||
| 651 | <name>saveConfig</name> | ||
| 652 | <value class="SampleSaveConfiguration"> | ||
| 653 | <time>true</time> | ||
| 654 | <latency>true</latency> | ||
| 655 | <timestamp>true</timestamp> | ||
| 656 | <success>true</success> | ||
| 657 | <label>true</label> | ||
| 658 | <code>true</code> | ||
| 659 | <message>true</message> | ||
| 660 | <threadName>true</threadName> | ||
| 661 | <dataType>true</dataType> | ||
| 662 | <encoding>false</encoding> | ||
| 663 | <assertions>true</assertions> | ||
| 664 | <subresults>true</subresults> | ||
| 665 | <responseData>false</responseData> | ||
| 666 | <samplerData>false</samplerData> | ||
| 667 | <xml>false</xml> | ||
| 668 | <fieldNames>true</fieldNames> | ||
| 669 | <responseHeaders>false</responseHeaders> | ||
| 670 | <requestHeaders>false</requestHeaders> | ||
| 671 | <responseDataOnError>false</responseDataOnError> | ||
| 672 | <saveAssertionResultsFailureMessage>true</saveAssertionResultsFailureMessage> | ||
| 673 | <assertionsResultsToSave>0</assertionsResultsToSave> | ||
| 674 | <bytes>true</bytes> | ||
| 675 | <sentBytes>true</sentBytes> | ||
| 676 | <url>true</url> | ||
| 677 | <threadCounts>true</threadCounts> | ||
| 678 | <idleTime>true</idleTime> | ||
| 679 | <connectTime>true</connectTime> | ||
| 680 | </value> | ||
| 681 | </objProp> | ||
| 682 | <stringProp name="filename"></stringProp> | ||
| 683 | </ResultCollector> | ||
| 684 | <hashTree/> | ||
| 685 | </hashTree> | ||
| 686 | </hashTree> | ||
| 687 | </hashTree> | ||
| 688 | </jmeterTestPlan> |
This diff could not be displayed because it is too large.
jmeterTool/src/main/resources/活动接口压测.jmx
0 → 100644
This diff could not be displayed because it is too large.
-
Please register or sign in to post a comment