address – Script type test vectors

I’m looking for test vectors, assuming xpub or public key to derive various script type addresses out of it. Something along the line of but not only for P2PKH, but all P2W and P2T types as well (ideally with P2SH types too). Is there a place to find them, or could someone post few of these vectors in the answer?

database – How to black-box test transaction atomicity?

Suppose we need to ensure that a sequence of database operations – currently implemented as A followed by B followed by C – executes either all together, or not at all. We can achieve this using a database transaction – but how can we write an automated test to verify that this atomicity property is satisfied, which is not brittle?

We can fairly easily write a white-box test for this: given that we know that A is executed first, then B, then C, we can write a test which injects a fake C and makes the fake C throw a runtime exception instead of issuing a database update query, to simulate a system crash. Then we catch that exception in the test, and assert that nothing in the database has changed since the test began running.

However, if a developer later comes along and rewrites the implementation to call C first, our test will become invalid – it will only test that “if nothing happens, then nothing happens” or in other words “if the system crashes immediately, then nothing will be written to the database”. Not a very useful test, and not testing what we want to test! This is because it’s a white-box test which is predicated on an assumption about the order of operations inside the implementation – namely, that C is executed last (or at least, not first).

Is it possible to avoid the test turning into a bogus test in this way if the order of database operations in the implementation is changed?

How to test DNS change on Mac before go live?

I need to test DNS changes before updating real DNS
I need to set up A records and CNAME

Any Mac software that let me do it and possibly easily switch ON / OFF?

domain name system – Error Hostname DOES NOT VERIFY – Test certificates TLS Exchange 2016 cu21

Practicing with the certificates, in let’s encrypt win-acme normal is created, I send and receive normal mail, https in owa and the other services

Testing with checktls, it gives me an alert message :

Cert Hostname DOES NOT VERIFY:

