unity – GA measurement protocol without Firebase

I successfully used the measurement log for my websites and web apps to collect analysis data.

Now I'm trying to implement it in my game, but nothing happens. Debug URL gives a valid answer:

    GA Response:{
  "hitParsingResult": ( {
    "valid": true,
    "parserMessage": ( ),
    "hit": "/debug/collect?XXXXXXXX"
  } ),
  "parserMessage": ( {
    "messageType": "INFO",
    "description": "Found 1 hit in the request."
  } )
}

However, a non-debug URL does not have a track record. What could be the reason?
Here are my hit dates:

  private IEnumerator CollectScreenView(string screen)
    {

        int count = 0;
        while (count < 3)
        {

            WWWForm formData2 = new WWWForm();
            formData2.AddField("v", "1");
            formData2.AddField("tid", "UA-XXXXXXXX-X");
            formData2.AddField("cid", uuid());
            formData2.AddField("t", "pageview");
            formData2.AddField("dh", url);
            formData2.AddField("dp",screen);
            formData2.AddField("dt", screen);

            UnityWebRequest www = UnityWebRequest.Post("https://www.google-analytics.com/collect",formData2);

            yield return www.SendWebRequest();

            if (www.isNetworkError)
            {
                Debug.Log("Can't send data to GA");
            }
            else
            {
                Debug.Log("GA Status:" + www.GetResponseHeader("Status"));
                Debug.Log("GA Response:" + www.downloadHandler.text);
                break;
            }

        }
    }

Device Recommendation – Best camera and protocol for embedded real-time CNN project

It has something to do with photography, so I hope this fits into this forum.

I want to develop a standalone real-time CNN application for outdoor imaging and cannot deal with the myriad of camera options and their communication protocols.
The goal is a Linux embedded device (e.g. Beaglebone + Edge TPU). and the top language is python. (if it is inevitable, I can write a c ++ driver)

I have done a number of projects with webcams using OpenCV. However, this project requires a more serious camera with motorized zoom and auto focus.
with at least 3MP and 30fps.

  1. There are numerous Chinese IP camera blocks with zoom functions.
    but they're streaming H.265, and I'm not sure how OpenCV would handle it.
    It is also not clear how the zoom function in one of them should be controlled via Python.
  2. Then there are USB2 camera blocks that seem to be of lower but adequate quality, but I couldn't find one with motorized zoom.
  3. Then there are the cameras & # 39; Gige & # 39; and & # 39; USB3 Vision & # 39; which appear optimal, but are prohibitively expensive (over $ 500).

This is kind of an open question, but I couldn't find a lot of information on the subject online, so I hope to find wisdom here.

So I wondered if anyone has any advice or recommendations.

Protocol Analysis – Why does a host request a WPAD file from an external location?

I noticed inquiries in my client's NGFW logs (REDACTED)/wpad.dat Be made. The target domain is registered on an external non-customer IP, and the user agent suggests that Windows AutoProxy be used.
I was able to download the wpad file myself and check the content:

function FindProxyForURL(url, host) 

{ 

return "DIRECT"; 

} 

If I understand that correctly, traffic is not routed through the wrong proxy server to be a WPAD attack.

I am trying to find out why this traffic could have taken place originally. Changes to the "Internet settings" (e.g. due to malware) on the hosts? Is there any other risk associated with this traffic than the fact that the server owner can change the Wpad file?

Penetration test – What are the advantages and disadvantages of using a HackRF One compared to certain protocol sniffers?

I am researching IoT test tools and came across the HackRF One, which can send and receive from 1 MHz to 6 GHz. So I think it can analyze a lot of logs, but I can't find a list of them anywhere. Can it analyze (and exploit) ZigBee, Z-Wave, LoRaWAN, RFID and NFC, for example? Why is there no list because there are too many protocols? Is the HackRF a more general sniffer then?

I also came across some special protocol sniffers like the Suphacap Z-Wave Sniffer and the Proxmark and so on. What are the advantages of this over the HackRF? Is the best option to start with a HackRF and then buy special sniffers if needed that meet the needs of the current pentest?

