Monday, December 26, 2022

My own server client PHP

<?php
// Set up the server
$server = stream_socket_server("tcp://0.0.0.0:8080", $errno, $errorMessage);
if ($server === false) {
    throw new Exception($errorMessage);
}

// Wait for a client to connect
$client = stream_socket_accept($server);

// Read the request from the client
$request = fread($client, 1024);
echo "Request from client: " . $request . "\n";

// Send a response to the client
$response = "Hello from the server!";
fwrite($client, $response);

// Close the connection
fclose($client);

***********


//Set up the client

<button onclick="sendRequest()">Send request</button>
<script>
function sendRequest() {
    var xhttp = new XMLHttpRequest();
    xhttp.onreadystatechange = function() {
        if (this.readyState == 4 && this.status == 200) {
            alert(this.responseText);
        }
    };
    xhttp.open("POST", "server.php", true);
    xhttp.send("Hello from the client!");
}
</script>

Friday, December 23, 2022

Printer Share

 

Firewalls

This help document describes the ports that CUPS uses so that firewall administrators can allow traffic used for printing.

Ports Used for Printer Sharing

Table 1 lists the ports that are used for IPP printer sharing via CUPS.

Table 1: Ports Used for IPP Printer Sharing
(Destination) PortTCP/UDPDirectionDescription
53 (DNS)TCP/UDPOUTDomain Name System lookups and service registrations.
631 (IPP/IPPS)TCPINInternet Printing Protocol requests and responses (print jobs, status monitoring, etc.)
5353 (mDNS)UDPIN+OUTMulticast DNS lookups and service registrations.

Table 2 lists the ports that are used for SMB (Windows) printer sharing, typically via the Samba software.

Table 2: Ports Used for SMB Printer Sharing
(Destination) Port(s)TCP/UDPDirectionDescription
137 (WINS)UDPIN+OUTWindows Internet Naming Service (name lookup for SMB printing).
139 (SMB)TCPINWindows SMB printing.
445 (SMBDS)TCPIN+OUTWindows SMB Domain Server (authenticated SMB printing).

Ports Used for Network Printers

Table 3 lists the ports for outgoing network traffic that are used for network printers.

Notes:
  1. DNS and mDNS are used for all printing protocols except SMB.
  2. SNMP is used to provide status and supply level information for AppSocket and LPD printers.
Table 3: Outgoing Ports Used for Network Printers
(Destination) Port(s)TCP/UDPDescription
53 (DNS)TCP/UDPDomain Name System lookups.
137 (WINS)UDPWindows Internet Naming Service (name lookup for SMB printing).
139 (SMB)TCPWindows SMB printing.
161 (SNMP)UDPSNMP browsing (broadcast) and status monitoring (directed to printer IP address).
443 (IPPS)TCPInternet Printing Protocol requests and responses (print jobs, status monitoring, etc.)
445 (SMBDS)TCPWindows SMB Domain Server (authenticated SMB printing).
515 (LPD)TCPLine Printer Daemon (LPD/lpr) print job submission and status monitoring.
631 (IPP/IPPS)TCPInternet Printing Protocol requests and responses (print jobs, status monitoring, etc.)
5353 (mDNS)UDPMulticast DNS lookups.
9100-9102TCPRaw print data stream (AppSocket/JetDirect).





+ +



++

Smartcard on UBUNTU, HOW TO SHARE FOLDER AND PRINER ON UBUNTU & ZorinOSLite

Super safe server for peanuts:

1)

 https://ubuntu.com/server/docs/security-smart-cards

https://www.ca.posta.rs/preuzimanje_softvera.htm

2)

HOW TO SHARE FOLDER AND PRINER ON UBUNTU & ZorinOSLite:

https://phoenixnap.com/kb/ubuntu-samba

https://wiki.samba.org/index.php/Setting_up_Samba_as_a_Print_Server

https://www.makeuseof.com/set-up-network-shared-folder-ubuntu-with-samba/

https://fedoraforum.org/forum/printthread.php?t=113307&pp=80


Next, we have to make sure CUPS is OK with the sharing. Open up Firefox or your other favourite browser and browse to:

http://localhost:631/printers


Now, browse to:

http://localhost:631/admin


