Skip to content

Conversation

@Sakib75
Copy link
Contributor

@Sakib75 Sakib75 commented Oct 6, 2024

How to install certificate

Mac OS

Make sure the mitmproxy module is installed. Then run this command

bash
sudo security add-trusted-cert -d -p ssl -p basic -k /Library/Keychains/System.keychain ~/.mitmproxy/mitmproxy-ca-cert.pem

Ubuntu - Chrome

Open Chrome Browser and Navigate to chrome://settings/certificates
Click on the Authorities tab and then the Import button
image

Select mitmproxy-ca-cert.crt file in your ~/.mitmproxy directory
image

Check all the boxes and click OK
image

Verify the certificate has been added
image

Windows

bash
certutil.exe -addstore root mitmproxy-ca-cert.cer
Alternative

User ZeuZ testcase to run the proxy and visit mitm.it website with go to link action in debug mode. Download the cer file for windows

  1. Double-click the P12 file to start the import wizard.
    Screenshot from 2024-10-07 22-06-38

  2. Select a certificate store location. This determines who will trust the certificate – only the current Windows user or everyone on the machine. Click Next.
    Screenshot from 2024-10-07 22-06-57

  3. Click Next again.

  4. Leave Password blank and click Next.
    Screenshot from 2024-10-07 22-07-05

  5. Select Place all certificates in the following store, then click Browse, and select Trusted Root Certification Authorities.
    Screenshot from 2024-10-07 22-07-44

  6. Click OK and Next.
    Screenshot from 2024-10-07 22-07-59

7.Click Finish.
8.Click Yes to confirm the warning dialog.

PR Type

Feature

PR Checklist

  • Tests for the changes have been added / updated.
  • Documentation comments have been added / updated.
  • A changelog entry has been made.
  • Version number has been updated.
  • Required modules have been added to respective "requirements*.txt" files.
  • Relevant Test Cases added to this description (below).
  • (Team) Label with affected action categories and server status.

Overview

Added a new action should start a proxy server. By default the port is 8080 which user can change.

Parameter Optional Parameter Value
port optional parameter 8080
action element parameter start
proxy server common action myserver

And for stopping the server

Parameter Optional Parameter Value
proxy server common action myserver
action element parameter stop

Use the arguments in the go to link action to make the request go through the proxy server

Parameter Optional Parameter Value
wait time to appear element optional parameter 10
add argument chrome option --proxy-server=http://localhost:8080
add argument chrome option --ignore-certificate-errors
go to link selenium action https://google.com/

An output storing in the AutomationLog folder or the log file of the RunID will hold the information of the traffics. The exact filepath (during debug) can be found in the captured_network_file_path key of the server variable (the value of proxy server parameter in the action)

image

Test Cases


- mitm proxy server py file added
- Declared action
- Added start and stop action
- mitm_proxy_pids list added in CommonUtil
@Sakib75 Sakib75 self-assigned this Oct 6, 2024
@Sakib75
Copy link
Contributor Author

Sakib75 commented Oct 6, 2024

Unable to access control server while creating this PR

@Sakib75 Sakib75 merged commit 35f7234 into dev Oct 14, 2024
3 of 4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants