fakessl 0.0.1 → 0.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/README.md +13 -2
- data/bin/fakessl +1 -1
- data/fakessl.gemspec +2 -2
- data/lib/fakessl/fakessl.rb +2 -2
- data/lib/fakessl/version.rb +1 -1
- metadata +4 -4
data/README.md
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# FakeSSL
|
2
2
|
|
3
|
-
FakeSSL impersonates an HTTPS server and
|
3
|
+
FakeSSL impersonates an HTTPS server and prints the client requests.
|
4
4
|
|
5
5
|
## Installation
|
6
6
|
|
@@ -15,7 +15,18 @@ Or install it as:
|
|
15
15
|
|
16
16
|
## Usage
|
17
17
|
|
18
|
-
$ fakessl -
|
18
|
+
$ sudo fakessl -s localhost -p 443
|
19
|
+
Password:
|
20
|
+
[+] Generating fake SSL certificate for localhost
|
21
|
+
Generating a 4096 bit RSA private key
|
22
|
+
........++
|
23
|
+
................................................................++
|
24
|
+
writing new private key to 'localhost.key'
|
25
|
+
-----
|
26
|
+
[+] Fake localhost is listening on port 443
|
27
|
+
[+] Client requests are:
|
28
|
+
=> GET /byy.html HTTP/1.1
|
29
|
+
|
19
30
|
|
20
31
|
## Contributing
|
21
32
|
|
data/bin/fakessl
CHANGED
@@ -41,6 +41,6 @@ if (!(options[:server].nil?) && !(options[:port].nil?))
|
|
41
41
|
end
|
42
42
|
server = FakeSSL.new(options[:server],options[:port])
|
43
43
|
else
|
44
|
-
$stdout.puts "[-] Mandatory Parameter is missing, try
|
44
|
+
$stdout.puts "[-] Mandatory Parameter is missing, try fakessl.rb -h"
|
45
45
|
end
|
46
46
|
|
data/fakessl.gemspec
CHANGED
@@ -9,8 +9,8 @@ Gem::Specification.new do |gem|
|
|
9
9
|
gem.version = Fakessl::VERSION
|
10
10
|
gem.authors = ["Matteo Michelini"]
|
11
11
|
gem.email = ["cor3ngine@gmail.com"]
|
12
|
-
gem.description = %q{FakeSSL impersonates an HTTPS server and
|
13
|
-
gem.summary = %q{FakeSSL impersonates an HTTPS server and
|
12
|
+
gem.description = %q{FakeSSL impersonates an HTTPS server and prints the client requests}
|
13
|
+
gem.summary = %q{FakeSSL impersonates an HTTPS server and prints the client requests}
|
14
14
|
gem.homepage = "https://github.com/cor3ngine/fakessl"
|
15
15
|
|
16
16
|
gem.files = `git ls-files`.split($/)
|
data/lib/fakessl/fakessl.rb
CHANGED
@@ -5,7 +5,7 @@ class FakeSSL
|
|
5
5
|
|
6
6
|
def initialize(hostname,lport)
|
7
7
|
@hostname = hostname
|
8
|
-
@lport = lport
|
8
|
+
@lport = lport.to_i
|
9
9
|
$stdout.puts "[+] Generating fake SSL certificate for #{@hostname}"
|
10
10
|
generate_certificate
|
11
11
|
sslServer = server_setup
|
@@ -18,7 +18,7 @@ class FakeSSL
|
|
18
18
|
end
|
19
19
|
|
20
20
|
def server_setup
|
21
|
-
server = TCPServer.new(
|
21
|
+
server = TCPServer.new('localhost', @lport)
|
22
22
|
sslContext = OpenSSL::SSL::SSLContext.new
|
23
23
|
#certificate
|
24
24
|
sslContext.cert = OpenSSL::X509::Certificate.new(File.open("#{@hostname}.cert"))
|
data/lib/fakessl/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fakessl
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,9 +9,9 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-12-
|
12
|
+
date: 2012-12-14 00:00:00.000000000 Z
|
13
13
|
dependencies: []
|
14
|
-
description: FakeSSL impersonates an HTTPS server and
|
14
|
+
description: FakeSSL impersonates an HTTPS server and prints the client requests
|
15
15
|
email:
|
16
16
|
- cor3ngine@gmail.com
|
17
17
|
executables:
|
@@ -51,5 +51,5 @@ rubyforge_project:
|
|
51
51
|
rubygems_version: 1.8.24
|
52
52
|
signing_key:
|
53
53
|
specification_version: 3
|
54
|
-
summary: FakeSSL impersonates an HTTPS server and
|
54
|
+
summary: FakeSSL impersonates an HTTPS server and prints the client requests
|
55
55
|
test_files: []
|