. Make sure that 'Share published printers connected to this system' is checked (enabled).


Note: You need to have administrative privileges to edit the configuration file.

sudo vim /etc/samba/smb.conf

Add the following lines to the bottom of the config file.

[sambashare]
comment= Network Shared Folder by Samba Server on Ubuntu
path = /home/your_username/sambashare
force user = smbuser
force group = smbgroup
create mask = 0664
force create mode = 0664
directory mask = 0775
force directory mode = 0775
public = yes
read only = no

Remember to update the path parameter with your username. You can get your username by running the following command:

echo $USER

To exit the Vim editor after making your changes, simply type :wq and press the Enter key.


https://chat.openai.com/auth/login

https://openai.com/blog/chatgpt/

IDS / IPS :

https://openwips-ng.org/

https://www.fail2ban.org/wiki/index.php/Main_Page

https://zeek.org/

https://www.itprc.com/intrusion-prevention-detection-tools/

Do you need encouragement while typing the best code ever?

Try this:


https://www.tp-link.com/us/support/faq/744/

https://www.tp-link.com/us/support/faq/1497/

https://www.tp-link.com/us/support/faq/1529/

Tuesday, December 20, 2022

Do This After Installing Windows 11

 ++


Do This After Installing Windows 11 In this video I show you how to tweak Windows 11 settings and do the best optimizations for Windows 11 for gaming and performance. This should lower system resources. These optimizations can help gain a little FPS, lower latency and give the pc higher stability by lower utilization of windows. Use the program at your own risk. If this program gets flagged as malware it's a false positive. github.com/xemulat/XToolbox


MORE TIPS FOR PROGRAMMERS:


https://www.howtogeek.com/851425/git-rename-branch/


method 1:

++

method2:

https://youtu.be/H9vJBx2PoD0

https://pegasun.com/system-utilities

Lynis is a battle-tested security tool for systems running Linux, macOS, or Unix-based operating system. It performs an extensive health scan of your systems to support system hardening and compliance testing.

https://cisofy.com/lynis/


Tripwire Integrity Management
Detect and neutralize threats on-site and in the cloud
with superior security and continuous compliance.

https://www.tripwire.com/


Do you need encouragement while typing the best code ever?

Try this:


TIP OF THE DAY !

DOT. NET 3.5 WINDOWS 10 INSTALL...

Thursday, December 15, 2022

Nir Launcher

 https://www.majorgeeks.com/files/details/nirlauncher.html



MORE TIPS=

Otvaranje naloga za subjekte privatnog sektora na Sistemu eFaktura

Sistem e-faktura: Prijava na sistem

Sistem e-faktura: Uputstvo za korisnike


https://www.biljanatrifunovicifa.com/2021/08/knjizno-odobrenje/

https://besplatniobrasci.com/knjizno-zaduzenje/

Yes, You can delete:

C:\Windows\SoftwareDistribution\Download\

if you have any issues with windows update or slowdown of your computer.

The Software Distribution folder is a vital component for Windows Update, which temporarily stores files needed to install new updates. It's safe to clear the content of the said folder because Windows 10 will always re-download and re-created all the necessary file and components, if removed. We always did this as a troubleshooting method if we're having trouble with Windows update.

MORE TO DO:

https://www.ubackup.com/windows-11/windows-11-keeps-freezing.html

DISM.exe /Online /Cleanup-image /Restorehealth

sfc /scannow

chkdsk c: /f /r

appwiz.cpl

Uninstall Sonic Studio 3

https://www.howtogeek.com/805550/the-7-best-registry-hacks-for-windows-11/

https://www.makeuseof.com/common-windows-11-problems

https://www.makeuseof.com/best-coding-apps-for-android

Install Guides (WINE, DXVK, Lutris, etc) linuxconfig.org/improve-your-wine-gaming-on-linux-with-dxvk linuxhint.com/install-lutris-linux




Wednesday, December 14, 2022

An interesting distros

 Big Linux : biglinux.com.br

Modicia OS : modiciaos.cloud
Makulu Linux : makululinux.com

https://downloads-global.3cx.com/downloads/debian10iso/debian-amd64-netinst-3cx.iso






