Snmp V3 missing exceptions like "not in time window" or "wrong engine id" - sharp-snmp

I'm trying to handle situations when the report parameters are old or wrong.
for example,
if the engine time is "old" (delta time) I should receive "not in time window" exception \ errorcode
if the engine id is wrong I should receive "wrong engine id" eception \ errorcode
I couldn't find any reference in sharp snmp documentation.
I reproduce such scenarios and I'm getting NO errors, errorcode 0 and the result ends with some random data.
it's possible to handle \ extract those errors?
Thanks.

Related

What does SQLEXPR Installer return code -2068578304 mean?

I am working on an installer project where we are replacing an old WISE based installer with innosetup.
One of the install scripts that is being ported to the new installer kicks of SQLEXPR.exe which is SQL Server Express.
During testing some computers get %ERRORLEVEL% = -2068578304
A bit of googling and I have been unable to work out the exact meaning. This is not in the range of error codes produced by MSI based installers. Does anyone have any idea what the cause of error here is and how to correctly parse it? I am seeing other large negative error codes that can be split into multiple pieces. e.g. exit code and facility code? any ideas?
After finding the log file, I've found a bit more info. And when converting that number to hex I can now see the problem. The batch file that is used to kick off the SQL Server Express installation is treating the result as a 32bit number but it's really a 16bit one. So if I mask -2068578304 to 0xffffffff
I will get the result 0x84b40000. The script looks currently looks at the bottom 4 bits to determine error or success (this is zero) so the question now becomes what does the Facility Code mean? as it appears it largely installed but the default instance is missing.
I guess I'm really wanting to know what values Facility Code can be returned. Our installation script is just looking at ErrorCode but that is not enough in other words. Is there a list of descriptions somewhere for FacilityCode?
Update:
It turns out that this is a problem with SQL2012 and earlier that the actual ErrorCode is not propagated to the SQLEXPR return code. It should really return the inner result 0x851a0013. SQL2014 and newer does the right thing.
Exception summary:
The following is an exception stack listing the exceptions in outermost to inner
most order
Inner exceptions are being indented
Exception type: Microsoft.SqlServer.Chainer.Infrastructure.InputSettingValidatio
nException
Message:
The specified sa password does not meet strong password requirements. Fo
r more information about strong password requirements, see "Database Engine Conf
iguration - Account Provisioning" in Setup Help or in SQL Server 2012 Books Onli
ne.
HResult : 0x84b40000
FacilityCode : 1204 (4b4)
ErrorCode : 0 (0000)
Data:
SQL.Setup.FailureCategory = InputSettingValidationFailure
DisableWatson = true
Stack:
at Microsoft.SqlServer.Chainer.Infrastructure.InputSettingService.LogAll
ValidationErrorsAndThrowFirstOne(ValidationState vs)
at Microsoft.SqlServer.Configuration.SetupExtension.ValidateFeatureSetti
ngsAction.ExecuteAction(String actionId)
at Microsoft.SqlServer.Chainer.Infrastructure.Action.Execute(String acti
onId, TextWriter errorStream)
at Microsoft.SqlServer.Setup.Chainer.Workflow.ActionInvocation.ExecuteAc
tionHelper(TextWriter statusStream, ISequencedAction actionToRun, ServiceContain
er context)
Inner exception type: Microsoft.SqlServer.Configuration.SqlEngine.Validation
Exception
Message:
The specified sa password does not meet strong password requirem
ents. For more information about strong password requirements, see "Database Eng
ine Configuration - Account Provisioning" in Setup Help or in SQL Server 2012 Bo
oks Online.
HResult : 0x851a0013
FacilityCode : 1306 (51a)
ErrorCode : 19 (0013)

U-SQL Job Failing

I have a USQL Script which works fine for a single file.
I put some ?? operators in the query to account for missing data cases too.
Now, when I ran it on about 900 JSON files:
TooManyVertexFailedInStage: Too many vertex failures in a stage
E_RUNTIME_USER_EXPRESSIONEVALUATION: Error while evaluating expression Microsoft.Analytics.Samples.Formats.Json.JsonFunctions.JsonTuple(tmp_0[0])["Value"] ?? "0"
Component
JobManager_User
Message
Too many vertex failures in a stage
Description
Many vertices in stage SV1_Extract failed due to Vertex user code error.
Details
Vertex SV1_Extract[4613].v0 {9199FFCE-F114-47D1-912E-D5FFBAC11E0C} failed
Error:
Vertex user code error
exitcode=CsExitCode_StillActive Errorsnippet=
I am not getting the cause of the error?
And how could I resolve it?
If you run your script locally you should see more detailed error information in the console output. Without knowing what your code does, it's hard to infer the error but it could be that tmp_0 is null, or is of zero length, or has a zeroth element that doesn't have a property called value. Your ?? operator wouldn't help with any of these cases.

