Disable terminal logs for firebase serve command - windows

Whenever I run firebase serve and loads the firebase site locally, my VSCode terminal fills with lengthy and unnecessary logs like this.
127.0.0.1 - - [29/Nov/2019:21:10:23 +0000] "GET /security HTTP/1.1" 200 10208 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.108 Safari/537.36"
127.0.0.1 - - [29/Nov/2019:21:10:24 +0000] "GET /assets/css/Features-Boxed.css HTTP/1.1" 200 1075 "http://localhost:5000/security" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.108 Safari/537.36"
127.0.0.1 - - [29/Nov/2019:21:10:24 +0000] "GET /assets/css/style.css HTTP/1.1" 200 12392 "http://localhost:5000/security" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.108 Safari/537.36"
127.0.0.1 - - [29/Nov/2019:21:10:24 +0000] "GET /__/firebase/init.js HTTP/1.1" 200 - "http://localhost:5000/security" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.108 Safari/537.36"
127.0.0.1 - - [29/Nov/2019:21:10:24 +0000] "GET /assets/img/svg/home_white.svg HTTP/1.1" 200 1305 "http://localhost:5000/security" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.108 Safari/537.36"
127.0.0.1 - - [29/Nov/2019:21:10:24 +0000] "GET /__/firebase/7.5.0/firebase-app.js HTTP/1.1" 200 12066 "http://localhost:5000/security" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.108 Safari/537.36"
127.0.0.1 - - [29/Nov/2019:21:10:25 +0000] "GET /__/firebase/7.5.0/firebase-analytics.js HTTP/1.1" 200 21623 "http://localhost:5000/security" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.108 Safari/537.36"
127.0.0.1 - - [29/Nov/2019:21:10:25 +0000] "GET /__/firebase/7.5.0/firebase-auth.js HTTP/1.1" 200 163643 "http://localhost:5000/security" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.108 Safari/537.36"
127.0.0.1 - - [29/Nov/2019:21:10:25 +0000] "GET /assets/js/main.js HTTP/1.1" 200 5794 "http://localhost:5000/security" "Mozilla/5.0 (Windows
NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.108 Safari/537.36"
127.0.0.1 - - [29/Nov/2019:21:10:25 +0000] "GET /__/firebase/7.5.0/firebase-app.js.map HTTP/1.1" 200 70975 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.108 Safari/537.36"
127.0.0.1 - - [29/Nov/2019:21:10:25 +0000] "GET /__/firebase/7.5.0/firebase-analytics.js.map HTTP/1.1" 200 113064 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.108 Safari/537.36"
127.0.0.1 - - [29/Nov/2019:21:10:25 +0000] "GET /assets/css/style.css.map HTTP/1.1" 200 32580 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64)
AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.108 Safari/537.36"
I usually put some console.log statements here and that get lost in all this mess. How to disable it?
Terminal: VSCode built-in Terminal
Project: Firebase web app
Platform: Windows

Related

Ansible - How to test my host (windows or linux) has established a tcp connection to a remote host

I have a relatively simple requirement in my playbook (small example below). I have a Windows executable which sometimes will connect to a remote server first time, but sometimes doesn't. So I want to loop around the launch of the executable file and verify the tcp connection to the remote server has been established before moving on.
Below is a Windows play so far:
Download an executable (windows) or binary (linux) file from a url
Async launch of downloaded file on target
---
- hosts: target-1
vars:
remote_server_ip = '192.168.100.10'
remote_server_port = '9000'
tasks:
- name: Download executable from remote host
win_shell: |
Invoke-WebRequest -Uri "http://{{ software_repo }}/{{ filename }}" -OutFile "C:\\{{ file_name }}"
# Probably not needed, but this gives a tiny delay to ensure the file download is complete before execution.
- name: "Check file_name exists: C:\\{{ file_name }}"
win_stat:
path: "C:\\{{ file_name }}"
register: file_name_exists
- name: "Launch executable: {{ file_name }}"
win_shell: |
Start-Process -FilePath "C:\\{{ file_name }}" -PassThru
async: 10
poll: 0
register: result_launch_executable
become: true
when:
- file_name_exists.stat.exists
I want be able do the following (ideally for both Windows & Linux):
Confirm the executable has established a tcp connection to the remote_server_ip based on a specific IP and Port.
Loop around the process until the connection is 'established', time-out after x loops.
The following Windows PowerShell command gives me the confirmation I need showing the connection has been established, but not sure how to get this into the playbook.
Get-NetTCPConnection | where-object {$_.remoteaddress -eq '192.168.100.10'}
Caption :
...
...
RemoteAddress : 192.168.100.10
RemotePort : 8080
State : Established