Paradajz
Kelj
Paprika
Brokoli
Pasulj
Riba
Lubenica
Crvene bobice
Citrus voće
Jetra
Kikiriki
Crni i beli luk
Nar
Pileće meso
Sojino mleko
Karfiol
Maline
------------//////nono=
Crveno meso
Rafinisani šećer i brašno
Kofein i alkoholna pića
Mlečne proizvode
Natrijum

++


Do you need encouragement while typing the best code ever?

Try this:


Brezobrazni Winblows folder koji usporava Winblows:
C:/Windows/SoftwareDistribution/Download/

Besplatna zabava za novogodisnje praznike:

https://store.steampowered.com/app/1286830/STAR_WARS_The_Old_Republic/


Tuesday, December 13, 2022

Web3.0 DApp

 Solidity realtime compiler

https://soliditylang.org/

https://ethereum.github.io/browser-solidity/#optimize=false&version=soljson-v0.7.1+commit.f4a555be.js

https://chriseth.github.io/browser-solidity/#version=soljson-latest.js


https://github.com/frozeman/simple-dapp-example


DAS SUPER


++


++


++


Будућност интернета је стигла !


Конкретни садржаји, а не звона и прапорци !

Look is not matter, content is !

Time not important. Only life important.The Fifth Element

++




Banana dijeta:
Doručak je isti svakog dana i sastoji se od jedne ili dve banane.
Prvi dan
Ručak: Supa sa povrćem i kupus salata.
Večera: 100 grama belog pilećeg mesa i salata po želji.
Drugi dan
Ručak: Spanać sa pirinčem i salata.
Večera: 100 grama lososa ili bilo koje druge ribe, komad integralnog hleba i salata po izboru.
Treći dan
Ručak: 50 grama testenine sa paradajz sosom i salata od sveže cvekle.
Večera: 70 grama goveđeg mesa na žaru, komad integralnog hleba i salata.
Četvrti dan
Ručak: Dinstano povrće, paradajz salata.
Večera: Pileći batak bez kožice, salata po izboru.
Peti dan
Ručak: Riblja čorba i salata po izboru.
Večera: 100 grama ćuretine i zelena salata.
Šesti dan
Ručak: Čorba od povrća, salata od svežih krastavaca.
Večera: Pileće ili ćureće meso na roštilju i salata.
Sedmi dan
Ručak: Dinstane pečurke sa pirinčem.
Večera: Grilovano povrće i paradajz salata.
Ovu dijetu možete da praktikujete nedelju dana ili dve, u zavisnosti koliko kilograma želite da smršate.

Jogurt dijeta
Prvi dan:
Doručak: Čaj bez šećera i jedna čaša jogurta sa nula odsto masti.
Ručak: Salata sa zelenom salatom, paradajzom, krastavcem i crnim lukom i dve čaše jogurta sa bobičastim voćem.
Večera: Kuvani spanać i jedna čaša jogurta.
Drugi dan
Doručak: Sok od pomorandže i dve čaše jogurta sa komadićima kivija.
Ručak: Pečena piletina, povrće po izboru i jedna čaša jogurta.
Večera: Kuvana blitva i dve čaše jogurta.
Treći dan
Doručak: Kafa ili čaj i dva jogurta sa voćem po izboru.
Ručak: Losos na žaru i bareno povrće i jedna čaša jogurta.
Večera: Salata od sezonskog voća i jedna čaša jogurta.

Wednesday, December 7, 2022

Kako ubrzati Windows 10 mrcinu

1) Najpre obrisite sve što možete iz foldera:

 C:\Windows\SoftwareDistribution

Sam folder Vam Windows neće dozvoliti da obrišete jer tu pohranjuje sve iz "Update", ali možete obrisati neke foldere i fajlove u njemu.

Posle ovoga Vaš kompjuter će vidno biti mnogo responzivniji i brži.

2) Pritisnite Win + R, u run polju unesite %temp% i pritisnite Enter.

Obrišite sve što možete od ponudjenih fajlova.

3) Pritisnite Win + R, u run polju unesite temp i pritisnite Enter.

Obrišite sve što možete od ponudjenih fajlova.

4) Pritisnite Win + R, u run polju unesite prefetch i pritisnite Enter.

