on-internet

How can I capture and inspect all network requests from Android and iOS apps?

I'm trying to record every API call from our mobile (Android / iOS). Let's suppose I am using Instagram then every calls generate phone like next reel, 'posts', if I opened inbox then request and response content that go through our mobile! I want to record this all. I have used mitmproxy, but it's really complex to setup and risks of security. Is there any alternative that you know of? I also want content, but I don't think it is possible because all content of requests or response are encrypted. I found this tool PCAPdroid, if there are any better alternatives, then please let me know.

Join the discussion →

How can I optimize a Python function to find the longest palindrome in a string?

I've been working on a Python function to find the longest palindromic substring within a given string. My current approach works, but it feels inefficient and struggles with longer strings. I'm looking for ways to optimize it. Here's what I have so far: def longest_palindrome(s): def expand_around_center(left, right): while left >= 0 and right < len(s) and s[left] == s[right]: left -= 1 right += 1 return s[left + 1:right] if not s: return "" longest = "" for i in range(len(s)): odd_palindrome = expand_around_center(i, i) even_palindrome = expand_around_center(i, i + 1) longest = max(longest,

Join the discussion →

How to print randomly-selected strings?

I was working on something that would generate random messages from your input, for example, it would ask you for a few names, and then using the random function, it would choose a random first name from your input, a random sentence found in the sentence_list list, and a random second name from the input. But I can't get the variables to print. Here is the full script: import random #names: Levo Chevo Zevo Nevo name_list = input("What are the names? (Seperate with spaces)").split() name_1 = (name_list[random.randint(1, 4)]) sentence_list = ["will marry", "will kill", "will kiss", "will propos

Join the discussion →

How to print variables alongside other variables?

I was working on something that would generate random messages from your input, for example, it would ask you for a few names, and then using the random function, it would choose a random first name from your input, a random sentence found in the sentence_list list, and a random second name from the input. But I can't get the variables to print. Here is the full script: import random #names: Levo Chevo Zevo Nevo name_list = input("What are the names? (Seperate with spaces)").split() name_1 = (name_list[random.randint(1, 4)]) sentence_list = ["will marry", "will kill", "will kiss", "will propos

Join the discussion →

How to Print Variables Alongside other Variables? -Python

I was working on something that would generate random messages from your input, for example, it would ask you for a few names, and then using the random function, it would choose a random first name from your input, a random sentence found in the sentence_list list, and a random second name from the input. But I can't get the variables to print. Here is the full script: import random #names: Levo Chevo Zevo Nevo name_list = input("What are the names? (Seperate with spaces)").split() name_1 = (name_list[random.randint(1, 4)]) sentence_list = ["will marry", "will kill", "will kiss", "will propos

Join the discussion →

Preventing memory fragmentation when streaming large WASM-allocated binary buffers via WebSockets in SharedArrayBuffers

I am building a high-throughput client-side application that processes real-time sensor telemetry using a C++ module compiled to WebAssembly. The data streams in via a WebSocket connection directly into a SharedArrayBuffer to avoid main-thread serialization overhead. The Problem: Because the incoming payload frequency fluctuates unpredictably (from 10 KB/s up to 50 MB/s bursts), frequent reallocations and resizing of the linear memory inside the WASM heap cause severe memory fragmentation. Even after calling explicit cleanup routines in C++, the browser's JavaScript engine (V8) does not releas

Join the discussion →

How can I replace matrix values below a threshold with their row labels?

I have a numeric matrix where each row represents an object and the row label is its name. I want to create a display matrix: values below 4 should become the corresponding row label, while all other values should keep their original text representation. The output can be a string matrix. I also need to keep the original numeric matrix for further calculations. Here is a minimal example without null values: // Each vector passed to matrix becomes a column m = matrix(1 5 3, 2 6 4, 7 8 9) labels = ["A", "B", "C"] rename!(m, labels, `c1`c2`c3) m Input: c1 c2 c3 A 1 2 7 B 5 6 8 C 3 4 9 Expected ou

Join the discussion →

America's Shipping Ports Now Face Thousands of Cyberattacks Each Day

"A number of ports across the U.S. are reporting an onslaught of cyberattacks," reports The Hill, "amid a growing number of AI-enabled attacks targeting notable infrastructure." The Port of Corpus Christi, Texas, which functions as the U.S.'s largest passage of oil exports, said it was targeted with "hundreds if not thousands" of attacks per day, according to reporting from the Financial Times. The port's chief executive, Kent Britton, told the outlet that attacks surged from "known bad actor" countries and organizations that are searching for high-profile targets. ["Experts link countries lik

Join the discussion →

E_OUTOFMEMORY error when allocating a default heap

I am investigating a strange out of memory error happening in my renderer. I allocate several meshes. Then this fails: ID3D12Resource* DefaultHeap = nullptr; HRESULT hr = D3D12Device->CreateCommittedResource( &CD3DX12_HEAP_PROPERTIES(D3D12_HEAP_TYPE_DEFAULT), D3D12_HEAP_FLAG_NONE, &CD3DX12_RESOURCE_DESC::Buffer(13574216), D3D12_RESOURCE_STATE_COMMON, nullptr, IID_PPV_ARGS(&DefaultHeap)); if (FAILED(hr)) { if (hr == E_OUTOFMEMORY) { throw OutOfGPUMemoryException(_STRING("Failed to allocate mesh memory")); } } To investigate i output memory stats at program initialization and at the failure poin

Join the discussion →

Difficult GPU Installation

If I line up the GPU perfectly with where it should screw in, it doesn't seem to have enough room to actually insert into the PCIe slot. Coming in from above where the PCIe slot is facing the sky I cannot get the GPU to plug in coming in from above because it is blocked when part of the GPU catches on the case just slightly before fitting perfectly. With a little bit of force while holding the lock open, the GPU goes down a little and I might even hear a click or similar good sound, however the lock does not fully engage on the GPU and I can pull it out easily. Also the left side doesn't seem

Join the discussion →

Is it possible to deadlock a cython.pymutex by taking the GIL?

Cython has a built-in lock, called cython.pymutex. This lock is implemented using PyThread_type_lock() in Python 3.12, and PyMutex in Python 3.13+. The Cython documentation warns against acquiring the GIL while holding a pymutex. acquire will avoid deadlocks if the GIL is held (only relevant in non-freethreading versions of Python). However, you are at risk of deadlock if you attempt to acquire the GIL while holding a cython.pymutex lock. Be aware that it is also possible for Cython to acquire the GIL implicitly (for example by raising an exception) and this is also a deadlock risk. I read thi

Join the discussion →
Older stories