Dump .onion using lynx in bash - tor

So, I set up a Tor socks proxy on my machine, and I want to use proxychains or some alternative to have lynx dump links from a Tor .onion site. I tested to see if the proxy works and noted that I can connect to the site in Firefox using Foxyproxy, and it seems to work. But, if I try setting Proxychains to use the proxy, it seems the proxy is working as my IP was different when I ran this command:
proxychains curl ipecho.net/plain;echo
However, lynx gave search results instead of dumping the links when I ran:
proxychains lynx -dump "$site" |awk '/http/{print $2}'
I am guessing maybe it is because it is using my actual DNS rather than the DNS on the proxy. I also tried tsocks and got this error:
14:24:33 libtsocks(31636): Error 114 attempting to connect to SOCKS server (Operation already in progress)

I would use torsocks instead of proxychains. For instance: torsocks curl https://3g2upl4pq6kufc4m.onion/ will get the duck duck go .onion site homepage. You also don't have to echo it out, it prints it to the terminal by default.

Related

How can one access http://localhost/ using the command line

I installed apache2 on ubuntu and I want to check that it works by accessing http://localhost/. The problem is I installed ubuntu(17.04) server, so there is no web browser, only the command line.
What can I do?
curl localhost (curl localhost:8080 if it's not port 80)
or
curl 127.0.0.1
or just test with
ping localhost
or download your index.html or something
wget localhost
I recommend installing a browser for a command line like lynx ,Browsh.
Lynx is light-weight. Fast. An img element is always shown in their alt text.
Browsh is a bit slower than Lynx. An img element is always shown ing(but as low quality as your command line can display).
I use different above depending on the purpose.
If you just want to see the localhost is working well, use lynx.
If you want to check your server working well and see details, use Browsh.
I hope my answer will help you. Any questions, google or ask me.
You can also port forward it...
You can use ngrok service(just google it) and you can port forward your local host and open it on your own web browser. . . even on your phone..
./ngrok http 80
I think this should work and give you temporary address

How can I access my nodejs web server from my local computer using the server domain name?

I installed nodejs and created a sample app. When I run npm start I get a message saying that I can open my web browser to http://localhost:3000 to see the app in action, but this installation is on a web server - not my local computer, so, instead of localhost:3000 I want to get there using something like mydomain.com:3000
I can't find the answer, it's very likely I just don't know how to search for it... any ideas?
I'm following the tutorial here: https://facebook.github.io/react/tutorial/tutorial.html
I think I only needed to get away from this for a while. I got it working using ssh local forwarding.
I already used an ssh config file to log in to my server without having to remember the password, so I just added this line to my config file:
LocalForward localhost:3000 xxx.xxx.xxx.xxx:3000
where xxx.xxx.xxx.xxx is my server IP address.
Then, I connected to my server via ssh:
ssh -f -N mysite
Once connected, I open up the browser and go to localhost:3000 and there it is now.
I used my ssh config file, but it should also work without it.
ssh -f -N -R 3000:localhost:3000 mydomain.com
I found this command that eventually led me to solve my problem in this link: http://stuff-things.net/2016/01/20/tunneling-to-localhost/

forticlientsslvpn doesn't work with a proxy on Cent OS 7

I'd like to use forticlientsslvpn on Cent OS 7 through a proxy but it doesn't work with a message "Can not connect to proxy" or "Can not resolve proxy address". I guess it needs some dependent libraries but I don't know them.
I downloaded the latest Forticlient SSLVPN 4.4.2329-1 64bit from here. (I installed it on debian then copied the forlder(/opt/forticlientsslvon) to the clean Cent OS 7.)
Both forticlientsslvpn CLI and GUI failed on the same error. This is the result of the cli command.
[root#cent7 /]# cd ~/forticlient-sslvpn/64bit/
[root#cent7 /]# ./forticlientsslvpn_cli --proxy 10.0.0.73:3128 --server 203.0.113.1:10443 --vpnuser myuser
Password for VPN:
STATUS::Setting up the tunnel
STATUS::Connecting...
NOTICE::Can not connect to proxy.
STATUS::Set up tunnel failed
SSLVPN down unexpectedly with error:2
Press Ctrl-C to quit
Clean up...
# Another proxy variable
[root#cent7 /]# ./forticlientsslvpn_cli --proxy http://10.0.0.73:3128 --server 172.17.97.85:10443 --vpnuser myuser
Password for VPN:
08/19/2016 18:19:26 [23461] can not resolve name http://10.0.0.73
Init SSLVPN error:Can not resolve proxy address
# Check the proxy connection
[root#cent7 /]# telnet 10.0.0.73 3128
Trying 10.0.0.73...
Connected to 10.0.0.73.
Escape character is '^]'. # OK
# Check DNS
[root#cent7 /]# nslookup 10.0.0.73
Server: 10.0.0.70
Address: 10.0.0.70#53
Non-authoritative answer:
73.0.0.10.in-addr.arpa name = dns.example.com.
Of cource my forticlient on windows in the same network works with the proxy to the server. And FireFox/wget on this Cent OS 7 server works with the proxy. Does anyone know anything about "Can not connect to proxy" error?
My IP was wrong and needed ip route add
Although the error message was "Can not connect to proxy", my destination forti IP was wrong. It was connected after I fixed it.
One more thing, I noticed a confusing point. I have two proxies like a socks proxy and a web proxy at this time. I knew ssl-vpn uses only web connections but I guessed forticlient might use ssh command during the connection. But it didn't. Forticlient_sslvpn needs only a web proxy so we just need to fill the proxy form of forticlient with a web proxy's url.
And one more thing. After I connected to ssl-vpn, it doesn't work perfectly because I can ping to internal server but not to DMZ(Of course my windows forticlient works well for both). I added ip route to DMZ and it started to work.
ip route add 192.168.3.0 via 10.0.0.5
I guessed this GW 10.0.0.5 is not the same everytime and every machine so I made the dynamic command.
ip route add 192.168.3.0/24 via $(ip route | grep 10.0.0 | awk '{print $3}' | head -1)
I hope this helps someone.

Why can't I open a website in the browser even though I can curl on my linux localhost?

I can curl the contents of an internally hosted site using curl http://localhost:9000 but cannot connect when I try to open the same in the windows browser http://ip-address:9000/. I am trying to do this from within the internal network.
The admin needed to open up iptables port 3000 and then it worked on the browser.
Getting the site via curl using localhost as the address implies that your machine (the local host) is the one hosting the site. Then you say that you're on Windows and the site's being served by a linux machine. Which is it?
Regardless, if you can get the contents via curl using http://localhost:9000, then you should be able to get the contents via your web browser using http://localhost:9000. Try that.

proxychains - cannot get wget working

I have configured ProxyChains to use 127.0.0.1:1080 as the only socks server. All the DNS requests are proxied through the above server.
I am able to use Firefox with ProxyChains properly, but there is some issue with wget. Whenever I use proxychains wget it first tries to connect to my university's proxy server and then it tries to connect to my local proxy server.
The output of the command proxychains wget www.google.com is as follows:
ProxyChains-3.1 (http://proxychains.sf.net)
--2010-11-26 22:14:38-- http://www.google.com/
Resolving **********... |DNS-request| **********
|D-chain|-<>-127.0.0.1:1080-<><>-4.2.2.2:53-<><>-OK
|DNS-response|: ********** is not exist
failed: Unknown error.
wget: unable to resolve host address `**********'
********** above represents my university's proxy server host name.
in file /usr/lib/proxychains3/proxyresolv
change 4.2.2.2 to 8.8.8.8
or use env PROXYRESOLV_DNS
also you can make proxychains doesn't proxy DNS request,
in proxychains.conf comment the proxy_dns setting
My Problem was resolved after becoming root ("sudo sh") and executing the same command.
Running the command as proxychains sudo wget google.com worked.
You may want to try defining your proxy's address with a shell environment variable. There's a brief section in the wget manual on configuring for proxies.

Resources