Skip to content

Commit ff2613b

Browse files
authored
Merge pull request #199196 from Homebrew/rshijack
rshijack 0.5.2 (new formula)
2 parents b45f003 + bf02aed commit ff2613b

File tree

2 files changed

+34
-0
lines changed

2 files changed

+34
-0
lines changed

.github/autobump.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2540,6 +2540,7 @@ rpmspectool
25402540
rqlite
25412541
rrdtool
25422542
rsgain
2543+
rshijack
25432544
rswift
25442545
rsyncy
25452546
rsyslog

Formula/r/rshijack.rb

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
class Rshijack < Formula
2+
desc "TCP connection hijacker"
3+
homepage "https://github.com/kpcyrd/rshijack"
4+
url "https://github.com/kpcyrd/rshijack/archive/refs/tags/v0.5.2.tar.gz"
5+
sha256 "c13cc07825d72f09887ec0f098aa40d335f73a0bc0b31c4d1e7431271e1cb53e"
6+
license "GPL-3.0-or-later"
7+
8+
bottle do
9+
sha256 cellar: :any_skip_relocation, arm64_sequoia: "5ca2a8d042e51c65e54aab501b5c669008cda7783bed088b3ae59732a8aed823"
10+
sha256 cellar: :any_skip_relocation, arm64_sonoma: "d85aa98cf1be3462acd931d1cb235f07adf3bafb9cc2d887c0abbba93a0401fe"
11+
sha256 cellar: :any_skip_relocation, arm64_ventura: "0a30c41da9c8e60505b84d5eb97c0db143d5a5d9c8cf1366bc10911505622fa1"
12+
sha256 cellar: :any_skip_relocation, sonoma: "cb638e32c2280602c4a9c2df3b7d44d2a13f18804cb2aebb841425c6b3e50f59"
13+
sha256 cellar: :any_skip_relocation, ventura: "2ed78b00078532542588e9945636f4d386c09caf8e4f9f433604e3eb85eea21e"
14+
sha256 cellar: :any_skip_relocation, x86_64_linux: "f7ac803fc3ef23e503bb4604c2c1322cdac87945b8337b5d30a19ee4917f3a84"
15+
end
16+
17+
depends_on "rust" => :build
18+
19+
def install
20+
system "cargo", "install", *std_cargo_args
21+
end
22+
23+
test do
24+
interface = OS.mac? ? "lo0" : "lo"
25+
src = "192.0.2.1:12345"
26+
dst = "192.0.2.2:54321"
27+
28+
output = shell_output("#{bin}/rshijack #{interface} #{src} #{dst} 2>&1", 1)
29+
assert_match "Waiting for SEQ/ACK to arrive", output
30+
31+
assert_match version.to_s, shell_output("#{bin}/rshijack --version")
32+
end
33+
end

0 commit comments

Comments
 (0)