Obrišite sve što možete od ponudjenih fajlova.

Uradite i klasičan Disk Cleanup






http://www.pravno-informacioni-sistem.rs/SlGlasnikPortal/eli/rep/sgrs/skupstina/zakon/2016/6/5/reg

http://www.pravno-informacioni-sistem.rs/SlGlasnikPortal/eli/rep/sgrs/vlada/uredba/2016/94/1/reg

https://ubuntu.com/server/docs/security-smart-cards

I Can’t Imagine Using Windows Without the Everything App

-----------------------------------
--------------------------------------
--------------------------------------

Saturday, December 3, 2022

efakture

Prvo treba otvoriti nalog na https://eid.gov.rs 

Za otvaranje naloga potrebno je da lična karta bude sa čipom i da se u MUP-u besplatno aktivira elektronski sertifikat na ličnoj karti.

Najbolji je Paragraf Kancelarko, ali se može besplatno koristiti i direktan unos faktura na sajtu https://efaktura.mfin.gov.rs

Sajt efaktura je u svakom slučaju potreban kod inicijalizacije korisnika u oba slučaja direktno i kod korišćenja Kancelarka.

Najpre nabavite kvalifikovani elektronski sertifikat u MUP-u na ličnu kartu ili preko PKS, jedan Gemalto čitač kartica, pa onda Vam mogu instalirati ovaj sertifikat i pokazati logovanje na sajt https://efaktura.mfin.gov.rs

Može se sve raditi i preko Android aplikacije ConsentID, ali mnogo jednostavnije ako imate kvalifikovani elektronski sertifikat aktiviran na ličnoj karti ili na kartici PKS.

Demo verzija:

https://demoefaktura.mfin.gov.rs

Radna verzija:

https://efaktura.mfin.gov.rs


Film na youtube u vezi efaktura i Kancelarka :

https://youtu.be/dpRjGE25iSs


Podrška o efakturama i ako želite postaviti pitanja:

podrskaefaktura@mfin.gov.rs

telefon:

011-7777-600


https://fai-project.org/fai-cd/


https://www.usenix.org/legacy/publications/library/proceedings/lisa2000/full_papers/agrawala/agrawala_html/index.html

https://www.freecodecamp.org/news/how-to-dual-boot-any-linux-distribution-with-windows/

https://www.slimjet.com/en/dlpage_xp.php

https://www.majorgeeks.com/files/details/autobootdisk.html

https://www.majorgeeks.com/files/details/multibootusb.html

http://www.kegel.com/wine/cl-howto-win7sdk.html

https://www.howtogeek.com/849716/7-awesome-google-drive-features-you-may-not-know-about/

https://www.howtogeek.com/759925/how-to-install-windows-11-on-an-unsupported-pc/

https://www.howtogeek.com/669971/the-top-10-best-registry-hacks-for-windows-10/


MORE TIPS FROM SECURITY:


Shadow Copy VSS:

https://help.datto.com/s/article/KB200554735

GAMERS TIPS:

https://store.steampowered.com/app/677620/Splitgate/

https://store.steampowered.com/app/570/Dota_2/

https://store.steampowered.com/app/440/Team_Fortress_2/

https://store.steampowered.com/app/1172470/Apex_Legends/

https://store.steampowered.com/app/1085660/Destiny_2/

https://store.steampowered.com/app/730/CounterStrike_Global_Offensive/

https://store.steampowered.com/app/880850/War_Rock/

http://www.truecombatelite.com/index.php?page=downloads

Beware of New CryWiper:

https://www.bleepingcomputer.com/news/security/new-crywiper-data-wiper-targets-russian-courts-mayor-s-offices/

What it can ?:

taskkill.exe /f /im mysqld.exe

taskkill.exe /f /im sqlwriter.exe

taskkill.exe /f /im sqlserver.exe

taskkill.exe /f /im MSExchange*

taskkill.exe /f /im Microsoft.Exchange.*

taskkill.exe /f /im Microsoft.ActiveDirectory.WebServices.exe

vssadmin delete shadows /for=c: /all

schtasks /create /f /sc minute /mo 5 /ru SYSTEM /tn BrowserUpdate /tr C:\\Windows\\system32\\browserupdate.exe