Comments (4)
Thanks for the bug report, will definitely investigate.
On Mar 31, 2014 3:28 PM, "Will Sargent" [email protected] wrote:
Got a stack trace
worker_processes 1;
events {
worker_connections 1024;
}
http {
include mime.types;
default_type application/octet-stream;
sendfile on;
keepalive_timeout 65;
server {
listen 443;
server_name www.howsmyssl.com;location / { root html; index index.html index.htm; } error_page 500 502 503 504 /50x.html; location = /50x.html { root html; } }
}
Run nginx:
sudo /usr/local/bin/nginx -c /usr/local/etc/nginx/nginx.conf
Download and set up ngrok:
wget https://dl.ngrok.com/darwin_amd64/ngrok.zip
unzip ngrok.zip
ngrok 443ngrok should show you two lines:
Forwarding http://1d775921.ngrok.com -> 127.0.0.1:80
Forwarding https://1d775921.ngrok.com -> 127.0.0.1:80Check to see that ngrok is proxying to nginx, and is providing the HTTPS
certificates:curl https://1d775921.ngrok.com | grep "Welcome to nginx"
<title>Welcome to nginx!</title>Welcome to nginx!
➜ ~ host 1d775921.ngrok.com1d775921.ngrok.com has address 173.255.204.192
Download dnschef:
sudo - su
curl -O https://thesprawl.org/media/projects/dnschef-0.2.1.tar.gz
tar xvzf dnschef-0.2.1.tar.gz
cd dnschef-0.2.1
/usr/local/bin/python ./dnschef.py --fakedomains www.howsmyssl.com --fakeip 173.255.204.192Now hit www.howsmyssl.com using -k to suppress hostname validation:
curl -k https://www.howsmyssl.com
[*] Cooking A replies to point to 1d775921.ngrok.com matching: www.howsmyssl.com
[15:21:48] 127.0.0.1: proxying the response of type 'AAAA' for v2-api-1998245248.us-east-1.elb.amazonaws.com[15:21:49] 127.0.0.1: cooking the response of type 'A' for www.howsmyssl.com to 1d775921.ngrok.com
Exception happened during processing of request from ('127.0.0.1', 51320)
Traceback (most recent call last):
File "/usr/local/Cellar/python/2.7.6/Frameworks/Python.framework/Versions/2.7/lib/python2.7/SocketServer.py", line 593, in process_request_thread
self.finish_request(request, client_address)
File "/usr/local/Cellar/python/2.7.6/Frameworks/Python.framework/Versions/2.7/lib/python2.7/SocketServer.py", line 334, in finish_request
self.RequestHandlerClass(request, client_address, self)
File "/usr/local/Cellar/python/2.7.6/Frameworks/Python.framework/Versions/2.7/lib/python2.7/SocketServer.py", line 649, in init
self.handle()
File "./dnschef.py", line 212, in handle
response = self.parse(data)
File "./dnschef.py", line 110, in parse
response = response.pack()
File "/private/var/root/dnschef-0.2.1/lib/dnslib/dns.py", line 238, in pack
rr.pack(buffer)
File "/private/var/root/dnschef-0.2.1/lib/dnslib/dns.py", line 463, in pack
self.rdata.pack(buffer)
File "/private/var/root/dnschef-0.2.1/lib/dnslib/dns.py", line 516, in pack
buffer.pack("!BBBB",*map(int,self.data.split(".")))ValueError: invalid literal for int() with base 10: '1d775921'
[15:21:49] 127.0.0.1: proxying the response of type 'A' for v2-api-1998245248.us-east-1.elb.amazonaws.com
[15:21:50] 127.0.0.1: cooking the response of type 'A' for www.howsmyssl.com to 1d775921.ngrok.com
Exception happened during processing of request from ('127.0.0.1', 51320)
Traceback (most recent call last):
File "/usr/local/Cellar/python/2.7.6/Frameworks/Python.framework/Versions/2.7/lib/python2.7/SocketServer.py", line 593, in process_request_thread
self.finish_request(request, client_address)
File "/usr/local/Cellar/python/2.7.6/Frameworks/Python.framework/Versions/2.7/lib/python2.7/SocketServer.py", line 334, in finish_request
self.RequestHandlerClass(request, client_address, self)
File "/usr/local/Cellar/python/2.7.6/Frameworks/Python.framework/Versions/2.7/lib/python2.7/SocketServer.py", line 649, in init
self.handle()
File "./dnschef.py", line 212, in handle
response = self.parse(data)
File "./dnschef.py", line 110, in parse
response = response.pack()
File "/private/var/root/dnschef-0.2.1/lib/dnslib/dns.py", line 238, in pack
rr.pack(buffer)
File "/private/var/root/dnschef-0.2.1/lib/dnslib/dns.py", line 463, in pack
self.rdata.pack(buffer)
File "/private/var/root/dnschef-0.2.1/lib/dnslib/dns.py", line 516, in pack
buffer.pack("!BBBB",*map(int,self.data.split(".")))ValueError: invalid literal for int() with base 10: '1d775921'
—
Reply to this email directly or view it on GitHubhttps://github.com//issues/4
.
from dnschef.
Found it: I'd made a shortcut of doing:
/usr/local/bin/python ./dnschef.py --fakedomains www.howsmyssl.com --fakeip `host 1d775921.ngrok.com`
but host
does not return the IP address, but a string starting with the hostname. My mistake.
from dnschef.
Sweet, glad you got it working.
I will add some more user input sanity checks so you don't have to dig for
the issue.
On Mar 31, 2014 3:50 PM, "Will Sargent" [email protected] wrote:
Found it: I'd made a shortcut of doing:
/usr/local/bin/python ./dnschef.py --fakedomains www.howsmyssl.com --fakeip
host 1d775921.ngrok.com
but
host
does not return the IP address, but a string starting with the hostname. My mistake.Reply to this email directly or view it on GitHubhttps://github.com//issues/4#issuecomment-39152168
.
from dnschef.
Cool. Good news is that there's a blog post about dnschef now: http://tersesystems.com/2014/03/31/testing-hostname-verification/
from dnschef.
Related Issues (20)
- Failed to open log file for writing, HOT 7
- Unexpected Error:
- Two or more records per domain HOT 3
- "Could not proxy request: timed out" for 99% responses
- Proxying problem HOT 3
- Ability to turn off answers for ANY HOT 3
- TypeError with --truedomains HOT 1
- Can't run dnschef.py HOT 5
- Syntax Errors HOT 3
- Multiple SRV records with different port and target not allowed HOT 5
- dnslib.dns.DNSError: QTYPE: Invalid forward lookup: [65] HOT 1
- -q still give output for everything
- Question: filter or reject unwanted query HOT 1
- Does this tool support 0x20 encoding?
- Seeking to update DNSChef.exe from version 0.3 to version 0.4.6.2
- No permission HOT 1
- Support of SRV records HOT 8
- Listen on UDP, proxy over TCP HOT 2
- [Errno 98] Address already in use
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dnschef.