Websockets request getting 404 on my website - repeated tries on mediawiki pages

This started yesterday morning about 4pm GMT. So far three individual IP addresses. I have anonymized the ip addresses with NNN.
In all three cases, they searched and successfully hit one of my media wiki pages. Two of them got a pattern of 408 errors. Then they started repeat spamming of "websocket" requests - and as far as I know websocket is not implemented on my site. One also reflects Ajax Error CB. One shows "Plugin:ABN".
It would appear that some browser or browser add-in is misbehaving. In one case the initial search was Bing so it could be Windows 10. What is annoying is spamming 2000 websocket requests that get an error 404 on my website over a 6 hour period.
Any ideas on what would cause this? In the last 24 hours these three sites generating about 5000 error 404's on my website:
Apache log:`Case 1 from 76.30.86.NNN - Comcast IP Address in US.
c-76-30-86-NNN.hsd1.tx.comcast.net - - [18/Sep/2019:10:20:22 -0700] "GET /support/kb/Repair/Re-install_Outlook_2003,_2007,_2010,_2013,_2016 HTTP/1.1" 200 10411 "https://www.bing.com/search?q=install+microsoft+outlook&FORM=QSRE4" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.102 Safari/537.36 Edge/18.18362"
76.30.86.NNN - - [18/Sep/2019:10:25:24 -0700] "-" 408 137 "-" "-"
76.30.86.NNN - - [18/Sep/2019:10:30:25 -0700] "-" 408 3284 "-" "-"
76.30.86.NNN - - [18/Sep/2019:10:35:25 -0700] "-" 408 3284 "-" "-"
76.30.86.NNN - - [18/Sep/2019:10:40:25 -0700] "-" 408 3284 "-" "-"
76.30.86.NNN - - [18/Sep/2019:10:45:26 -0700] "-" 408 3284 "-" "-"
76.30.86.NNN - - [18/Sep/2019:10:50:26 -0700] "-" 408 3284 "-" "-"
76.30.86.NNN - - [18/Sep/2019:10:55:26 -0700] "-" 408 3284 "-" "-"
76.30.86.NNN - - [18/Sep/2019:11:00:27 -0700] "-" 408 3284 "-" "-"
76.30.86.NNN - - [18/Sep/2019:11:05:27 -0700] "-" 408 3284 "-" "-"
76.30.86.NNN - - [18/Sep/2019:11:10:27 -0700] "-" 408 3284 "-" "-"
76.30.86.NNN - - [18/Sep/2019:11:15:28 -0700] "-" 408 3284 "-" "-"
c-76-30-86-NNN.hsd1.tx.comcast.net - - [18/Sep/2019:11:15:28 -0700] "GET /82A2C3C3-09A7-A741-99A9-2EC607BE97FF/init?url=https%3A%2F%2Fwww.mywebsite.com%2Fsupport%2Fkb%2FRepair%2FRe-install_Outlook_2003%2C_2007%2C_2010%2C_2013%2C_2016&isTopLevel=true&nocache=14f0e HTTP/1.1" 301 4417 "https://www.mywebsite.com/support/kb/Repair/Re-install_Outlook_2003,_2007,_2010,_2013,_2016" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.102 Safari/537.36 Edge/18.18362"
c-76-30-86-NNN.hsd1.tx.comcast.net - - [18/Sep/2019:11:15:28 -0700] "GET /82A2C3C3-09A7-A741-99A9-2EC607BE97FF/websocket?url=https%3A%2F%2Fwww.mywebsite.com%2Fsupport%2Fkb%2FRepair%2FRe-install_Outlook_2003%2C_2007%2C_2010%2C_2013%2C_2016&nocache=1568830527710 HTTP/1.1" 301 4336 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.102 Safari/537.36 Edge/18.18362"
snip - repeats approx every second for 2040 times
c-76-30-86-NNN.hsd1.tx.comcast.net - - [18/Sep/2019:17:15:57 -0700] "GET /82A2C3C3-09A7-A741-99A9-2EC607BE97FF/init/?url=https%3A%2F%2Fwww.mywebsite.com%2Fsupport%2Fkb%2FRepair%2FRe-install_Outlook_2003%2C_2007%2C_2010%2C_2013%2C_2016&isTopLevel=true&nocache=10fec HTTP/1.1" 404 55891 "https://www.mywebsite.com/support/kb/Repair/Re-install_Outlook_2003,_2007,_2010,_2013,_2016" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.102 Safari/537.36 Edge/18.18362"
c-76-30-86-NNN.hsd1.tx.comcast.net - - [18/Sep/2019:17:15:57 -0700] "GET /82A2C3C3-09A7-A741-99A9-2EC607BE97FF/init?url=https%3A%2F%2Fwww.mywebsite.com%2Fsupport%2Fkb%2FRepair%2FRe-install_Outlook_2003%2C_2007%2C_2010%2C_2013%2C_2016&isTopLevel=true&nocache=10fec HTTP/1.1" 301 4417 "https://www.mywebsite.com/support/kb/Repair/Re-install_Outlook_2003,_2007,_2010,_2013,_2016" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.102 Safari/537.36 Edge/18.18362"
c-76-30-86-NNN.hsd1.tx.comcast.net - - [18/Sep/2019:18:48:27 -0700] "GET /support/kb/Repair/Re-install_Outlook_2003,_2007,_2010,_2013,_2016 HTTP/1.1" 200 10412 "https://www.bing.com/search?q=install+microsoft+outlook&FORM=QSRE4" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.102 Safari/537.36 Edge/18.18362"
c-76-30-86-NNN.hsd1.tx.comcast.net - - [18/Sep/2019:19:44:52 -0700] "GET /support/kb/Repair/Re-install_Outlook_2003,_2007,_2010,_2013,_2016 HTTP/1.1" 200 10413 "https://www.bing.com/search?q=install+microsoft+outlook&FORM=QSRE4" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.102 Safari/537.36 Edge/18.18362"
`