I would like to know that because then I know which devices I have to afford for penetration tests.

python – Nmap does not return a network protocol

I play with Nmap in Python and after executing these commands:

import nmap

nm = nmap.PortScanner()
nm.all_hosts()  # returns 127.0.0.1
nm('127.0.0.1').all_protocols() #  returns an empty list ()

I thought the network protocol should always be either TCP or UDP
but how can I get nothing from nmap?

Is {Bluetooth on cellphone} a reliable protocol for encrypted text transmission?

I am developing a solution for secure chat using instant messaging. Here is the scenario:

I have to encrypt my message and then send it on {WhatsApp, Telegramm, Wechat, …}. I don't trust any of the programs above. Therefore, I use an app on my mobile phone to encrypt / decrypt messages from translators.

However, the first idea becomes naive, since it is really difficult to protect the mobile phone itself from hacker attacks, e.g. B. the clipboard.

Therefore, the current idea is to use a dedicated mobile phone to encrypt and decrypt messages and to send / receive messages with my mobile phone (which runs IM apps) via Bluetooth. The goal is to isolate the hardware that may touch the original text so that my cell phone can only read the encrypted messages.

Is Bluetooth a good solution here?

The following picture shows the rough idea. Phones A-1 and B1 should only install the encryption apps and remain offline for all types of connections, except for the Bluetooth connection with A-2 and B-2.

A typical process for sending and receiving messages

Mining pools – stratum protocol – problem with implementation in Python

