so my question is how do I change the JA3 token in the reqwest crate rust? I tried looking in the docs but got no help. If there is a crate in rust that allows this then please let me know. It will be highly appreciated.
Given that the variables used to calculate the JA3 fingerprint are well-documented, you just need to change one of them. For example the list of supported ciphers.
For that you'll have to set up TLS manually and inject it into ClientBuilder via use_preconfigured_tls.
Related
In argparse you provide help alongside the definition of the argument. This helps keep the doc up-to-date with the args.
Is there an option to do something similar in Hydra? Or some other preferred way for documenting the options, without having to list them manually within the hydra/help message?
Edit: this becomes an even greater problem when using call/instantiate and the config options depend on the code.
Right now we recommend using hydra/help. We do have a feature request, feel free to follow/contribute to the discussions here https://github.com/facebookresearch/hydra/issues/633.
Thanks!
I understand that there is no right or wrong answer here.
I see a gRPC API which returns "google.protobuf.Any". The job of the API is to take a param, which says what information needs to be fetched, and returns one of "n" things.
From an API design perspective, it is a good practice to define an API like this?
The other option would be to define a return message with "oneof" construct, which in my opinion tightly binds what the API can return.
Please let me know your thoughts.
Thanks for your time.
rpc getInformation(InfomationRequestParams) returns (google.protobuf.Any);
Returning Any from an API is common. oneof is preferred if you have a strict set of options that aren't added to often, but isn't appropriate if anyone may want to extend what is sent. The decision is similar to whether you choose to use an enum or a string in an API.
It does seem weird to not wrap the Any with a message, since generally there is type-independent information. But that's more specific to what your API actually provides and so may be fine as-is.
I would like to use prerenderio with Meteor instead of phantomjs on the server with modulus.
However given the examples they provide, I'm not sure how to integrate it. They only provide a node express middleware which doesn't translate 100%.
For SEO purposes? I mean, what else could it be? ;)
Firstly, remove the spiderable package if you haven't already.
Second, drop this at your server-side code (for example server/prerenderio.js):
// Use Prerender with your token
var prerenderio = Npm.require('prerender-node').set('prerenderToken', 'YOUR_TOKEN');
// Feed it to middleware! (app.use)
WebApp.connectHandlers.use(prerenderio);
If you're wondering about Npm.require (or Meteor.require), See this answer (by me, sorry for shameless plug) for the gist: https://stackoverflow.com/a/16481897/951773
Source: I've used prerenderio successfully for a couple of our clients.
![Good luck!][1]
EDIT:
Since there has been major differences now between express request and response objects to meteor's connect objects, it went to really complicated now. But this has been addressed now and hopefully the PR I put in works:
https://github.com/dfischer/meteor-prerenderio/issues/1
TL;DR Thanks to this question now we have a prerender.io meteor module.
Simple question -- how do you expose constants in a java google app engine Endpoints API?
e.g
public static final int CODE_FOO = 3845;
I'd like the client of the Endpoints to be able to match on CODE_FOO rather than on 3845. I'll end up doing enum wrappers (which probably is better anyway) but I'm just starting to be curious if this is even doable? Thx
Note that this isn't a full answer but here is a workaround: in Android Studio, create a very light-weight "common" java project and shove anything you want to keep in sync there such as constants as well as common types that you want exposed (e.g. an enum representing all possible return / error codes, etc).
This way you should get pretty decent compiler-time safety and keep these guys in sync.
Please feel free to comment if anyone has better suggestions.
This is unfortunately a Law of Information (ahem). If you have a message protocol you defined, both sides of the interaction need to be aware of the messages that could be passed. There's no other way for the client to be aware of what it needs to respond to. Ajax libraries hard-code the number "200" to be able to detect a successful request, as one example.
Yes, just use a switch statement on strings inside your client code. Or, you could use a dictionary of strings pointing to functions and just call the function after de-referencing the dictionary given the string you got.
Poco supports HMACEngine with different hash functions. For example to create a HMAC-SHA1 function I can use HMACEngine<SHA1Engine> hmca_sha1("secret");
This works well with DigestEngine like SHA1Engine and MD5Engine that have a constructor without argument.
Is it possible to use HMACEngine with hash functions from OpenSSL as they are provided by Poco::Crypto::DigestEngine?
The problem is that these functions take a string parameter in their constructor that specifies which hashing algorithm to use. This means HMACEngine<Poco::Crypto:DigestEngine> hmca_xxx("secret"); wouldn't work.
Any idea how to do this?
I think it will require some coding on Poco side. HMAC is accepting any class as template argument, and hoping it is a Digest class ans using methods like digest() that may not even exist. The HMACEngine that instantiates the class as template, so you can´t passa anything to its constructor as it is. In fact I don´t think that is a good use of templates, while I´m not very familiar with using this C++ resource yet, I think one should not expect anything to be available from templated class.
Probably a new HMACEngine for the Crypto module (instead of Foundation module) would be good. But looks like an approach more like the Poco::Crypto::RSADigestEngine would be better than the current template based one. I´ve recently modified Poco::Crypto::RSADigestEngine to be based on Poco::Crypto::DigestEngine instead off old Foundation Poco::DigestEngine, and therefore for next release it will also support all hashes that OpenSSL support. Basically RSADigestEngine creates an instance of a Poco::Crypto::DigestEngine as base and uses it.
I could help on a patch proposal if you create one at github. Poco::Crypto does need some updates :)