Lets say an Android application sends out a traffic out to the server and expects a Json Response
Request:
https://server:port/userid=user1&token=randomstring7345
We want to replicate the traffic using python library now, the 'randomstring7345' keeps changing everytime, there is a function logic inside the application which generates it on the fly.
If this was a web application we would have used chrome network tab to do a stack trace once the traffic is generated and then use technical breakpoints to find out the Javascript code which generates the 'randomstring7345'. How can we do the same in Android. first step would be to decompile the application apk I guess and then how do we proceed from there to find out the exact function/logic?
what I am trying to do.
- reverse engineer an android apk (bit novice here)
- create a python library to automate the apk api calls (i can do this once i get the equivalent android code logic)
for sake of simplicity, lets say there is an flight reservation android app
Here is the flow:
- open the apk, which presents a login screen (user | pass)
- once you click login you get a Json reply from server a. {Fail: Wrong pass} or b. {Success: login_tokenID}
- now I put sourceAirport as A DestinationAirport as B and flydate '2018-06-09' and click on Confirm
The traffic that goes out:
https://myflights.com:port/userid=user1&token=login_tokenID&accesstoken=8833456&from=A&to=b&date=2018-06-09
Server sends back Json a. {Fail : Choose another date} b. {Success: confirmed}
note the flow here the app computes internally accesstoken=8833456 which it supplies in the request else server wont respond to it. I need to find exactly where this logic resides in the app so that I can replicate it.