For a few days now I have been trying to write a simple script in Python to communicate with the stratum pool server. I'm using NightMiner's simplified code (https://github.com/ricmoo/nightminer/) and a test network I found (stratum + tcp: //pool.bitcoincloud.net: 4008) but I can't get it The right result. Maybe someone with more experience could help me. Below I show every step of my script (step, no Python source code).

1. Establish connection to the server, authorize, call up order data

After connecting to the server, I send these requests:

b'{"id": 1, "method": "mining.subscribe", "params": ()}n'
b'{"params": ("testuser", "anything"), "id": 2, "method": "mining.authorize"}n'

and get the following answer:

{"id":1,"result":((("mining.set_difficulty","deadbeefcafebabe4000000000000000"),("mining.notify","deadbeefcafebabe4000000000000000")),"1000003e",4),"error":null}
{"id":null,"method":"mining.set_difficulty","params":(0.01)}
{"id":null,"method":"mining.notify","params":("53b5","21039cb098cb473758861d7c0ea32145df033e6c008dacad0000022200000000","01000000010000000000000000000000000000000000000000000000000000000000000000ffffffff25031c7614042a82135e08","122f626974636f696e636c6f75642e6e65742f0000000002793e9c04000000001976a91423e020eacd64acfe093150331d44fdbcc0c7ce0688acf1eb0b00000000001976a91400bf6d61c2a34df5a9ea338fcad188c31bb4a52388ac00000000",("12ae2555f80b865bac89fa3aeb4df41b730422670fb80d1a0536276b481fab53","e1f7983af4815cb2116f16c6af916f0a139ad5a7588fd029572c6e403f9fed5d","6d5861e558d057993fdae3007ff5b49807d6f43b218e1ef85ed81223747278f1","847e7a24328302a2a8dbdad177d44d5a20916a0ba36edf2dc667c01a09da298c"),"20000000","1a03550b","5e13824a",false)}

2. Get the Coinbase and Merkle Root

With this data and extranounce = & # 39; 00000000 & # 39; can I create the coin base (in byte form, but in this example as hex):

coinbase=coinb1+extranounce1+extranounce2+coinb2
coinbase=b'01000000010000000000000000000000000000000000000000000000000000000000000000ffffffff25031c7614042a82135e081000003e00000000122f626974636f696e636c6f75642e6e65742f0000000002793e9c04000000001976a91423e020eacd64acfe093150331d44fdbcc0c7ce0688acf1eb0b00000000001976a91400bf6d61c2a34df5a9ea338fcad188c31bb4a52388ac00000000'

Next, the coin base has to be hashed twice with SHA256 algo, which results in the following bytes:

b'490120573a2a22195de5f6d457026b15da1f205d372d474ec14dbf2875eb44e1'

There are no merkle branches (merkle branches array is empty), so hash is our merkle root above.

3. Create the header

With merkle root and the data obtained in step 1, I can start building a header:

header= version + prevhash + merkle root + ntime + nbits + nounce

I use the values ​​as follows:

version - received '20000000', after little-endian conversion it is '0000002'
prevhash - received '21039cb098cb473758861d7c0ea32145df033e6c008dacad0000022200000000', after conversion it is 'b09c03213747cb987c1d86584521a30e6c3e03dfadac8d002202000000000000' (reverse bytes order every 4 bytes)
merkle root - get '490120573a2a22195de5f6d457026b15da1f205d372d474ec14dbf2875eb44e1' in step 2, stays that way
ntime - received '5e13824a', after conversion it is '4a82135e'
nbits - received '1a03550b', after conversion it is '0b55031a'

So the header is

b'00000020b09c03213747cb987c1d86584521a30e6c3e03dfadac8d002202000000000000490120573a2a22195de5f6d457026b15da1f205d372d474ec14dbf2875eb44e14a82135e0b55031a' + nounce

4. Search word

The difficulty is 0.01, so that's my goal

00000063ff9c0000000000000000000000000000000000000000000000000000

After doing some calculations, I find these 4 bytes to use as a nounce:

b'1c35d277'

so my full header is now

b'00000020b09c03213747cb987c1d86584521a30e6c3e03dfadac8d002202000000000000490120573a2a22195de5f6d457026b15da1f205d372d474ec14dbf2875eb44e14a82135e0b55031a1c35d277'

After double hashing with SHA256 Algo and reverse byte order, I get this hash:

0000000da8b99a4905b580b90cdfadcf3311107c4d61d34e9fa155717ee58dbd

This is below my goal, so "1c35d277" should be the right nounce.

5. Submit Nounce

Finally, the results have to be submitted. Therefore I send this request to the server:

b'{"id":2, "method":"mining.submit","params":("testuser","53b5","00000000","5e13824a","1c35d277")}n'

and this is the answer I get:

{"id":2,"result":false,"error":null}

I have no idea why I'm getting result = false. I can only assume that there was an error in step 3 (creation header) and this error is related to the byte order of some values, but I cannot find this error (I have tried many variants of the byte order, but I never get the answer = true ).

I am very grateful if someone can check these calculations and give me some tips.

Networking – How does the speed limit work with the BitTorrent protocol?

I am curious about the BitTorrent protocol. Many software implementations like µTorrent, Vuze, qBittorent …

Each of these software functions: functionality: speed limit.

For example, if my maximum download speed is 3000 KB / s, I can limit the speed to 1500 KB / s or 500 KB / s without reducing the number of sources (seeds).
How does this speed limit work?

php – Change dns prefetch to preconnect with correct protocol

I have this function in my functions.php file:

add_filter(
    'wp_resource_hints',
    function( $urls, $relation_type ) {
        if ( 'dns-prefetch' === $relation_type ) {
            $urls = ();
        }

        if ( 'preconnect' === $relation_type ) {
            $urls = wp_dependencies_unique_hosts();
        }

        return $urls;
    },
    0,
    2
);

The URLs defined are used wp_dependencies_unique_hosts() – the WordPress assigns the default dns-prefetch Link tag – and reallocate them preconnect Link tag. The function was made available to me here:

Change dns prefetch to preconnect resources placed on external queue

However, this function is not working properly. She adds that preconnect URLs with http instead of https.

Example: If I am not the above function, WordPress adds this link to my header:


And when I activate the above function, it replaces this link with this link:


The problem, of course, is that it should be https, not http.

Can someone help me modify my function so that it gives me links https?