Can't access internet from Vagrant libvirt VM

So, I setup a Vagrant libvirt VM, but I can't access internet using it. I can reach google.com from the host but not from the guest.
/home/vagrant# ping www.google.com
PING www.google.com (64.233.177.105) 56(84) bytes of data.
^C
--- www.google.com ping statistics ---
4 packets transmitted, 0 received, 100% packet loss, time 3075ms
nslookup shows this:
/home/vagrant# nslookup www.google.com
Server: 127.0.0.53
Address: 127.0.0.53#53
Non-authoritative answer:
Name: www.google.com
Address: 64.233.177.104
Name: www.google.com
Address: 64.233.177.106
Name: www.google.com
Address: 64.233.177.103
Name: www.google.com
Address: 64.233.177.147
Name: www.google.com
Address: 64.233.177.99
Name: www.google.com
Address: 64.233.177.105
Name: www.google.com
Address: 2607:f8b0:4002:805::2004
I tried with nslookup www.google.com 8.8.8.8 as well, but it didn't do anything. Any idea how to resolve this? TIA.

Windows network folders across routers

Case 1 (Three routers, not ok)
Router1 WAN(Internet)
Router1 LAN: 10.0.0.1
Windows Server: 10.0.0.3
Router2 WAN: 10.0.0.2
Router2 LAN: 172.16.1.1
Router3 WAN: 172.16.1.2
Router3 LAN: 192.168.1.1
PC: 192.168.1.2
PC can ping 10.0.0.3 Windows Server, but cannot open network folders.
Case 2 (Two routers, ok)
Router1 WAN(Internet)
Router1 LAN: 10.0.0.1
Windows Server: 10.0.0.3
Router2 WAN: 10.0.0.2
Router2 LAN: 172.16.1.1
PC: 172.16.1.2
PC can open network folders.
Question:
Why case 1 not ok, but case 2 ok? Should I do some port mapping on case 1's router2 or router3?
Problem solved. Router3, internet ok, but network folders not ok. Find another router replace it, works!

bash curl get request raw headers

Hello i'm trying to make the following GET request thru CURL
GET http://localhost:80/ HTTP/1.1
Host: localhost
Proxy-Connection: keep-alive
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US) AppleWebKit/534.16 (KHTML, like Gecko) Chrome/10.0.648.204 Safari/534.16
Accept: application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Accept-Encoding: gzip,deflate,sdch
Accept-Language: en-GB,en-US;q=0.8,en;q=0.6
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.3
so i try curl -h "Host:localhost" localhost
but it dont work, any ideea where i go wrong here?
It is -H not -h:
curl -H "Host:localhost" localhost

Resources