I have the an ASCII message of SNMP traps, how can i sent it to different IP address? i dont want to use email instead. Given a IP address and the port, of that receiver machine.
PLease tell me the solution or where can i get references to the command at
least. coz i could find anything regarding it.
PLease...Hope someone can help me..
thank you very much.
regards,
dunk
I don't understand what is "an ASCII message of SNMP traps".
If you already have the bytes you would like to send, in VB.NET you can use Socket.SendTo method.
If you need to pack up TRAP messages, #SNMP Library exposes such API for .NET/Mono platform.
http://sharpsnmplib.codeplex.com (using Messenger.SendTrap* methods).
There is trapgen utility which probably will help you. It allows to send snmp traps in a very handy way.
Related
I'm validating addresses to make sure they exist. I'm using the google API to do this. I have a google API key and it works great.... until I go over 100. At request 110 I get this
{
candidates: [],
error_message: 'You must use an API key to authenticate each request to Google Maps Platform APIs. For additional information, please refer to http://g.co/dev/maps-no-account',
status: 'REQUEST_DENIED'
}
All I'm doing is looping through a list of addresses. It works perfectly up until then. And it's always at the exact same point.
I've tried slowing it down (thinking i'm making too many requests too quickly) by wrapping it in a while loop and only doing 50 at a time, but all that does it slow it down but still crashes at exactly 110.
Any ideas why or how or how to fix it? It is an unpaid API key if that helps (wondering if they have a request limit, I can't find anything saying they do)
While it seems most likely that you have reached the quota allowed on an non-billing account, the status code should read "OVER_QUERY_LIMIT" which indicates that you are over your quota, rather than "REQUEST_DENIED", which you are getting.
https://developers.google.com/maps/documentation/geocoding/intro#StatusCodes
Further down, on the same page you have a suggestion as to the likely cause:
"REQUEST_DENIED" indicates that the request was denied. Possibly because the >request includes a result_type or location_type parameter but does not include an >API key or client ID.
You have to set up a billing account.
Turned out to be one of the parameters I was sending to it had a special character that was breaking it. I printed out the URL before sending it to see what was going on.
TLDR had to use encodeURIComponent on the addresses I was sending, before sending them
I need to send only special Users an Email. That is not a big amount. The Website must send 6 E-Mails a week. I found many solutions. I found this simple solution: https://medium.com/#edigleyssonsilva/cloud-functions-for-firebase-sending-e-mail-1f2631d1022e
When you look at the code, I need to fill out the variables. So I must type in my Email and the Password. As the web is opensource I think that is a very bad way. Do you know other simple solutions or know how to do this without typing in password?
With this solution you are using firebase functions. You most certainly want to set some environmental variables to protect some sensitives data like your gmail password.
You can do this in firebase: go check their documentation right here : https://firebase.google.com/docs/functions/config-env
The doc is going to help you set something like :
{
"mailer": {
"mail":"YOUR GMAIL ADRESS",
"password":"YOUR GMAIL PASSWORD"
}
}
So instead of you password in plain text you'll have this in your code :
'password': `${functions.config().mailer.password}`
Much safer right ?
The web is not open source. If you run a script in the browser then yes, the user can read the code. The example you link, however, runs on the server in response to HTTP(S) requests, and as such is not readable by a visitor.
English is not my first language. I'll do my best to explain my self.
I am creating an API to be used by clients via Javascript. The client should include on his website something like this:
<script>
var my_api = {
public_key: "123456"
};
</script>
<script async src="https://api.example.com/v1/init.js"></script>
So... how can I use a Public Key to verify the client's website?
I know I can get the referer and compare it in with the key on my database, but:
(a) If the referer may be faked, a public key won't be useful because is already public
And (b) if the referer can't be faked, Why would I use a public key? Is not enougth with the referer?
I can't ask the client to encrypt something to varify if he have the right key if anybody can knows the key...
I have only created APIs with both private and public key (or only private) in the past.
Finally, I want it all be installed on client's website by copy/pasting few lines of JS code (that's why I want only use public key).
I know it is possible because that's how Google Ads works, I just need help to figure out the way.
Note: I searched for other topic on the forum but I couldn't find any answer, just thing related the SSH and nodeJS. I am developing a simple API with PHP and pure JS.
The problem that you might run into with putting the api key on their website is that it could be viewed by anyone and used. Use a Process environment variable on the system they are using to host their site. You can use this resource for information: https://hackernoon.com/how-to-use-environment-variables-keep-your-secret-keys-safe-secure-8b1a7877d69c
I was wondering if anyone knew how to send an email with an image attached to it from Parse's Sendgrid module (by this, I mean Facebook's Parse BaaS, not SendGrid's Parse API). So far, I can send out emails, but not with an image attached to it. I tried two different things. One is sending the email as Base64, but I read that is not supported by A LOT of email providers, therefore I was discouraged in using this method since compatibility is kind of an issue here (not critical though). My second approach was to try to mimic sendgrid's process of using a cid, but maybe I was doing something wrong and it did not work
var sendGridInstance = require('sendgrid');
sendGridInstance.initialize(sendGridUser, sendGridKey);
sendGridInstance.sendEmail({
to:endCustomerEmail,
from: 'test#test.com',
subject: 'Test subject',
html: 'My HTML goes here..',
replyto: 'donotreply#test.com'
The code above works whenever it is called in CloudCode, and indeed sends an email. But the cid thing does not work.
Has anyone successfully sent an email w/image using the sendgrid module with Parse? If so, could you please tell me what am I missing?
All help is much appreaciated!
Thank you!
Cheers!
This module doesn't support binary files - it calls SendGrid API with application/x-www-form-urlencoded request and you can't urlencode contents of binary file.
Take a look at https://github.com/m1gu3l/parse-sendgrid-mailer instead - it calls API with multipart/form-data request which is better suited for this case.
I'm trying to find a resource to get a few things about the user identity for security purposes. I'm trying to get ipv6 ipaddress, and the computer name or host name using classic asp and vb6. If I can't use vb6 I would like to use jQuery or javascript if possible.
In asp, I can get the ipv4 using request.ServerObject("REMOTE_ADDR") I believe.
If you need this in ASP I'm unaware of anything you can use to get this directly.
It is possible to write a Class in VB6 that calls DnsQuery in Dnsapi.dll to do first a DNS_TYPE_PTR query to reverse-lookup the IPv4 address to get the DNS name and then a DNS_TYPE_AAAA query to retrieve the corresponding IPv6 address (if any).
...
Hmm, no code handout no rep eh? (insert smiley here)
Well this is a bit of code to post here inline... maybe look at {VB6} DNS Lookup Class as a starting point.
Not sure if this is what you're after, but there is some information here about building a GUI in VB to track an IP address:
http://www.youtube.com/watch?v=hkDD03yeLnU