Skip to content

Instantly share code, notes, and snippets.

Avatar
:octocat:
Focusing

Tomasz Oleksik olekstomek

:octocat:
Focusing
View GitHub Profile
@olekstomek
olekstomek / Kod.gs
Last active Apr 22, 2022
Apps Script trigger - check dane.gov.pl/source-code and send email if new version
View Kod.gs
function checkDaneGovPlSourceCode() {
const scrappedTextFromWebsite = UrlFetchApp.fetch('https://dane.gov.pl/source-code/').getContentText();
if (scrappedTextFromWebsite.includes(formatDate(new Date()))) {
MailApp.sendEmail({
to: "my@e-mail.com",
subject: "Nowa wersja kodu dane.gov.pl!",
htmlBody: scrappedTextFromWebsite + "</ br> https://dane.gov.pl/source-code/"
});
Logger.log('E-mail was sent.');
} else {
@olekstomek
olekstomek / zte286d.sh
Last active Dec 27, 2021
skrypt do pokazywania parametrów sygnału w modemie mobilnym 4G
View zte286d.sh
#!/bin/sh
HOST=192.168.32.1
PASSWORD=admin
HEADER="Referer: http://$HOST/index.html"
P=$(echo -n "$PASSWORD" | base64 -w0 | sha256sum | awk '{print toupper($1)}')
A=$(wget -t 3 -q -O - --save-cookies cookies.txt --keep-session-cookies --header="$HEADER" --post-data "isTest=false&goformId=LOGIN&password=$P" http://$HOST/goform/goform_set_cmd_process)
@olekstomek
olekstomek / zte-v3.0a.js
Last active Dec 27, 2021
skrypt do pokazywania parametrów sygnału w modemie mobilnym 4G
View zte-v3.0a.js
javascript:ftb();function getStatus(){$.ajax({type:"GET",url:"/goform/goform_get_cmd_process",data:{cmd:"network_type,mcc,mnc,rssi,rsrq,lte_rsrp,wan_lte_ca,lte_ca_pcell_band,lte_ca_pcell_bandwidth,lte_ca_scell_band,lte_ca_scell_bandwidth,lte_ca_pcell_arfcn,lte_ca_scell_arfcn,Z_SINR,Z_CELL_ID,Z_eNB_id,Z_rsrq,lte_ca_scell_info,wan_ipaddr,ipv6_wan_ipaddr,static_wan_ipaddr,opms_wan_mode,opms_wan_auto_mode,ppp_status,loginfo",multi_data:"1"},dataType:"json",success:function(l){for(signal=l,vars=["mcc","mnc","rssi","network_type","wan_lte_ca","lte_rsrp","Z_SINR","rsrq","Z_CELL_ID","Z_eNB_id","lte_ca_pcell_bandwidth","lte_ca_pcell_band","lte_ca_scell_info"],e=0;e<vars.length;e++)window[vars[e]]=l[vars[e]];if(setgraph("rsrp",lte_rsrp,-130,-70),setgraph("rsrq",rsrq,-16,-3),enbid=Math.trunc(Z_eNB_id/256),plmn=mcc.toString()+mnc.toString(),$("#enbid").html(enbid),"22201"==plmn&&(plmn="2221"),"22299"==plmn&&(plmn="22288"),"22250"==plmn&&6==enbid.length&&(plmn="22288"),link_lte="https://lteitaly.it/internal/map.php#bts="+
View cpick
program ColorPicker;
uses crt;
const
QuitKey = #27;
PrevKey = #75;
NextKey = #77;
var
@olekstomek
olekstomek / zte_setband_2.0.py
Last active Nov 12, 2021
skrypt do ustawiania parametrów sygnału w modemie mobilnym 4G
View zte_setband_2.0.py
import base64
import hashlib
import requests
import sys
#usage: python3 zte-setband_2.0 B1,B3,B7
router_ip = '192.168.100.1' #change to MF286D IP
password = 'password' #change to MF286D admin password
@olekstomek
olekstomek / zte_getband_2.0.py
Last active Nov 12, 2021
skrypt do pokazywania parametrów sygnału w modemie mobilnym 4G
View zte_getband_2.0.py
import base64
import hashlib
import requests
import sys
router_ip = '192.168.100.1'
password = 'password'
password_encoded = hashlib.sha256(base64.b64encode(password.encode())).hexdigest().upper()
headers = {'Referer': f'http://{router_ip}/index.html'}
@olekstomek
olekstomek / zte_getbandinfo .py
Last active Nov 7, 2021
skrypt do pokazywania parametrów sygnału w modemie mobilnym 4G
View zte_getbandinfo .py
import base64
import hashlib
import requests
import sys
router_ip = '192.168.100.1'
password = 'password'
password_encoded = hashlib.sha256(base64.b64encode(password.encode())).hexdigest().upper()
headers = {'Referer': f'http://{router_ip}/index.html'}
View polsat_news.php
<?xml version="1.0" encoding="utf-8" ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <title>Polsat News GM04 - HbbTV app developed by hybra.tv </title> <meta http-equiv="content-type" content="Content-Type: application/vnd.hbbtv.xhtml+xml; charset=UTF-8"/> <meta name="robots" content="noindex, nofollow"/> <style type="text/css">body{position:fixed;left:0px;top:0px;width:1280px;height:720px;margin:0px;background-color:transparent;}#appmgr{position:absolute;left:0px;top:0px;width:0px;height:0px;visibility:hidden;}#tv_kontener_wideo{position:absolute;left:0px;top:0px;width:1280px;height:720px;}#tv_aplikacja{position:absolute;left:0px;top:0px;width:1280px;height:720px;visibility:hidden;background-color:#11141b;}#tv_menu{position:absolute;left:0px;top:0px;width:1280px;height:720px;}#tv_informacje{position:absolute;left:0px;top:0px;width:1280px;height:720px;visibility:hidden;b
@olekstomek
olekstomek / log
Last active Oct 24, 2021
log install OpenWrt 21.02 using TFTP Trivial File Transfer Protocol
View log
Connection received from 192.168.0.2 on port 1334 [25/10 00:35:53.665]
Read request for file <tp_recovery.bin>. Mode octet [25/10 00:35:53.666]
OACK: <timeout=1,> [25/10 00:35:53.727]
Using local port 64459 [25/10 00:35:53.727]
<tp_recovery.bin>: sent 15873 blks, 8126464 bytes in 17 s. 0 blk resent [25/10 00:36:10.857]
View start.sh
#!/bin/sh
# v 20150706
#
# T, token = unikalny identyfikator systemu na podstawie mac adresu
# U, uptime = uptime systemu
# M, model = model routera
# W, wan proto = typ polaczenia na wan
# V, version = numer wersji oprogramowania