import requests
import requests_cache
requests_cache.install_cache(‘requests_cache’)
res=requests.get(start_url)
import requests
import requests_cache
requests_cache.install_cache(‘requests_cache’)
res=requests.get(start_url)
Edit /etc/network/interfaces
:
# Proxy Server network interface
auto eth1
iface eth1 inet static
address 192.168.3.1
netmask 255.255.255.0
gateway 0.0.0.0
# vi /etc/systemd/resolved.conf > DNSStubListener=no
# systemctl restart systemd-resolved
Then replace /etc/dnsmasq.conf
with:
# Listen for DNS requests on the internal network
interface=eth1
# Act as a DHCP server, assign IP addresses to clients
dhcp-range=192.168.3.10,192.168.3.100,96h
# Broadcast gateway and dns server information
dhcp-option=option:router,192.168.3.1
dhcp-option=option:dns-server,192.168.3.1
# systemctl restart dnsmasq
sysctl -w net.ipv4.ip_forward=1
sysctl -w net.ipv6.conf.all.forwarding=1
sysctl -w net.ipv4.conf.all.send_redirects=0
iptables -t nat -A PREROUTING -i eth1 -p tcp --dport 80 -j REDIRECT --to-port 8080
iptables -t nat -A PREROUTING -i eth1 -p tcp --dport 443 -j REDIRECT --to-port 8080
$ mitmweb --mode transparent --showhost
https://docs.mitmproxy.org/stable/concepts-modes/#socks-proxy
https://docs.mitmproxy.org/stable/howto-transparent/
https://nickcharlton.net/posts/transparent-proxy-virtual-machines-mitmproxy.html
재난문자는 Cell Broadcast Service라고도 불리며 Wartime alert, Information notification, Emergency alert 3가지 단계가 있는데 이중 Wartime alert은 유저레벨에서 컨트롤이 불가능하다. (코드상 cmas_presidential_level_alert)
하지만 관련 패키지를 비활성화 시키면 차단이 가능하다.
관련 패키지를 확인해보면 아래와 같이 4개의 패키지가 확인되는데 (SGS10 5G 기준)
$ pm list packages -f | grep cellbroadcast
package:/system/system_ext/overlay/CellBroadcastConfigOverlayPlatform_KR.apk=com.google.android.overlay.modules.cellbroadcastreceiver
package:/system/system_ext/priv-app/CellBroadcastAppPlatform/CellBroadcastAppPlatform.apk=com.android.cellbroadcastreceiver
package:/system/priv-app/CellBroadcastServiceModulePlatform/CellBroadcastServiceModulePlatform.apk=com.android.cellbroadcastservice
package:/system/system_ext/overlay/CellBroadcastServiceOverlay.apk=com.google.android.overlay.modules.cellbroadcastservice
아래의 명령어로 몽땅 비활성화 시켜준다.
$ pm disable-user –user 0 com.google.android.overlay.modules.cellbroadcastreceiver
$ pm disable-user –user 0 com.android.cellbroadcastreceiver
$ pm disable-user –user 0 com.android.cellbroadcastservice
$ pm disable-user –user 0 com.google.android.overlay.modules.cellbroadcastservice
이후 확인해보면
재난알림 관련 항목들이 사라진것을 볼 수 있다.
※사실 확인 되지 않은 방법임 (이후로 받아볼수가 없었다…) 책임은 각자 알아서,
가끔 파워쉘 프롬포트 뜨는데 한참 걸리면 관리자 권한으로 아래 커맨드 실행하면 좀 빨리뜬다
$env:PATH = [Runtime.InteropServices.RuntimeEnvironment]::GetRuntimeDirectory()
[AppDomain]::CurrentDomain.GetAssemblies() | ForEach-Object {
$path = $_.Location
if ($path) {
$name = Split-Path $path -Leaf
Write-Host -ForegroundColor Yellow "`r`nRunning ngen.exe on '$name'"
ngen.exe install $path /nologo
}
}
https://stackoverflow.com/questions/59341482/powershell-steps-to-fix-slow-startup
QCA IPQ6000 1.2GHz Quad-core
RAM : 512MB (DDR3)
Nand :128MB 63BGA S34MS01G200
유선쪽
RTL8367RB LAYER 2 MANAGED 5+2-PORT 10/100/1000M SWITCH CONTROLLER
QCA8075 Five-Port 10/100/1000 Mbps Ethernet Transceiver https://github.com/Deoptim/atheros/blob/master/QCA8075-device-specs.pdf
무선쪽
QCN5021 2.4Ghz(574Mbps)
QCN5052 5Ghz (1.2Gbps)
대충 이런 레이아웃
앞뒤로 방열에 꽤나 신경을 많이쓴것 같다(반대로 말하면 그만큼 발열이 많은가?)
To be continued.