( != mail | DNS:mail |

I don’t understand the DNS error.
I thought the error was the DNS SPLIT, but reading in the forum they comment on something about the error.

I understand that the other connectors should not be changed in forums, books and tutorials, nobody changes them. That is why a new connector is created to receive from the internet, to which the FQDN can be changed.

Recommendations of this forum, my dns settings :

Private AD DNS (

Record Type DNS Name Internal IP

Private DNS ( SPLIT

Record Type DNS Name Internal IP

Public DNS (

Record Type DNS Name Value
MX @

Mock/Reality consistency : unit test or integration test?

In a golang project, I have mocked external services. But in order to check that mocked services has the same behaviour as real services, I have done some common testing on the interface with both mock and real, so with real credentials.

Let’s say that I have :


In each *_test.go i have imported tests from repositories/serviceA/tests/tests.go. However, in live_test.go, I have to give API_KEY and API_SECRET in order to test against the real API of the service I am mocking.

In repositories/serviceA/tests/tests.go, you can find tests like

func TestRead(s ServiceInterface)
func TestWrite(s ServiceInterface)

In repositories/serviceA/mock/mock_test.go, I would have:

func TestReadMock() {
    m := NewMock()

In repositories/serviceA/live/live_test.go, I would have:

func TestReadLive() {
    l := NewLive(API_KEY, API_SECRET)

My question is, should I integrate those tests with unit tests (as done in example) as they test each function of mock/real structs or with integration tests as they use credentials and test with real services ? It’s bugging me because it’s running with other mock tests but it is clearly unit testing.

Thanks for the insight ! 🙂

unit testing – How do I test a user recieving a text?

You’re using a third-party API, so you don’t need to test the functionality provided by that API. You need to test your interactions with that API.

One set of tests can be written against the API documentation. Looking at the documentation, what are the valid responses from the API? If you mock out the third-party API and replace it with mock responses, does your system behave as expected given the response?

Another set of tests can used captured actual responses from the API and ensure that your system is handling the actual messages. You could combine this with the first approach, as well and capture real responses in different sets of success and failure cases and use those in testing.

Some APIs also have test credentials. It appears that Twilo provides this. In some cases, they may have different, test-specific endpoints that they maintain to allow you to test different scenarios and get simulated responses. This can also be useful in test or other demonstration environments.

Regardless of how you test, you aren’t testing that Twilo is sending SMSes. You’re testing that your system is sending the expected messages to Twilo and handling any kind of responses back properly. Once the message is received by Twilo, they should have tests to ensure that their system is working as expected whenever they deploy changes and monitoring to make sure it’s continuing to function. It’s not a concern for your tests.

G4 iMac fails to boot from Apple Hardware Test: why?

I have a G4 iMac, 6,1 1GHz G4, 768 MB RAM, 80GB HD, 17″ display.

The internal optical drive no longer works.

I have installed MacOS 10.4 from DVD using a USB external optical drive and it seems to work fine.

The iMac passes all tests run by TechTool Deluxe v3.0.2, and passes all tests run by memtest as installed by Applejack 1.6.

I cannot install the original OS from the MacOS X 10.2.3 installer DVD which came with the iMac: the boot process fails with a “Can’t use this OS circle with a diagonal line” symbol

The Mac also fails to boot off the original Apple Hardware Test disc in the same external optical drive: the process begins, but fails and the G4 iMac ends up in Open Firmware, with this message (white on black):

Invalid memory access at %SRR0: ae0c0108 %SRR1: 0c01086f

Apple PowerMac6, 1 4.5.8f1 BootROM built on 01/13/03 at 22:37:37

Copyright 1993-2003 Apple Computer, Inc.

All Rights Reserved.

Welcome to Open Firmware, the system time and date is 19:06:32 06/05/2021

To continue booting, type “mac-boot” and press return.

To shut down, type “shut-down” and press return.


0 > _

That final line is the prompt and cursor. If I then type mac-boot, I get the following error message (black on white):

Invalid memory access at %SRR0: 3cb80540 %SRR1: b8054018

My question is this: this Mac won’t boot into Apple Hardware Test. Does it look like that’s because the Mac has a hardware fault, or because the Apple Hardware Test disc only works properly in the internal optical drive?

I’d appreciate any relevant information.

penetration test – xss single quote

im trying to do a XSS attack test on a website.
I am using " and <> just fine and i have managed to scape the string.
now im trying too send my own cookie to my source code that saves it on a txt file.

I inject this code to send the cookie:


but the only problem is that it encode both single quotes (') and it changes to %27

is there anyway I can bypass this encode on single quotes or inject the code somehow without single quotes?

I’m trying to test a JDBC connection from an AWS EC2 instance to a Centos 7 server running Oracle and the connection is hanging

At some point we are going to upgrade our databases to 19c, so I am using the 19c client on the EC2 instance for the JDBC drivers. When I try connecting to a 19c database it works. I am using Java 1.8.0_291 and the ojdbc8.jar library from the 19c Oracle Client.

Is there a reason why ojdbc8.jar won’t connect to a 12cR2 database? Is there something that
I can add to my listener on my 12cR2 database or to my pom.xml file that will allow this to work. Obviously, I can install a 12cR2 client and test that next. But I would like to understand why this is an issue first. I added a start trace to the file and compiled it with a stack trace. It takes over 5 minutes before it times out. Even though I reduced the timeout in the file.



17:42:15.668 (main) INFO Main - Logger Initialized
17:42:15.678 (main) INFO Main - arg 0 = <secret_username>
17:42:15.679 (main) INFO Main - arg 1 = <topsecretpassword>
17:42:15.679 (main) INFO Main - arg 2 = jdbc:oracle:thin:@//mydbserver:1521/SRVCNAME
17:42:15.971 (main) INFO Main - ****** Starting JDBC Connection test *******
17:42:15.971 (main) INFO Main - Open JDBC connection
17:58:11.578 (main) ERROR Main - Exception occurred connecting to database: IO Error: Connection timed out, Authentication lapse 0 ms.
17:58:11.580 (main) ERROR Main - Sql Exception
java.sql.SQLRecoverableException: IO Error: Connection timed out, Authentication lapse 0 ms.
        at oracle.jdbc.driver.T4CConnection.logon(
        at oracle.jdbc.driver.PhysicalConnection.connect(
        at oracle.jdbc.driver.T4CDriverExtension.getConnection(
        at oracle.jdbc.driver.OracleDriver.connect(
        at oracle.jdbc.driver.OracleDriver.connect(
        at java.sql.DriverManager.getConnection(
        at java.sql.DriverManager.getConnection(
        at Main.main(
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(
        at java.lang.reflect.Method.invoke(
        at org.springframework.boot.loader.Launcher.launch(
        at org.springframework.boot.loader.Launcher.launch(
        at org.springframework.boot.loader.JarLauncher.main(
Caused by: Connection timed out, Authentication lapse 0 ms.
        at oracle.jdbc.driver.T4CConnection.logon(
        ... 15 common frames omitted
Caused by: Connection timed out
        at Method)
        at oracle.jdbc.driver.T4CMAREngineNIO.prepareForUnmarshall(
        at oracle.jdbc.driver.T4CMAREngineNIO.unmarshalUB1(
        at oracle.jdbc.driver.T4C8TTIdty.receive(
        at oracle.jdbc.driver.T4C8TTIdty.doRPC(
        at oracle.jdbc.driver.T4CConnection.connect(
        at oracle.jdbc.driver.T4CConnection.logon(
        ... 15 common frames omitted
17:58:11.581 (main) ERROR Main - exit 1

Do i need a day 2 covid test on entering croatia if i am fully vaccinated?

Does a fully vaccinated person need a day 2 test in Croatia?