CARVIEW |
Select Language
HTTP/2 200
date: Sun, 12 Oct 2025 19:51:50 GMT
content-type: text/html; charset=UTF-8
server: cloudflare
x-frame-options: DENY
x-content-type-options: nosniff
x-xss-protection: 1;mode=block
vary: accept-encoding
cf-cache-status: DYNAMIC
content-encoding: gzip
set-cookie: _csrf-frontend=fed21f2d5375b2d134500c29b68ad05bee161efda09e13aeb8bea8b5d9cfa77ea%3A2%3A%7Bi%3A0%3Bs%3A14%3A%22_csrf-frontend%22%3Bi%3A1%3Bs%3A32%3A%22V0m4xgaJ0RdCjbWDpRY4dUdNIaQtEWJ7%22%3B%7D; HttpOnly; Path=/
cf-ray: 98d9225a9c08c1c2-BLR
WinSock_UDP_S - Pastebin.com
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // WinSock()_S_Udp.cpp : Defines the entry point for the console application.
- //
- #include <stdio.h>
- #include <string.h>
- #include <winsock.h>
- #include <conio.h>
- struct Dane{
- char name;
- int liczba;
- };
- int main()
- {
- WORD wersja= MAKEWORD(2, 2);
- WSADATA wsData;
- if (WSAStartup(wersja, &wsData) != 0)
- {
- printf("Blad inicjalizacji WinSock()!");
- _getch();
- return 0;
- }
- //////////////////////////
- SOCKET gniazdo;
- if ((gniazdo = socket(AF_INET, SOCK_DGRAM, 0)) == INVALID_SOCKET)
- {
- printf("Blad ladowania gniazda: %d",INVALID_SOCKET);
- shutdown(gniazdo, 2);
- closesocket(gniazdo);
- WSACleanup();
- _getch();
- return 0;
- }
- //////////////////////////
- SOCKADDR_IN serwer;
- serwer.sin_family = AF_INET;
- serwer.sin_addr.s_addr = INADDR_ANY;
- serwer.sin_port = htons(1234);
- if ((bind(gniazdo, (SOCKADDR*)&serwer, sizeof(serwer))) == SOCKET_ERROR)
- {
- printf("Blad ladowania gniazda: %d", WSAGetLastError());
- shutdown(gniazdo, 2);
- closesocket(gniazdo);
- WSACleanup();
- _getch();
- return 0;
- }
- Dane pakunek;
- pakunek.name = 'd';
- pakunek.liczba = 94;
- char buff[8];
- memset(buff, 0, sizeof(buff));
- char odebrane[3];
- SOCKADDR_IN klient;
- int odebrany = sizeof(klient);
- while(true)
- {
- if (recvfrom(gniazdo, odebrane, sizeof(odebrane), 0, (SOCKADDR*)&klient, &odebrany)==SOCKET_ERROR)
- {
- printf("Blad danych!");
- break;
- }
- memset(odebrane, 0, sizeof(odebrane));
- printf("Odebralem znaki %s\n", odebrane);
- if (sendto(gniazdo, (char*)&pakunek, sizeof(pakunek), 0, (SOCKADDR*)&klient, sizeof(klient)) == INVALID_SOCKET)
- {
- printf("Odbieranie sie nie powiodlo");
- }
- }
- //////////////////////////
- _getch();
- shutdown(gniazdo, 2);
- closesocket(gniazdo);
- WSACleanup();
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
-
💎 ChangeNOW Exploit
JavaScript | 1 sec ago | 0.24 KB
-
⭐⭐⭐Make $15OO in 2O minutesV G⭐⭐
Java | 4 sec ago | 0.15 KB
-
⭐⭐⭐Instant Profit Method⭐⭐
Java | 10 sec ago | 0.15 KB
-
🚨 Free Crypto Method 🚨
JavaScript | 12 sec ago | 0.24 KB
-
⭐⭐⭐MAKE $9OO INSTANTLY D G⭐⭐
Java | 15 sec ago | 0.15 KB
-
💡 EASY MONEY GUIDE ✅ Working
JavaScript | 23 sec ago | 0.24 KB
-
⭐⭐⭐Exchange Exploit T I⭐⭐
Java | 26 sec ago | 0.15 KB
-
🔥 Exchange profit method
JavaScript | 33 sec ago | 0.24 KB
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand