watawuwu/blackhole

blackhole is a server that responds to any request with http status code 200

For example, you can check what kind of request is notified by GitHub webhook from the access log

blackhole

. .

Getting Started

  • Usage
blackhole-bin 0.4.0
USAGE:
    blackhole [FLAGS] [OPTIONS]

FLAGS:
    -h, --help
            Prints help information

        --log-all
            Enable log output from dependencies

    -P, --pretty
            Enable pretty printing

    -q, --quiet
            Suppress all log output

    -V, --version
            Prints version information

    -v, --verbosity
            Print more log output


OPTIONS:
    -a, --address <address>
            Network address [default: 127.0.0.1]

    -p, --port <port>
            Insecure HTTP port [env: PORT=]  [default: 80]

  • Launch server
# listen port is 3000
❯❯ blackhole --port 3000

---

# Other terinal
❯❯ curl -v  http://127.0.0.1:3000/
> GET / HTTP/1.1
> Host: 127.0.0.1:3000
> User-Agent: curl/7.54.0
> Accept: */*
>
< HTTP/1.1 200 OK
< content-length: 0
< date: Sat, 17 Aug 2019 14:33:43 GMT
<

❯❯ curl -v -XPOST http://127.0.0.1:3000/
> POST / HTTP/1.1
> Host: 127.0.0.1:3000
> User-Agent: curl/7.54.0
> Accept: */*
>
< HTTP/1.1 200 OK
< content-length: 0
< date: Sat, 17 Aug 2019 14:34:01 GMT
<

