diff --git a/android/conf/start_culebra.sh b/android/conf/start_culebra.sh index 98931e2..ec941ad 100644 --- a/android/conf/start_culebra.sh +++ b/android/conf/start_culebra.sh @@ -11,7 +11,7 @@ function culebra_loop() { rm -f /opt/android-sdk-linux/.android/avd/virtual_dev.avd/*.lock adb start-server -emulator -avd virtual_dev -writable-system -no-window -no-audio & +emulator -avd virtual_dev -writable-system -no-window -no-audio -memory 4096 & adb wait-for-device adb emu avd snapshot load configured diff --git a/http_server/code/index.mjs b/http_server/code/index.mjs index a60e24e..222f219 100644 --- a/http_server/code/index.mjs +++ b/http_server/code/index.mjs @@ -63,10 +63,9 @@ app.use(express.text({limit: "100mb"})); app.post("/inspect_har", function (req, res) { let body = JSON.parse(req.body); let har = JSON.stringify(body.har); - console.log(har); let private_data; if (body.private_data) - private_data = JSON.stringify(body.private_data); + private_data = body.private_data; res.setHeader("Content-Type", "text/html"); res.send(build_html(har, private_data, "/code/har-analyzer/")); }); diff --git a/http_server/code/src/notifications.jsx b/http_server/code/src/notifications.jsx index 5105dc3..edfe1b8 100644 --- a/http_server/code/src/notifications.jsx +++ b/http_server/code/src/notifications.jsx @@ -37,7 +37,6 @@ class Notifications extends Component { } render() { - console.log("Render", this.state.notifications); return this.state.notifications.map(({ id, notification }) => (
this.remove_notification(id)} diff --git a/http_server/code/src/trafficLog.tsx b/http_server/code/src/trafficLog.tsx index c90b3ba..461648e 100644 --- a/http_server/code/src/trafficLog.tsx +++ b/http_server/code/src/trafficLog.tsx @@ -48,18 +48,34 @@ class TrafficLog extends Component { const inspect_har = async () => { const req_body = { har: this.export_har(), - private_data: undefined, + private_data: [ + [ + "adid", + document.getElementById("adid_priv_info_table")! + .textContent, + ], + [ + "latitude", + document.getElementById("lat_priv_info_table")! + .textContent, + ], + [ + "longitude", + document.getElementById("lon_priv_info_table")! + .textContent, + ], + ], }; + const resp = await fetch("/inspect_har", { - method: "POST", - body: JSON.stringify(req_body), - }) + method: "POST", + body: JSON.stringify(req_body), + }); const resp_text = await resp.text(); const newWindow = window.open(); newWindow?.document.write(resp_text); newWindow?.document.close(); - - } + }; const contentWithLineBreaks = this.state.finished_entries.map((req) => { return ( diff --git a/pre_android/preconf/docker-entrypoint.sh b/pre_android/preconf/docker-entrypoint.sh index 8b20b68..e288388 100644 --- a/pre_android/preconf/docker-entrypoint.sh +++ b/pre_android/preconf/docker-entrypoint.sh @@ -1,5 +1,7 @@ adb start-server -emulator -avd virtual_dev -writable-system -no-window -no-audio & + +emulator -avd virtual_dev -writable-system -no-window -no-audio -memory 4096 & + bash /preconf/install_adidreader.sh bash /preconf/install_culebra.sh