DB2 runstats throws exception " The utility could not generate statistics. Error "-911" was returned.. SQLCODE=-2310, SQLSTATE= , DRIVER=3.53.71"

Getting the below error when i run the following command :
call admin_cmd('runstats on TABLE schema.table with distribution and detailed indexes all')
DB2 runstats throws exception " The utility could not generate statistics. Error "-911" was returned.. SQLCODE=-2310, SQLSTATE= , DRIVER=3.53.71"
DB2 version - 9070900, table has 477125 rows. Marked as non-volatile.
Any help would be very much appreciated.
Still waiting on the feedback regarding diagnostics, but from the error it seems like this is related to the table or an index being blocked due to other locks (deadlock or contention).
The db2diag.log should hold information on which other process has been involved. In addition db2pd could be used to look into the lock situation. Most likely runstats will run without any error when repeated some time later (reason for no feedback to my diagnostics question?).

Core data/iCloud seeding with local xml file throwing errors in iOS8

Hopefully this is something simple but I haven't been able to track down a fix yet. I have an application that I'm trying to implement both iCloud and Core Data with. I'd like it to run on iOS7 and iOS8.
The application is a checklist/tableview application for collectibles.
Essentially, the application has an pre-seeded xml file with about 50,000 in it. The sqlite/core data is initially configured to have just 1 item. Users can, from a table view, select groups to add to the core data store (so that not all 50,000 items are included). When the user selects a group that has 1-50 items, it parses the xml for those items and writes them into the core data store. When a user selects a group that has a larger amount of files, it parses and adds them, but then also throws some random "no document at url" errors during the parsing process. The application doesn't crash, and all items seem to be added, but the application stops synching with iCloud. The exact error is:
__45-[PFUbiquityFilePresenter processPendingURLs]_block_invoke(439): CoreData: Ubiquity:
Librarian returned a serious error for starting downloads Error Domain=BRCloudDocsErrorDomain Code=5
"The operation couldn’t be completed. (BRCloudDocsErrorDomain error 5 - No document at URL)"
UserInfo=0x7fd7f54abea0 {NSDescription=No document at URL,
NSFilePath=/Users/zacharyfisher/Library/Developer/CoreSimulator/Devices/4B70FCFC-4704-4C83-B848- 0D52D833E28A/data/Library/Mobile Documents/iCloud~com~xxxxx~xxxxxxx/CoreData/iCloud/nobody~sim43DA22C4-427B-5FCD-9B61-90CE79638F6B/iCloud/PZbSJk1f2RNB6ucDj0Y6VqL1KgXYAxi4LcApXONjvnQ=/C45FA553-6CA0-4C26-845B-B478EF7EAD60.1.cdt,
NSUnderlyingError=0x7fd7f54aa200 "The operation couldn’t be completed. No such file or directory"}
with userInfo {
NSDescription = "No document at URL";
NSFilePath = "/Users/zacharyfisher/Library/Developer/CoreSimulator/Devices/4B70FCFC-4704-4C83-B848-0D52D833E28A/data/Library/Mobile Documents/iCloud~com~xxxxxxx~xxxxxxx/CoreData/iCloud/nobody~sim43DA22C4-427B-5FCD-9B61-90CE79638F6B/iCloud/PZbSJk1f2RNB6ucDj0Y6VqL1KgXYAxi4LcApXONjvnQ=/C45FA553-6CA0-4C26-845B-B478EF7EAD60.1.cdt";
NSUnderlyingError = "Error Domain=NSPOSIXErrorDomain Code=2 \"The operation couldn\U2019t be completed.
No such file or directory\" UserInfo=0x7fd7f5433240 {NSDescription=No such file or directory}";
} for these urls: (
"file:///Users/zacharyfisher/Library/Developer/CoreSimulator/Devices/4B70FCFC-4704-4C83-B848-0D52D833E28A/data/Library/Mobile%20Documents/iCloud~com~xxxxxxx~xxxxxxx/CoreData/iCloud/nobody~sim43DA22C4-427B-5FCD-9B61-90CE79638F6B/iCloud/PZbSJk1f2RNB6ucDj0Y6VqL1KgXYAxi4LcApXONjvnQ=/C45FA553-6CA0-4C26-845B-B478EF7EAD60.1.cdt"
)
Then I will get a "move" error as well (sometimes after the parse is complete):
[PFUbiquityTransactionLog moveFileToPermanentLocationWithError:](761): CoreData: Ubiquity:
CoreData: Ubiquity: Error writing export log to file: file:///Users/zacharyfisher/Library/Developer/CoreSimulator/Devices/4B70FCFC-4704-4C83-B848-0D52D833E28A/data/Library/Mobile%20Documents/iCloud~com~xxxxxxx~xxxxxxx/CoreData/iCloud/nobody~sim43DA22C4-427B-5FCD-9B61-90CE79638F6B/iCloud/PZbSJk1f2RNB6ucDj0Y6VqL1KgXYAxi4LcApXONjvnQ=/ABE37211-02B7-4F20-B631-B5D91B23E9BE.1.cdt
error: Error Domain=NSCocoaErrorDomain Code=516 "The operation couldn’t be completed. (Cocoa error 516.)"
UserInfo=0x7fd7f49cdfd0 {NSSourceFilePathErrorKey=/Users/zacharyfisher/Library/Developer/CoreSimulator/Devices/4B70FCFC-4704-4C83-B848-0D52D833E28A/data/Library/Mobile Documents/iCloud~com~xxxxxx~xxxxxxxx/CoreData/iCloud/nobody~sim43DA22C4-427B-5FCD-9B61-90CE79638F6B/tempLogs.nosync/iCloud/PZbSJk1f2RNB6ucDj0Y6VqL1KgXYAxi4LcApXONjvnQ=/ABE37211-02B7-4F20-B631-B5D91B23E9BE.1.cdt,
NSUserStringVariant=(
Move
), NSDestinationFilePath=/Users/zacharyfisher/Library/Developer/CoreSimulator/Devices/4B70FCFC-4704-4C83-B848-0D52D833E28A/data/Library/Mobile Documents/iCloud~com~xxxxxx~xxxxxxx/CoreData/iCloud/nobody~sim43DA22C4-427B-5FCD-9B61-90CE79638F6B/iCloud/PZbSJk1f2RNB6ucDj0Y6VqL1KgXYAxi4LcApXONjvnQ=/ABE37211-02B7-4F20-B631-B5D91B23E9BE.1.cdt,
NSFilePath=/Users/zacharyfisher/Library/Developer/CoreSimulator/Devices/4B70FCFC-4704-4C83-B848-0D52D833E28A/data/Library/Mobile Documents/iCloud~com~xxxxxx~xxxxxx/CoreData/iCloud/nobody~sim43DA22C4-427B-5FCD-9B61-90CE79638F6B/tempLogs.nosync/iCloud/PZbSJk1f2RNB6ucDj0Y6VqL1KgXYAxi4LcApXONjvnQ=/ABE37211-02B7-4F20-B631-B5D91B23E9BE.1.cdt,
NSUnderlyingError=0x7fd7f497f430 "The operation couldn’t be completed. File exists"}
userInfo: {
NSDestinationFilePath = "/Users/zacharyfisher/Library/Developer/CoreSimulator/Devices/4B70FCFC-4704-4C83-B848-0D52D833E28A/data/Library/Mobile Documents/iCloud~com~xxxxxx~xxxxxx/CoreData/iCloud/nobody~sim43DA22C4-427B-5FCD-9B61-90CE79638F6B/iCloud/PZbSJk1f2RNB6ucDj0Y6VqL1KgXYAxi4LcApXONjvnQ=/ABE37211-02B7-4F20-B631-B5D91B23E9BE.1.cdt";
NSFilePath = "/Users/zacharyfisher/Library/Developer/CoreSimulator/Devices/4B70FCFC-4704-4C83-B848-0D52D833E28A/data/Library/Mobile Documents/iCloud~com~xxxxxxx~xxxxxxx/CoreData/iCloud/nobody~sim43DA22C4-427B-5FCD-9B61-90CE79638F6B/tempLogs.nosync/iCloud/PZbSJk1f2RNB6ucDj0Y6VqL1KgXYAxi4LcApXONjvnQ=/ABE37211-02B7-4F20-B631-B5D91B23E9BE.1.cdt";
NSSourceFilePathErrorKey = "/Users/zacharyfisher/Library/Developer/CoreSimulator/Devices/4B70FCFC-4704-4C83-B848-0D52D833E28A/data/Library/Mobile Documents/iCloud~com~xxxxxxx~xxxxxxx/CoreData/iCloud/nobody~sim43DA22C4-427B-5FCD-9B61-90CE79638F6B/tempLogs.nosync/iCloud/PZbSJk1f2RNB6ucDj0Y6VqL1KgXYAxi4LcApXONjvnQ=/ABE37211-02B7-4F20-B631-B5D91B23E9BE.1.cdt";
NSUnderlyingError = "Error Domain=NSPOSIXErrorDomain Code=17 \"The operation couldn\U2019t be completed. File exists\"";
NSUserStringVariant = (
Move
);
}
Any thoughts on how to fix this? Am I trying to make too many changes at once and that is crashing the core data/icloud synching? Any thoughts or pointers would be appreciated.
Zack
Zack, this isn't an answer (I don't have the rep to comment), but it might help you get on the right track. I'm implementing iCloud core data and am running into what looks like the same problem with iOS 8... same "No document at URL" error (no move error for me), and same breakdown in data sync. Two observations:
When I am running my app on two devices, core data sync initially works very well... like for a few minutes and a few updates. Then I get the "no document at URL" error.
My .sqlite database is very small and the updates I'm trying to make are modest (e.g. adding a single new entity), so I don't think file sizes or update complexity are factors.
On the device where these errors are logging, the store stops importing changes from iCloud. But changes I make on that device do continue to persist to the other device. So the effect is like a one-way breakdown.
Hope this helps. Would appreciate posts on any progress you make. I've been wrestling with this for several weeks and am close to giving up and shipping the app (which is universal) without iCloud data sync.