❯❯ curl -d'param=aaa' -XPOST http://127.0.0.1:3000/xxx/yyy
*   Trying 127.0.0.1...
* TCP_NODELAY set
* Connected to 127.0.0.1 (127.0.0.1) port 3000 (#0)
> POST /xxx/yyy HTTP/1.1
> Host: 127.0.0.1:3000
> User-Agent: curl/7.54.0
> Accept: */*
> Content-Length: 9
> Content-Type: application/x-www-form-urlencoded
>
* upload completely sent off: 9 out of 9 bytes
< HTTP/1.1 200 OK
< content-length: 0
< date: Sat, 17 Aug 2019 14:33:18 GMT
<

❯❯ curl -v -d '{"test": 1}' -H 'application/json' -XPOST http://127.0.0.1:3000/json
Note: Unnecessary use of -X or --request, POST is already inferred.
*   Trying 127.0.0.1...
* TCP_NODELAY set
* Connected to 127.0.0.1 (127.0.0.1) port 3000 (#0)
> POST /json HTTP/1.1
> Host: 127.0.0.1:3000
> User-Agent: curl/7.64.1
> Accept: */*
> Content-Length: 11
> Content-Type: application/x-www-form-urlencoded
>
* upload completely sent off: 11 out of 11 bytes
< HTTP/1.1 200 OK
< content-length: 0
< date: Fri, 29 May 2020 07:54:16 GMT
<
* Connection #0 to host 127.0.0.1 left intact
* Closing connection 0

---
# access log
{"path":"/","query":{},"addr":"127.0.0.1:3000","headers":{"accept":"*/*","user-agent":"curl/7.64.1","host":"127.0.0.1:3000"},"method":"GET","ts":"2020-05-29T16:52:11.600380+09:00"}
{"path":"/","query":{},"addr":"127.0.0.1:3000","headers":{"accept":"*/*","host":"127.0.0.1:3000","user-agent":"curl/7.64.1"},"method":"POST","ts":"2020-05-29T16:52:24.620505+09:00"}
{"path":"/xxx/yyy","query":{},"addr":"127.0.0.1:3000","body":"param=aaa","headers":{"user-agent":"curl/7.64.1","accept":"*/*","host":"127.0.0.1:3000","content-type":"application/x-www-form-urlencoded","content-length":"9"},"method":"POST","ts":"2020-05-29T16:52:52.644463+09:00"}
{"path":"/json","query":{},"addr":"127.0.0.1:3000","body":{"test":1},"headers":{"content-type":"application/x-www-form-urlencoded","content-length":"11","user-agent":"curl/7.64.1","host":"127.0.0.1:3000","accept":"*/*"},"method":"POST","ts":"2020-05-29T16:53:34.934432+09:00"}

Installing

  • Install binary directly
❯❯ curl --tlsv1.2 -sSf https://raw.githubusercontent.com/watawuwu/blackhole/master/install.sh | sh
  • Compile and install
❯❯ git clone https://github.com/watawuwu/blackhole.git && cd blackhole

❯❯ make install
  • Install with cargo
❯❯ cargo install blackhole-bin

Contributing

Please read CONTRIBUTING.md for details on our code of conduct, and the process for submitting pull requests to us.

Versioning

We use SemVer for versioning.

License

This project is licensed under either of

  • Apache License, Version 2.0, (LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0)
  • MIT license (LICENSE-MIT or http://opensource.org/licenses/MIT)

at your option.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

Authors

  • Wataru Matsui
Issues

Collection of the latest Issues

github-actions[bot]

github-actions[bot]

Comment Icon0

Potential segfault in the time crate

Details
Package time
Version 0.1.43
URL https://github.com/time-rs/time/issues/293
Date 2020-11-18
Patched versions >=0.2.23
Unaffected versions =0.2.0,=0.2.1,=0.2.2,=0.2.3,=0.2.4,=0.2.5,=0.2.6

Impact

Unix-like operating systems may segfault due to dereferencing a dangling pointer in specific circumstances. This requires an environment variable to be set in a different thread than the affected functions. This may occur without the user's knowledge, notably in a third-party library.

The affected functions from time 0.2.7 through 0.2.22 are:

  • time::UtcOffset::local_offset_at
  • time::UtcOffset::try_local_offset_at
  • time::UtcOffset::current_local_offset
  • time::UtcOffset::try_current_local_offset
  • time::OffsetDateTime::now_local
  • time::OffsetDateTime::try_now_local

The affected functions in time 0.1 (all versions) are:

  • at
  • at_utc
  • now

Non-Unix targets (including Windows and wasm) are unaffected.

Patches

Pending a proper fix, the internal method that determines the local offset has been modified to always return None on the affected operating systems. This has the effect of returning an Err on the try_* methods and UTC on the non-try_* methods.

Users and library authors with time in their dependency tree should perform cargo update, which will pull in the updated, unaffected code.

Users of time 0.1 do not have a patch and should upgrade to an unaffected version: time 0.2.23 or greater or the 0.3 series.

Workarounds

No workarounds are known.

References

time-rs/time#293

See advisory page for additional details.

github-actions[bot]

github-actions[bot]

Comment Icon0

Potential segfault in localtime_r invocations

Details
Package chrono
Version 0.4.19
URL https://github.com/chronotope/chrono/issues/499
Date 2020-11-10

Impact

Unix-like operating systems may segfault due to dereferencing a dangling pointer in specific circumstances. This requires an environment variable to be set in a different thread than the affected functions. This may occur without the user's knowledge, notably in a third-party library.

Workarounds

No workarounds are known.

References

See advisory page for additional details.

github-actions[bot]

github-actions[bot]

Comment Icon0

aesni has been merged into the aes crate

Details
Status unmaintained
Package aesni
Version 0.10.0
URL https://github.com/RustCrypto/block-ciphers/pull/200
Date 2021-04-29

Please use the aes crate going forward. The new repository location is at:

https://github.com/RustCrypto/block-ciphers/tree/master/aes

AES-NI is now autodetected at runtime on i686/x86-64 platforms. If AES-NI is not present, the aes crate will fallback to a constant-time portable software implementation.

To prevent this fallback (and have absence of AES-NI result in an illegal instruction crash instead), continue to pass the same RUSTFLAGS which were previously required for the aesni crate to compile:

See advisory page for additional details.

github-actions[bot]

github-actions[bot]

Comment Icon0

aes-soft has been merged into the aes crate

Details
Status unmaintained
Package aes-soft
Version 0.6.4
URL https://github.com/RustCrypto/block-ciphers/pull/200
Date 2021-04-29

Please use the aes crate going forward. The new repository location is at:

https://github.com/RustCrypto/block-ciphers/tree/master/aes

AES-NI is now autodetected at runtime on i686/x86-64 platforms. If AES-NI is not present, the aes crate will fallback to a constant-time portable software implementation.

To force the use of a constant-time portable implementation on these platforms, even if AES-NI is available, use the new force-soft feature of the aes crate to disable autodetection.

See advisory page for additional details.

Versions

Find the latest versions by id

0.5.0 - Jul 10, 2021

0.5.0 - 2021-07-10

Feat

  • [c0244b0] migrate alpine to distroless (Wataru Matsui)
  • [72003d3] add signal handler (Wataru Matsui)

Fix

  • [c4d29f8] fix struct args to match lint (Wataru Matsui)
  • [9a9b4b6] change to new spec (Wataru Matsui)
  • [10f5e19] fix target dir (github-actions)
  • [18fa800] fix deps for rust advisory (Wataru Matsui)

Build

  • [3f010c0] bump openssl-sys from 0.9.63 to 0.9.65 (dependabot[bot])
  • [6e21b07] bump alpine from 3.13.5 to 3.14.0 (dependabot[bot])
  • [96173ff] bump aes-gcm from 0.8.0 to 0.9.0 (dependabot[bot])
  • [6eafca3] bump futures from 0.3.13 to 0.3.14 (dependabot[bot])
  • [68a2930] bump openssl-sys from 0.9.61 to 0.9.62 (dependabot[bot])
  • [6b137f3] bump predicates from 1.0.7 to 1.0.8 (dependabot[bot])
  • [4cbe6c8] bump http-types from 2.10.0 to 2.11.0 (dependabot[bot])
  • [b15062d] bump alpine from 3.13.4 to 3.13.5 (dependabot[bot])
  • [25f1a9a] bump console from 0.14.0 to 0.14.1 (dependabot[bot])
  • [2b71325] bump serde from 1.0.123 to 1.0.125 (dependabot[bot])
  • [41e5f72] bump anyhow from 1.0.38 to 1.0.40 (dependabot[bot])
  • [dec96c0] bump openssl-sys from 0.9.60 to 0.9.61 (dependabot[bot])
  • [808dfe5] bump time from 0.2.25 to 0.2.26 (dependabot[bot])
  • [0a2540e] bump surf from 2.1.0 to 2.2.0 (dependabot[bot])
  • [3684c27] bump alpine from 3.13.2 to 3.13.4 (dependabot[bot])
  • [7086fda] bump surf from 1.0.3 to 2.1.0 (dependabot[bot])
  • [5ca307d] bump futures from 0.3.12 to 0.3.13 (dependabot[bot])
  • [58c8a23] bump serde_json from 1.0.62 to 1.0.64 (dependabot[bot])
  • [e3c34d8] bump alpine from 3.13.1 to 3.13.2 (dependabot[bot])
  • [35e1ac4] bump tempfile from 3.1.0 to 3.2.0 (dependabot[bot])
  • [b1299ed] bump http-types from 2.7.0 to 2.10.0 (dependabot[bot])
  • [5432afa] bump serde from 1.0.117 to 1.0.123 (dependabot[bot])
  • [de8eb89] bump log from 0.4.11 to 0.4.14 (dependabot[bot])
  • [93df3de] bump criterion from 0.3.3 to 0.3.4 (dependabot[bot])
  • [ffe2d39] bump serde_json from 1.0.59 to 1.0.62 (dependabot[bot])
  • [eab8a42] bump openssl-sys from 0.9.58 to 0.9.60 (dependabot[bot])
  • [b6044db] bump structopt from 0.3.20 to 0.3.21 (dependabot[bot])
  • [205de41] bump assert_cmd from 1.0.1 to 1.0.2 (dependabot[bot])
  • [ac31f46] bump console from 0.13.0 to 0.14.0 (dependabot[bot])
  • [6c3d1c8] bump predicates from 1.0.5 to 1.0.7 (dependabot[bot])
  • [5447c24] bump anyhow from 1.0.34 to 1.0.38 (dependabot[bot])
  • [3da8695] bump time from 0.2.22 to 0.2.25 (dependabot[bot])
  • [bf9618b] bump futures from 0.3.7 to 0.3.12 (dependabot[bot])
  • [573a2f1] bump alpine from 3.12 to 3.13.1 (dependabot[bot])
  • [58cf84e] bump serde from 1.0.116 to 1.0.117 (dependabot[bot])
  • [fec4d2d] bump console from 0.12.0 to 0.13.0 (dependabot[bot])
  • [f8f1872] bump time from 0.2.19 to 0.2.22 (dependabot[bot])
  • [56ece16] bump aes-gcm from 0.6.0 to 0.8.0 (dependabot[bot])
  • [24a0212] bump structopt from 0.3.17 to 0.3.20 (dependabot[bot])
  • [0f8d36f] bump futures from 0.3.5 to 0.3.7 (dependabot[bot])
  • [f0592b0] bump http-types from 2.4.0 to 2.7.0 (dependabot[bot])
  • [8281d1b] bump serde_json from 1.0.57 to 1.0.59 (dependabot[bot])
  • [993eb17] bump chrono from 0.4.15 to 0.4.19 (dependabot[bot])
  • [3f9ad6f] fix target dir (github-actions)
  • [b5e1bac] bump anyhow from 1.0.32 to 1.0.34 (dependabot[bot])
  • [6768109] bump serde from 1.0.115 to 1.0.116 (dependabot[bot])
  • [59efe26] bump time from 0.2.18 to 0.2.19 (dependabot[bot])
  • [b086367] bump time from 0.2.17 to 0.2.18 (dependabot[bot])
  • [c7733a0] bump time from 0.2.16 to 0.2.17 (dependabot[bot])
  • [98c46ed] bump watawuwu/rust from 1.45.2 to 1.46.0 (dependabot[bot])
  • [0639edf] bump structopt from 0.3.16 to 0.3.17 (dependabot[bot])
  • [5497dee] bump http-types from 2.3.0 to 2.4.0 (dependabot[bot])
  • [d4989d8] bump structopt from 0.3.15 to 0.3.16 (dependabot[bot])
  • [267b64d] bump async-std from 1.6.2 to 1.6.3 (dependabot[bot])
  • [f11a122] bump chrono from 0.4.13 to 0.4.15 (dependabot[bot])
  • [a8bf5da] bump console from 0.11.3 to 0.12.0 (dependabot[bot])
  • [0d20b22] bump serde from 1.0.114 to 1.0.115 (dependabot[bot])
  • [0af491b] bump watawuwu/rust from 1.45.1 to 1.45.2 (dependabot[bot])
  • [a1f2123] bump watawuwu/rust from 1.44.1 to 1.45.1 (dependabot[bot])
  • [90c7236] bump predicates from 1.0.4 to 1.0.5 (dependabot[bot])
  • [22b6e60] bump log from 0.4.8 to 0.4.11 (dependabot[bot])
  • [676979a] bump serde_json from 1.0.56 to 1.0.57 (dependabot[bot])
  • [3cc6752] bump anyhow from 1.0.31 to 1.0.32 (dependabot[bot])
  • [70a634e] bump http-types from 2.2.1 to 2.3.0 (dependabot[bot])
  • [4c79de4] bump chrono from 0.4.12 to 0.4.13 (dependabot[bot])
  • [ccf3f26] bump chrono from 0.4.11 to 0.4.12 (dependabot[bot])
  • [e03a872] bump criterion from 0.3.2 to 0.3.3 (dependabot[bot])
  • [15c46cb] bump serde_json from 1.0.55 to 1.0.56 (dependabot[bot])
  • [3b93e0b] bump serde from 1.0.113 to 1.0.114 (dependabot[bot])
  • [cde4a04] bump http-types from 2.2.0 to 2.2.1 (dependabot[bot])
  • [a7a5c5f] bump alpine from 3.11 to 3.12.0 (dependabot-preview[bot])
  • [05ab4c5] bump serde_json from 1.0.53 to 1.0.55 (dependabot-preview[bot])
  • [e547c3a] bump watawuwu/rust from 1.43.1 to 1.44.1 (dependabot[bot])
  • [f96f8ba] bump serde from 1.0.111 to 1.0.113 (dependabot-preview[bot])
  • [bb8fcbb] bump async-std from 1.6.0 to 1.6.2 (dependabot-preview[bot])
  • [04f4985] bump structopt from 0.3.14 to 0.3.15 (dependabot-preview[bot])
  • [a730d22] bump tide from 0.10.0 to 0.11.0 (dependabot-preview[bot])
  • [0baa64c] fix cross platform test (Wataru Matsui)

Chore

  • [11279f7] fix run option (Wataru Matsui)
  • [d71e2bf] update deps (Wataru Matsui)
  • [1c658e7] update deps (Wataru Matsui)
  • [fae8cc2] update deps (Wataru Matsui)
  • [3bf3245] change update interval to monthly (github-actions)

CI

  • [80275d5] remove unused platform (Wataru Matsui)
  • [8bf2fc7] fix env syntax (Wataru Matsui)
  • [f835503] update cache action (Wataru Matsui)
  • [50216ae] add reviewers (github-actions)
  • [a7f9313] change base image to ghcr.io (github-actions)
  • [9551e39] fix semver unit for maintenance (Wataru Matsui)

Others

  • [3938dd6] (cargo-release) version 0.5.0 (Wataru Matsui)
  • [f563261] Create Dependabot config file (dependabot-preview[bot])

0.4.1 - Jun 09, 2020

0.4.1 - 2020-06-09

Feat

  • [77d0551] add benchmark test (Wataru Matsui)
  • [042e212] split to lib crate (Wataru Matsui)
  • [6035e01] change fw to tide (Wataru Matsui)

Build

  • [82ff93b] fix exclude dir (Wataru Matsui)
  • [206a280] update dep (Wataru Matsui)
  • [5354820] update tide to v0.10 (Wataru Matsui)
  • [e76dbb8] update base docker container (Wataru Matsui)
  • [25f4799] improve task (Wataru Matsui)
  • [1fb92af] change nightly to stable (Wataru Matsui)

Doc

  • [1b49fe5] fix typo (Wataru Matsui)
  • [f18944b] update latest spec (Wataru Matsui)

Chore

  • [1629839] add to print socket (Wataru Matsui)

CI

  • [a990789] change to azure-pipline to gh action (Wataru Matsui)

Style

  • [9e8bb4a] apply lint (Wataru Matsui)

Refactor

  • [ffc2795] remove unused module (Wataru Matsui)
  • [0a7c19f] change tempdir to tempfile (Wataru Matsui)
  • [cff4312] change failure to anyhow (Wataru Matsui)

Docs

  • [fa0fdb8] fix badge (Wataru Matsui)
  • [04da99b] fix license value (Wataru Matsui)

Others

  • [5dbdaae] (cargo-release) version 0.4.1 (Wataru Matsui)
  • [5cd0be3] (cargo-release) version 0.4.0 (Wataru Matsui)

0.3.0 - Aug 20, 2019

Changes:

  • 1ce48fe6b3b0f20bb333a1be11465410986bc331 (cargo-release) version 0.3.0
  • 9303368096ee2c454fe658878d63a77f68fabf6b Add gh workflow betav2
  • d011ad54f24769b3a353b47198e819638e40789e Remove gh workflow
  • 2cdc10cbd6b6164a19f732b70b718fa128b88158 Update main.workflow
  • 956836b8fdf3125dda3195f38dc1588bb6353d42 Update main.workflow
  • 4c414983b5f40950f8743d4bd548f2d27a7e7226 Change hyper to warp

This list of changes was auto generated.

0.2.0 - Aug 18, 2019

Changes:

  • 93ca7556d5d762ef64c79dbe1c601bf2e1f5bc5f (cargo-release) version 0.2.0
  • 6cd5da813245e2142a496f506c6b71b47d958dcd feat: Disable logging to body field if binary mime request

This list of changes was auto generated.

0.1.0+20190818 - Aug 18, 2019

Changes:

  • 5299f171f632b9db25a53dc65c818a082282ef7e fix: workaround tag trigger
  • d3f6dc31dbb67a9a24988ba4575d3835c9636f94 chore: Add crates desc
  • 5858eb92f264d8cde9ea2173e410ebeb98cd146b fix: install task path
  • e65f71aca5d41acc492787fd43972db0f34f1a52 fix: Add install task for macos
  • 8123d060208e24b397eea59597623d3c81bb4c50 refactor: Reduced depend on rust toolchain settings
  • 580a18997a7de8937dc69d61b081b07cc3e051ca chore: add ignore .cargo-ok file
  • 1086a6658b442265d5177bdf2d03492ad30d86cd fix: typo
  • 328bca0b4223b1e7c445f5d4f100d02e729c7292 fix: How to install cargo tools
  • 91006861ae3ed37d98b737a8c762a0982643afdc Fix toolchain version
  • f198548f4097a2ed670aa199d6b0dfca7e81ca55 Fix depend tool
See more
  • 38f51cb201bd7ff5af69b9419a5bd9e8ffe651be Fix target
  • a253226034cc0293319a72dfc2884bc8095ae5e3 Fix badge

This list of changes was auto generated.

Information - Updated May 21, 2022

Stars: 0
Forks: 0
Issues: 12

Rust bindings for libinjection

Add libinjection to dependencies of Cargo

Rust bindings for libinjection

Rust bindings for the C++ api of PyTorch

LIghtweight wrapper for pytorch eg libtorch in rust

Rust bindings for the C++ api of PyTorch

Rust leveldb bindings

Almost-complete bindings for leveldb for Rust

Rust leveldb bindings

rust-analyzer is a modular compiler frontend for the Rust language

It also contains some tips &amp; tricks to help you be more productive when using rust-analyzer

rust-analyzer is a modular compiler frontend for the Rust language

Rust-Lightning is a Bitcoin Lightning library written in Rust

lightning, does not handle networking, persistence, or any other I/O

Rust-Lightning is a Bitcoin Lightning library written in Rust

Rust FUSE - Filesystem in Userspace

Rust library crate for easy implementation of Crate documentation

Rust FUSE - Filesystem in Userspace

A powerful mock object library for Rust

Mock objects are a powerful technique for unit testing software

A powerful mock object library for Rust
Http

394

HTTP mocking for Rust!

Before upgrading, make sure to check out the rustfmt as a general code style

HTTP mocking for Rust!
Http

329

HTTP mocking to test Rust applications

wiremock provides HTTP mocking to perform black-box testing of Rust applications that

HTTP mocking to test Rust applications
Http

299

HTTP mocking library for Rust

Advanced verification and debugging support

HTTP mocking library for Rust

Implementation of mock service for testing emails in Rust using

You can find the relevant code in the identically named workspaces above

Implementation of mock service for testing emails in Rust using
Facebook Instagram Twitter GitHub Dribbble
Privacy