Highlighted
Regular Contributor.
Regular Contributor.
245 views

web_rest function call

I'm wondering if anyone knows why VUGEN is showing the deconded JSON data in the snapshot pane but in reality an encrypted data stream is being sent.  I would like to decrypt the payload being returned like Vugen is doing but can't figure out how to do it. I need to do some text checking.

This is what the snapshot is showing:

{"LoginId":"MobileUser02","ShortUserId":"C0002PJP","FirstName":"Mobile","LastName":"User02","Prefix":"","MiddleName":"","Suffix":"","PhoneNumber":"8417422345","EmailAddress":"eric_waller@cinfin.com","Policies":[{"Id":411020,"Number":"A01 0404642","Status":"A","AgencyCode":"15747","CustomerCareCenter":null,"Agents":[{"Id":2478591,"AgencyCode":"15747","LocationName":"Cobbs Allen","Address":{"AddressLine1":"7300 College Boulevard Ste 300","AddressLine2":null,"City":"Overland Park","StateAbbreviation":"KS","Country":null,"County":null,"ZipCode":"66210-1879"},"Phone":"913-267-5600","Url":"http://www.cobbsallen.com","Email":"webmaster@cinfin.com","CoveragesOffered":"Business - Excess & Surplus - Life","Latitude":"38.929072","Longitude":"-94.6735","GeoCodingQuality":"","LastUpdatedDate":"2018-03-01T00:00:00"}],"Vehicles":[{"PolicyImageNumber":1,"Number":1,"DisplayNumber":1,"EffectiveDate":"2018-10-19T00:00:00","ExpirationDate":"2019-10-19T00:00:00","ProcessedDate":"2018-10-19T00:01:00","Make":"ACURA","Model":"TL","Year":2007,"Vin":"19UUA662879999999","Active":true}],"AmountDue":5.00,"BaAmountDue":5.00,"DiamondClientId":408377,"BillingAccountId":400420.0,"Address":{"AddressLine1":"","AddressLine2":"","City":"","StateAbbreviation":"","Country":null,"County":null,"ZipCode":""},"BillingAddress":{"AddressLine1":"3317 LIBERTY ST  ","AddressLine2":null,"City":"ERIE","StateAbbreviation":"PA","Country":null,"County":null,"ZipCode":"16508-2558"},"PolicyholderAddress":{"AddressLine1":"3317  LIBERTY ST","AddressLine2":null,"City":"ERIE","StateAbbreviation":"PA","Country":null,"County":null,"ZipCode":"16508"},"RiskAddress":{"AddressLine1":"3317  LIBERTY ST","AddressLine2":null,"City":"ERIE","StateAbbreviation":"PA","Country":null,"County":null,"ZipCode":"16508"},"BillMethod":"Direct Bill","DueDate":"2018-12-04T00:00:00","InvoiceDate":"2018-06-25T00:00:00","BaDueDate":"2018-11-18T00:00:00","BaInvoiceDate":"2018-10-19T00:00:00","PayPlan":"Annual","PolicyholderFirstName":"","PolicyholderLastName":"","CustomerCareCenterIndicator":false},{"Id":411054,"Number":"H01 0404642","Status":"A","AgencyCode":"15747","CustomerCareCenter":null,"Agents":[{"Id":2478591,"AgencyCode":"15747","LocationName":"Cobbs Allen","Address":{"AddressLine1":"7300 College Boulevard Ste 300","AddressLine2":null,"City":"Overland Park","StateAbbreviation":"KS","Country":null,"County":null,"ZipCode":"66210-1879"},"Phone":"913-267-5600","Url":"http://www.cobbsallen.com","Email":"webmaster@cinfin.com","CoveragesOffered":"Business - Excess & Surplus - Life","Latitude":"38.929072","Longitude":"-94.6735","GeoCodingQuality":"","LastUpdatedDate":"2018-03-01T00:00:00"}],"Vehicles":null,"AmountDue":0.00,"BaAmountDue":5.00,"DiamondClientId":408377,"BillingAccountId":400420.0,"Address":{"AddressLine1":"","AddressLine2":"","City":"","StateAbbreviation":"","Country":null,"County":null,"ZipCode":""},"BillingAddress":{"AddressLine1":"3317 LIBERTY ST  ","AddressLine2":null,"City":"ERIE","StateAbbreviation":"PA","Country":null,"County":null,"ZipCode":"16508-2558"},"PolicyholderAddress":{"AddressLine1":"3317  LIBERTY ST","AddressLine2":null,"City":"ERIE","StateAbbreviation":"PA","Country":null,"County":null,"ZipCode":"16508"},"RiskAddress":{"AddressLine1":"3317  LIBERTY ST","AddressLine2":null,"City":"ERIE","StateAbbreviation":"PA","Country":null,"County":null,"ZipCode":"16508"},"BillMethod":"Direct Bill","DueDate":"2018-11-18T00:00:00","InvoiceDate":"2018-06-25T00:00:00","BaDueDate":"2018-11-18T00:00:00","BaInvoiceDate":"2018-10-19T00:00:00","PayPlan":"Annual","PolicyholderFirstName":"","PolicyholderLastName":"","CustomerCareCenterIndicator":false},{"Id":411068,"Number":"I01 0404642","Status":"A","AgencyCode":"15747","CustomerCareCenter":null,"Agents":[{"Id":2478591,"AgencyCode":"15747","LocationName":"Cobbs Allen","Address":{"AddressLine1":"7300 College Boulevard Ste 300","AddressLine2":null,"City":"Overland Park","StateAbbreviation":"KS","Country":null,"County":null,"ZipCode":"66210-1879"},"Phone":"913-267-5600","Url":"http://www.cobbsallen.com","Email":"webmaster@cinfin.com","CoveragesOffered":"Business - Excess & Surplus - Life","Latitude":"38.929072","Longitude":"-94.6735","GeoCodingQuality":"","LastUpdatedDate":"2018-03-01T00:00:00"}],"Vehicles":null,"AmountDue":0.00,"BaAmountDue":5.00,"DiamondClientId":408377,"BillingAccountId":400420.0,"Address":{"AddressLine1":"","AddressLine2":"","City":"","StateAbbreviation":"","Country":null,"County":null,"ZipCode":""},"BillingAddress":{"AddressLine1":"3317 LIBERTY ST  ","AddressLine2":null,"City":"ERIE","StateAbbreviation":"PA","Country":null,"County":null,"ZipCode":"16508-2558"},"PolicyholderAddress":{"AddressLine1":"3317  LIBERTY ST","AddressLine2":null,"City":"ERIE","StateAbbreviation":"PA","Country":null,"County":null,"ZipCode":"16508"},"RiskAddress":{"AddressLine1":"3317  LIBERTY ST","AddressLine2":null,"City":"ERIE","StateAbbreviation":"PA","Country":null,"County":null,"ZipCode":"16508"},"BillMethod":"Direct Bill","DueDate":"2018-11-18T00:00:00","InvoiceDate":"2018-06-25T00:00:00","BaDueDate":"2018-11-18T00:00:00","BaInvoiceDate":"2018-10-19T00:00:00","PayPlan":"Annual","PolicyholderFirstName":"","PolicyholderLastName":"","CustomerCareCenterIndicator":false},{"Id":411085,"Number":"U01 0404642","Status":"A","AgencyCode":"15747","CustomerCareCenter":null,"Agents":[{"Id":2478591,"AgencyCode":"15747","LocationName":"Cobbs Allen","Address":{"AddressLine1":"7300 College Boulevard Ste 300","AddressLine2":null,"City":"Overland Park","StateAbbreviation":"KS","Country":null,"County":null,"ZipCode":"66210-1879"},"Phone":"913-267-5600","Url":"http://www.cobbsallen.com","Email":"webmaster@cinfin.com","CoveragesOffered":"Business - Excess & Surplus - Life","Latitude":"38.929072","Longitude":"-94.6735","GeoCodingQuality":"","LastUpdatedDate":"2018-03-01T00:00:00"}],"Vehicles":null,"AmountDue":0.00,"BaAmountDue":5.00,"DiamondClientId":408377,"BillingAccountId":400420.0,"Address":{"AddressLine1":"","AddressLine2":"","City":"","StateAbbreviation":"","Country":null,"County":null,"ZipCode":""},"BillingAddress":{"AddressLine1":"3317 LIBERTY ST  ","AddressLine2":null,"City":"ERIE","StateAbbreviation":"PA","Country":null,"County":null,"ZipCode":"16508-2558"},"PolicyholderAddress":{"AddressLine1":"3317  LIBERTY ST","AddressLine2":null,"City":"ERIE","StateAbbreviation":"PA","Country":null,"County":null,"ZipCode":"16508"},"RiskAddress":{"AddressLine1":"3317  LIBERTY ST","AddressLine2":null,"City":"ERIE","StateAbbreviation":"PA","Country":null,"County":null,"ZipCode":"16508"},"BillMethod":"Direct Bill","DueDate":"2018-11-18T00:00:00","InvoiceDate":"2018-06-25T00:00:00","BaDueDate":"2018-11-18T00:00:00","BaInvoiceDate":"2018-10-19T00:00:00","PayPlan":"Semi Annual","PolicyholderFirstName":"","PolicyholderLastName":"","CustomerCareCenterIndicator":false},{"Id":411036,"Number":"D01 0404642","Status":"A","AgencyCode":"15747","CustomerCareCenter":null,"Agents":[{"Id":2478591,"AgencyCode":"15747","LocationName":"Cobbs Allen","Address":{"AddressLine1":"7300 College Boulevard Ste 300","AddressLine2":null,"City":"Overland Park","StateAbbreviation":"KS","Country":null,"County":null,"ZipCode":"66210-1879"},"Phone":"913-267-5600","Url":"http://www.cobbsallen.com","Email":"webmaster@cinfin.com","CoveragesOffered":"Business - Excess & Surplus - Life","Latitude":"38.929072","Longitude":"-94.6735","GeoCodingQuality":"","LastUpdatedDate":"2018-03-01T00:00:00"}],"Vehicles":null,"AmountDue":0.00,"BaAmountDue":5.00,"DiamondClientId":408377,"BillingAccountId":400420.0,"Address":{"AddressLine1":"","AddressLine2":"","City":"","StateAbbreviation":"","Country":null,"County":null,"ZipCode":""},"BillingAddress":{"AddressLine1":"3317 LIBERTY ST  ","AddressLine2":null,"City":"ERIE","StateAbbreviation":"PA","Country":null,"County":null,"ZipCode":"16508-2558"},"PolicyholderAddress":{"AddressLine1":"3317  LIBERTY ST","AddressLine2":null,"City":"ERIE","StateAbbreviation":"PA","Country":null,"County":null,"ZipCode":"16508"},"RiskAddress":{"AddressLine1":"3317  LIBERTY ST","AddressLine2":null,"City":"ERIE","StateAbbreviation":"PA","Country":null,"County":null,"ZipCode":"16508"},"BillMethod":"Direct Bill","DueDate":"2018-11-18T00:00:00","InvoiceDate":"2018-06-25T00:00:00","BaDueDate":"2018-11-18T00:00:00","BaInvoiceDate":"2018-10-19T00:00:00","PayPlan":"Quarterly Pay","PolicyholderFirstName":"","PolicyholderLastName":"","CustomerCareCenterIndicator":false},{"Id":411101,"Number":"W01 0404642","Status":"A","AgencyCode":"15747","CustomerCareCenter":null,"Agents":[{"Id":2478591,"AgencyCode":"15747","LocationName":"Cobbs Allen","Address":{"AddressLine1":"7300 College Boulevard Ste 300","AddressLine2":null,"City":"Overland Park","StateAbbreviation":"KS","Country":null,"County":null,"ZipCode":"66210-1879"},"Phone":"913-267-5600","Url":"http://www.cobbsallen.com","Email":"webmaster@cinfin.com","CoveragesOffered":"Business - Excess & Surplus - Life","Latitude":"38.929072","Longitude":"-94.6735","GeoCodingQuality":"","LastUpdatedDate":"2018-03-01T00:00:00"}],"Vehicles":null,"AmountDue":0.00,"BaAmountDue":5.00,"DiamondClientId":408377,"BillingAccountId":400420.0,"Address":{"AddressLine1":"","AddressLine2":"","City":"","StateAbbreviation":"","Country":null,"County":null,"ZipCode":""},"BillingAddress":{"AddressLine1":"3317 LIBERTY ST  ","AddressLine2":null,"City":"ERIE","StateAbbreviation":"PA","Country":null,"County":null,"ZipCode":"16508-2558"},"PolicyholderAddress":{"AddressLine1":"3317  LIBERTY ST","AddressLine2":null,"City":"ERIE","StateAbbreviation":"PA","Country":null,"County":null,"ZipCode":"16508"},"RiskAddress":{"AddressLine1":"3317  LIBERTY ST","AddressLine2":null,"City":"ERIE","StateAbbreviation":"PA","Country":null,"County":null,"ZipCode":"16508"},"BillMethod":"Direct Bill","DueDate":"2018-11-18T00:00:00","InvoiceDate":"2018-06-25T00:00:00","BaDueDate":"2018-11-18T00:00:00","BaInvoiceDate":"2018-10-19T00:00:00","PayPlan":"Semi Annual","PolicyholderFirstName":"","PolicyholderLastName":"","CustomerCareCenterIndicator":false}],"DeliveryPreferences":[{"DeliveryScope":1,"DeliveryType":2,"LegalTermsAccepted":true},{"DeliveryScope":2,"DeliveryType":2,"LegalTermsAccepted":true}],"GetPolicyNumberDocumentsViewModels":null}

 