How can I automate testing a website for sql injection vulnerabilities

Here's a basic plan. I'm happy to produce anything resembling success, it's a Uni project. Pseudo code is great.
Spider the site.
Search for forms on each page.
Submit each form without filling in the details to elicit a guaranteed fail.
Fill in the first field on the form with '-- .
Submit the form and compare the response to the fail (elicited by 3).
If response (elicited by 5) is different (than fail) then assume vulnerability.
If same (response = fail) then return to 4. but move to the next field.
If no more fields remain, move to another page.
...
However, 6. is clearly both the critical part of the application and wrong. For example, a page might respond like this
Error: '-- is not a valid user name.
Where in stage 4. the response was
Error: is not a valid user name.
Or
Error: username must be a minimum of 6 characters.
It seems like at (4), you want to try sending some benign values first so you can see what type of page is returned under normal conditions.
For example, generate a random three-letter "user name" and submit it. You'll probably get a response like "Error: bfw is not a valid user name". or "Error: username too short".
Once you've done that, you can send your string attempting SQL injection and see if the result is qualitatively different. So if you send '-- and get the same result as you did when you sent your random benign "username", it's probably not vulnerable. On the other hand, if you get a response back that's different and includes text like "Warning, you have an error in your SQL at line 1..." then it's probably vulnerable. (It doesn't have to spit out warnings for you to conclude it's vulnerable, though. Even a generic error page might indicate vulnerability if it's substantially different to the response you got from your benign data.)
"SQL Injection Attacks and Defense" by Justin Clarke.
Offers a number of tests to discover and confirm SQL injection vulnerabilities, here's my summary of page 65.
Error triggering
"Send ' or '-- and expect to receive an error."
An error message or 500 server error indicates vulnerability. Responses tidily containing ' or '-- (as in user ' or '-- is not available with that password...) probably aren't vulnerable unless its a stack-trace.
Always true condition
"Send 1' or '1'='1 or 1') or ('1'='1 and expect to receive every entry in the database."
A site can be assumed to be vulnerable when the response code is 200 and the attack string is not received in the response. Pages containing the word 'error' or the attack string indicate resistance, as does a 500.
No condition
"Send value' or '1'='2 or value') or ('1'='2 and expect a vulnerable app to respond as though it had only received value."
Always false condition
"1' and '1'='2 or 1') and ('1'='2. If successful, it returns no rows from the table."
Microsoft SQL Server concatenation
"1' or 'ab'='a'+'b or 1') or ('ab'='a'+'b. If successful, it returns the same
information as an always true condition"
MySQL concatenation
"1' or 'ab'='a' 'b or 1') or ('ab'='a' 'b. If successful, it returns the same
information as an always true condition"
Oracle concatenation
"1' or 'ab'='a'||'b or 1') or ('ab'='a'||'b. If successful, it returns the same
information as an always true condition"
Further examples are included throughout the book.

Resources