Find Jobs
Hire Freelancers

AES Decryption Regex, Then Encryption With MITMPROXY

$10-30 USD

Completed
Posted over 7 years ago

$10-30 USD

Paid on delivery
Need Help creating a Python Script to be used with Mitmproxy / Mitmdump ( [login to view URL] ) command switch as mitmproxy -s /home/user/[login to view URL] In this script i need it to do the following: get the servers Response or Request and be able to decrypt them via AES / Rijndael-128 / ECB / with Base64 Encoding, Then Edit those Responses and Request via RE (Regex) and then Encrypt Them back with the same Key (Provided via a variable). I have tried this a few time myself with little luck, but I don't know py very well. The hard part is to get the decrytion and encryption correct! To test and make sure it does it the way i need, the Script MUST encrypt and decrypt at these sites: [login to view URL] (Auto detects, but it should be Rijndael-128 / ECB / with Base64) [login to view URL] (Rijndael-128 / ECB / with Base64) [login to view URL] (Rijndael-128 / ECB / with Base64) so to test your work, please make sure you get the same input and out put as those sites. The Response and Request will NOT be all plaintext, most of the time it's JASON, so this will need to support this. (another issue i ran into). Here is an Example of a Key I use and what part of a reply might look like, to test with: key = '3te0Lszj' encrypteddate = '9qSBmNW40COlkSHaRz/Vw0XB3x2GYzWZUZs0mQgOaKTqKRw65Ki0ngYAu0o6P+1FDlc572BAiMRySEy9ISli6P9xGw0KeIRLShONFQZB/98=' Decrypted data = '{"N3hB0CwE":"10002","9GIvAQC2":"5","1Fa7rL5R":"22:504100030:2:90"},' *And reverse. BUT i will need to pull this encrypted area from the Response or Request first. cause most of the time it will come in like this: {"Home":{"Place":"274968","s4hB1Y01":"22JBaFbe"},"Cable":{"wrZcBc51":"'9qSBmNW40COlkSHaRz/Vw0XB3x2GYzWZUZs0mQgOaKTqKRw65Ki0ngYAu0o6P+1FDlc572BAiMRySEy9ISli6P9xGw0KeIRLShONFQZB/98="}} and I only want to Decrypt 9qSBmNW40COlkSHaRz/Vw0XB3x2GYzWZUZs0mQgOaKTqKRw65Ki0ngYAu0o6P+1FDlc572BAiMRySEy9ISli6P9xGw0KeIRLShONFQZB/98= Then Regex that Decrypted JSON Then Re-Encrypt it using the same Key as I provide to Decrypt it Then put it back where I pulled it from. This script needs to get and output the info through mitmproxy, i would only like to edit my regex and the key after each "if [login to view URL]("[login to view URL]"):" I'll upload what script i use today that works, but does have AES; which i mainly all i need added. The versions of MITMPROXY use a little different code. I would prefer the older versions code, as i will share the script i use for that one. Version 0.16 ( pip install mitmproxy==0.16 ) with py version 2.7 *Ii wouldn't mind if you used the newest release and py version 3.x (as next version they will force Py 3.x) Thank you.
Project ID: 12122149

About the project

1 proposal
Remote project
Active 7 yrs ago

Looking to make some money?

Benefits of bidding on Freelancer

Set your budget and timeframe
Get paid for your work
Outline your proposal
It's free to sign up and bid on jobs
Awarded to:
User Avatar
$30 USD in 1 day
4.7 (8 reviews)
3.7
3.7

About the client

Flag of UNITED STATES
los angeles, United States
4.6
8
Payment method verified
Member since Nov 18, 2016

Client Verification

Thanks! We’ve emailed you a link to claim your free credit.
Something went wrong while sending your email. Please try again.
Registered Users Total Jobs Posted
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Loading preview
Permission granted for Geolocation.
Your login session has expired and you have been logged out. Please log in again.