This is a snippet of the actual payload being sent from the server: As you can see it is encrypted.

Action.c(45): t=2394ms: 3136-byte response body for "http://sharedservices.cinf.net/CIC.B2CAPIS/1.0/api/Payment/Mobile/RegisteredUserPayment/APPLE?appName=B2CAPIS" (RelFrameId=1, Internal ID=2)
Action.c(45): <RegisteredUserPaymentViewModel xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns=
Action.c(45): "http://schemas.datacontract.org/2004/07/CIC.SharedServices.B2CAPIS.Models.ViewModels"><Tr
Action.c(45): ansactionData>11E0F9BCD550D9D7540E37D2CB6CFD5CEC0602FD4CAECFA02721E1D870885747DFF1F1015CD6
Action.c(45): 00F3E586642C43B880F9FA5FBDDD08E14932528F8ED886BCBFB587F1B04811DB62A6B5DE0461DE558A7F2B5579
Action.c(45): 1EA7EF667987A7478C6128BD4871836BB04519BE56F79C978AB774158358A1EB3A9CA46F76CFC3A0BAE3CD60C1
Action.c(45): 055A81D8E862C284547FDE369C3C66EB2ACA0350B1F50A1DB2993C938767EF404A36B59D178F10BA97C4D9CB9D

 

Any and all help is appreciated.

 

 

 

0 Likes
2 Replies
Highlighted
Acclaimed Contributor.. Acclaimed Contributor..
Acclaimed Contributor..

Re: web_rest function call

Why do you not just give it a try and see if you can get data from the response by setup

web_reg_save_param_json() or web_reg_save_param_ex()

before you do your web_rest function call.

Signature:
Reward community members who take time to respond and help.
0 Likes
Highlighted
Super Contributor.
Super Contributor.

Re: web_rest function call

Exactly - it looks like the right (decrypted) data is available.

 

Something like

 

web_reg_save_param_regexp("paramname=POLICY_IDS", "REGEXP=\"Id\":([0-9]+),\"Number\":", "notfound=warning", "ordinal=all", LAST);
web_reg_save_param_ex("paramname=POLICY_DUEDATES", "LB=\"DueDate\":\"", "RB=\",", "notfound=warning", "ordinal=all", LAST);
web_reg_save_param_ex("paramname=POLICY_PAYPLANS", "LB=\"PayPlan\":\"", "RB=\",", "notfound=warning", "ordinal=all", LAST);

 

 

0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.