andylizi
本帖最后由 1094822247 于 2016-5-30 20:34 编辑

咳咳。
本来以为1.9.4把服务器黑名单取消了呢,结果没有,只是把代码的位置移到了一个新的库 com.mojang:netty:1.6 而已。白高兴一场。
于是道高一尺魔高一丈,AntiBlock不能用了,机智的群众发明了AntiBlockRel。

效果图:没有。机智的mojang在原先的blockedservers全部被破解后修改了其内容(也有可能是被拉黑的服务器与mojang谈人生表示立刻遵守eula,不过几率不大),新的几条规则仍未被破解,于是我找不到梨子做对比测试了。

下载地址:
http://pan.baidu.com/s/1eRKSR3k

食用方法:
把 netty-1.6.jar 替换进
  1. .minecraft\libraries\com\mojang\netty\1.6\
复制代码
文件夹 ,启动mc即可
啊对了 记得要先关闭客户端。

ju哌y
嗯我们是可以进去服务器了...可是大部分国外群众还是一脸懵逼地卡在服务器菜单..
如果有服务端解决措施就好了

andylizi
ju哌y 发表于 2016-5-24 10:08
嗯我们是可以进去服务器了...可是大部分国外群众还是一脸懵逼地卡在服务器菜单..
如果有服务端解决措施就好 ...

既然mojang是在客户端进行block的,服务端怎么解决呢

3TUSK
所以这就是一个修改版的netty?!

andylizi
u.s.knowledge 发表于 2016-5-24 10:23
所以这就是一个修改版的netty?!

不不不
mojang机智的注入了netty的引导类,在创建Channel前先检查地址。
整个jar就一个类而已

falsh_asan
官方逼死mod
mod反官方

贤者君
233333新1.9反拉黑乱开服的时代来临

呆瓜Domado
Mojang未修改的文件代码是这样的:
package io.netty.bootstrap;

import com.google.common.base.Joiner;
import com.google.common.base.Splitter;
import com.google.common.collect.Lists;
import com.google.common.collect.Sets;
import com.google.common.hash.*;
import io.netty.channel.*;
import io.netty.util.Attribute;
import io.netty.util.AttributeKey;
import io.netty.util.concurrent.Future;
import io.netty.util.concurrent.GlobalEventExecutor;
import io.netty.util.internal.EmptyArrays;
import io.netty.util.internal.logging.InternalLogger;
import io.netty.util.internal.logging.InternalLoggerFactory;
import java.io.IOException;
import java.net.*;
import java.nio.charset.Charset;
import java.util.*;
import org.apache.commons.io.IOUtils;

// Referenced classes of package io.netty.bootstrap:
//                        AbstractBootstrap, ChannelFactory

public final class Bootstrap extends AbstractBootstrap
{

        private static final InternalLogger logger = InternalLoggerFactory.getInstance(io/netty/bootstrap/Bootstrap);
        private volatile SocketAddress remoteAddress;
        private static final Joiner DOT_JOINER = Joiner.on('.');
        private static final Splitter DOT_SPLITTER = Splitter.on('.');
        static final Set BLOCKED_SERVERS;

        public Bootstrap()
        {
        }

        private Bootstrap(Bootstrap bootstrap)
        {
                super(bootstrap);
                remoteAddress = bootstrap.remoteAddress;
        }

        public Bootstrap remoteAddress(SocketAddress remoteAddress)
        {
                this.remoteAddress = remoteAddress;
                return this;
        }

        public Bootstrap remoteAddress(String inetHost, int inetPort)
        {
                remoteAddress = new InetSocketAddress(inetHost, inetPort);
                return this;
        }

        public Bootstrap remoteAddress(InetAddress inetHost, int inetPort)
        {
                remoteAddress = new InetSocketAddress(inetHost, inetPort);
                return this;
        }

        public ChannelFuture connect()
        {
                validate();
                SocketAddress remoteAddress = this.remoteAddress;
                if (remoteAddress == null)
                        throw new IllegalStateException("remoteAddress not set");
                else
                        return doConnect(remoteAddress, localAddress());
        }

        public ChannelFuture connect(String inetHost, int inetPort)
        {
                return connect(((SocketAddress) (new InetSocketAddress(inetHost, inetPort))));
        }

        public ChannelFuture connect(InetAddress inetHost, int inetPort)
        {
                return connect(((SocketAddress) (new InetSocketAddress(inetHost, inetPort))));
        }

        public ChannelFuture connect(SocketAddress remoteAddress)
        {
                if (remoteAddress == null)
                {
                        throw new NullPointerException("remoteAddress");
                } else
                {
                        validate();
                        return doConnect(remoteAddress, localAddress());
                }
        }

        public ChannelFuture connect(SocketAddress remoteAddress, SocketAddress localAddress)
        {
                if (remoteAddress == null)
                {
                        throw new NullPointerException("remoteAddress");
                } else
                {
                        validate();
                        return doConnect(remoteAddress, localAddress);
                }
        }

        private ChannelFuture doConnect(final SocketAddress remoteAddress, final SocketAddress localAddress)
        {
                ChannelFuture future = checkAddress(remoteAddress);
                if (future != null)
                        return future;
                final ChannelFuture regFuture = initAndRegister();
                final Channel channel = regFuture.channel();
                if (regFuture.cause() != null)
                        return regFuture;
                final ChannelPromise promise = channel.newPromise();
                if (regFuture.isDone())
                        doConnect0(regFuture, channel, remoteAddress, localAddress, promise);
                else
                        regFuture.addListener(new ChannelFutureListener() {

                                final ChannelFuture val$regFuture;
                                final Channel val$channel;
                                final SocketAddress val$remoteAddress;
                                final SocketAddress val$localAddress;
                                final ChannelPromise val$promise;
                                final Bootstrap this$0;

                                public void operationComplete(ChannelFuture future)
                                        throws Exception
                                {
                                        Bootstrap.doConnect0(regFuture, channel, remoteAddress, localAddress, promise);
                                }

                                public volatile void operationComplete(Future future1)
                                        throws Exception
                                {
                                        operationComplete((ChannelFuture)future1);
                                }

                        
                        {
                                this.this$0 = Bootstrap.this;
                                regFuture = channelfuture;
                                channel = channel1;
                                remoteAddress = socketaddress;
                                localAddress = socketaddress1;
                                promise = channelpromise;
                                super();
                        }
                        });
                return promise;
        }

        private static void doConnect0(ChannelFuture regFuture, Channel channel, SocketAddress remoteAddress, SocketAddress localAddress, ChannelPromise promise)
        {
                channel.eventLoop().execute(new Runnable(regFuture, localAddress, channel, remoteAddress, promise) {

                        final ChannelFuture val$regFuture;
                        final SocketAddress val$localAddress;
                        final Channel val$channel;
                        final SocketAddress val$remoteAddress;
                        final ChannelPromise val$promise;

                        public void run()
                        {
                                if (regFuture.isSuccess())
                                {
                                        if (localAddress == null)
                                                channel.connect(remoteAddress, promise);
                                        else
                                                channel.connect(remoteAddress, localAddress, promise);
                                        promise.addListener(ChannelFutureListener.CLOSE_ON_FAILURE);
                                } else
                                {
                                        promise.setFailure(regFuture.cause());
                                }
                        }

                        
                        {
                                regFuture = channelfuture;
                                localAddress = socketaddress;
                                channel = channel1;
                                remoteAddress = socketaddress1;
                                promise = channelpromise;
                                super();
                        }
                });
        }

        void init(Channel channel)
                throws Exception
        {
                ChannelPipeline p = channel.pipeline();
                p.addLast(new ChannelHandler[] {
                        handler()
                });
                Map options = options();
                synchronized (options)
                {
                        Iterator iterator = options.entrySet().iterator();
                        do
                        {
                                if (!iterator.hasNext())
                                        break;
                                java.util.Map.Entry e = (java.util.Map.Entry)iterator.next();
                                try
                                {
                                        if (!channel.config().setOption((ChannelOption)e.getKey(), e.getValue()))
                                                logger.warn((new StringBuilder()).append("Unknown channel option: ").append(e).toString());
                                }
                                catch (Throwable t)
                                {
                                        logger.warn((new StringBuilder()).append("Failed to set a channel option: ").append(channel).toString(), t);
                                }
                        } while (true);
                }
                Map attrs = attrs();
                synchronized (attrs)
                {
                        java.util.Map.Entry e;
                        for (Iterator iterator1 = attrs.entrySet().iterator(); iterator1.hasNext(); channel.attr((AttributeKey)e.getKey()).set(e.getValue()))
                                e = (java.util.Map.Entry)iterator1.next();

                }
        }

        public Bootstrap validate()
        {
                super.validate();
                if (handler() == null)
                        throw new IllegalStateException("handler not set");
                else
                        return this;
        }

        public Bootstrap clone()
        {
                return new Bootstrap(this);
        }

        public String toString()
        {
                if (remoteAddress == null)
                {
                        return super.toString();
                } else
                {
                        StringBuilder buf = new StringBuilder(super.toString());
                        buf.setLength(buf.length() - 1);
                        buf.append(", remoteAddress: ");
                        buf.append(remoteAddress);
                        buf.append(')');
                        return buf.toString();
                }
        }

        ChannelFuture checkAddress(SocketAddress remoteAddress)
        {
                if (remoteAddress instanceof InetSocketAddress)
                {
                        InetAddress address = ((InetSocketAddress)remoteAddress).getAddress();
                        if (isBlockedServer(address.getHostAddress()) || isBlockedServer(address.getHostName()))
                        {
                                Channel channel = channelFactory().newChannel();
                                channel.unsafe().closeForcibly();
                                SocketException cause = new SocketException("Network is unreachable");
                                cause.setStackTrace(EmptyArrays.EMPTY_STACK_TRACE);
                                return (new DefaultChannelPromise(channel, GlobalEventExecutor.INSTANCE)).setFailure(cause);
                        }
                }
                return null;
        }

        public boolean isBlockedServer(String server)
        {
                List strings;
                boolean isIp;
                Iterator iterator;
                if (server == null || server.isEmpty())
                        return false;
                for (; server.charAt(server.length() - 1) == '.'; server = server.substring(0, server.length() - 1));
                if (isBlockedServerHostName(server))
                        return true;
                strings = Lists.newArrayList(DOT_SPLITTER.split(server));
                isIp = strings.size() == 4;
                if (!isIp)
                        break MISSING_BLOCK_LABEL_147;
                iterator = strings.iterator();
_L2:
                String string;
                if (!iterator.hasNext())
                        break MISSING_BLOCK_LABEL_147;
                string = (String)iterator.next();
                int part = Integer.parseInt(string);
                if (part < 0 || part > 255)
                        break MISSING_BLOCK_LABEL_142;
                if (true) goto _L2; else goto _L1
_L1:
                NumberFormatException ignored;
                ignored;
                isIp = false;
                if (!isIp && isBlockedServerHostName((new StringBuilder()).append("*.").append(server).toString()))
                        return true;
                while (strings.size() > 1)
                {
                        strings.remove(isIp ? strings.size() - 1 : 0);
                        String starredPart = isIp ? (new StringBuilder()).append(DOT_JOINER.join(strings)).append(".*").toString() : (new StringBuilder()).append("*.").append(DOT_JOINER.join(strings)).toString();
                        if (isBlockedServerHostName(starredPart))
                                return true;
                }
                return false;
        }

        private boolean isBlockedServerHostName(String server)
        {
                return BLOCKED_SERVERS.contains(Hashing.sha1().hashBytes(server.toLowerCase().getBytes(Charset.forName("ISO-8859-1"))).toString());
        }

        public volatile AbstractBootstrap clone()
        {
                return clone();
        }

        public volatile AbstractBootstrap validate()
        {
                return validate();
        }

        public volatile Object clone()
                throws CloneNotSupportedException
        {
                return clone();
        }

        static
        {
                BLOCKED_SERVERS = Sets.newHashSet();
                try
                {
                        BLOCKED_SERVERS.addAll(IOUtils.readLines((new URL("https://sessionserver.mojang.com/blockedservers")).openConnection().getInputStream()));
                }
                catch (IOException e) { }
        }

}

被修改后的文件是这样的:
package io.netty.bootstrap;

import io.netty.channel.*;
import io.netty.util.Attribute;
import io.netty.util.AttributeKey;
import io.netty.util.concurrent.Future;
import io.netty.util.concurrent.GlobalEventExecutor;
import io.netty.util.internal.EmptyArrays;
import io.netty.util.internal.logging.InternalLogger;
import io.netty.util.internal.logging.InternalLoggerFactory;
import java.net.*;
import java.util.*;

// Referenced classes of package io.netty.bootstrap:
//                        AbstractBootstrap, ChannelFactory

public final class Bootstrap extends AbstractBootstrap
{

        private static final InternalLogger logger = InternalLoggerFactory.getInstance(io/netty/bootstrap/Bootstrap);
        private volatile SocketAddress remoteAddress;

        private Bootstrap(Bootstrap bootstrap)
        {
                super(bootstrap);
                remoteAddress = bootstrap.remoteAddress;
        }

        public Bootstrap remoteAddress(SocketAddress remoteAddress)
        {
                this.remoteAddress = remoteAddress;
                return this;
        }

        public Bootstrap remoteAddress(String inetHost, int inetPort)
        {
                remoteAddress = new InetSocketAddress(inetHost, inetPort);
                return this;
        }

        public Bootstrap remoteAddress(InetAddress inetHost, int inetPort)
        {
                remoteAddress = new InetSocketAddress(inetHost, inetPort);
                return this;
        }

        public ChannelFuture connect()
        {
                validate();
                SocketAddress remoteAddress = this.remoteAddress;
                if (remoteAddress == null)
                        throw new IllegalStateException("remoteAddress not set");
                else
                        return doConnect(remoteAddress, localAddress());
        }

        public ChannelFuture connect(String inetHost, int inetPort)
        {
                return connect(((SocketAddress) (new InetSocketAddress(inetHost, inetPort))));
        }

        public ChannelFuture connect(InetAddress inetHost, int inetPort)
        {
                return connect(((SocketAddress) (new InetSocketAddress(inetHost, inetPort))));
        }

        public ChannelFuture connect(SocketAddress remoteAddress)
        {
                if (remoteAddress == null)
                {
                        throw new NullPointerException("remoteAddress");
                } else
                {
                        validate();
                        return doConnect(remoteAddress, localAddress());
                }
        }

        public ChannelFuture connect(SocketAddress remoteAddress, SocketAddress localAddress)
        {
                if (remoteAddress == null)
                {
                        throw new NullPointerException("remoteAddress");
                } else
                {
                        validate();
                        return doConnect(remoteAddress, localAddress);
                }
        }

        private ChannelFuture doConnect(final SocketAddress remoteAddress, final SocketAddress localAddress)
        {
                ChannelFuture future = checkAddress(remoteAddress);
                if (future != null)
                        return future;
                final ChannelFuture regFuture = initAndRegister();
                final Channel channel = regFuture.channel();
                if (regFuture.cause() != null)
                        return regFuture;
                final ChannelPromise promise = channel.newPromise();
                if (regFuture.isDone())
                        doConnect0(regFuture, channel, remoteAddress, localAddress, promise);
                else
                        regFuture.addListener(new ChannelFutureListener() {

                                final ChannelFuture val$regFuture;
                                final Channel val$channel;
                                final SocketAddress val$remoteAddress;
                                final SocketAddress val$localAddress;
                                final ChannelPromise val$promise;
                                final Bootstrap this$0;

                                public void operationComplete(ChannelFuture future)
                                        throws Exception
                                {
                                        Bootstrap.doConnect0(regFuture, channel, remoteAddress, localAddress, promise);
                                }

                                public volatile void operationComplete(Future future1)
                                        throws Exception
                                {
                                        operationComplete((ChannelFuture)future1);
                                }

                        
                        {
                                this$0 = Bootstrap.this;
                                regFuture = channelfuture;
                                channel = channel1;
                                remoteAddress = socketaddress;
                                localAddress = socketaddress1;
                                promise = channelpromise;
                                super();
                        }
                        });
                return promise;
        }

        private static void doConnect0(ChannelFuture regFuture, Channel channel, SocketAddress remoteAddress, SocketAddress localAddress, ChannelPromise promise)
        {
                channel.eventLoop().execute(new Runnable(regFuture, localAddress, channel, remoteAddress, promise) {

                        final ChannelFuture val$regFuture;
                        final SocketAddress val$localAddress;
                        final Channel val$channel;
                        final SocketAddress val$remoteAddress;
                        final ChannelPromise val$promise;

                        public void run()
                        {
                                if (regFuture.isSuccess())
                                {
                                        if (localAddress == null)
                                                channel.connect(remoteAddress, promise);
                                        else
                                                channel.connect(remoteAddress, localAddress, promise);
                                        promise.addListener(ChannelFutureListener.CLOSE_ON_FAILURE);
                                } else
                                {
                                        promise.setFailure(regFuture.cause());
                                }
                        }

                        
                        {
                                regFuture = channelfuture;
                                localAddress = socketaddress;
                                channel = channel1;
                                remoteAddress = socketaddress1;
                                promise = channelpromise;
                                super();
                        }
                });
        }

        void init(Channel channel)
                throws Exception
        {
                ChannelPipeline p = channel.pipeline();
                p.addLast(new ChannelHandler[] {
                        handler()
                });
                Map options = options();
                synchronized (options)
                {
                        Iterator localIterator = options.entrySet().iterator();
                        do
                        {
                                if (!localIterator.hasNext())
                                        break;
                                java.util.Map.Entry e = (java.util.Map.Entry)localIterator.next();
                                try
                                {
                                        if (!channel.config().setOption((ChannelOption)e.getKey(), e.getValue()))
                                                logger.warn((new StringBuilder()).append("Unknown channel option: ").append(e).toString());
                                }
                                catch (Throwable t)
                                {
                                        logger.warn((new StringBuilder()).append("Failed to set a channel option: ").append(channel).toString(), t);
                                }
                        } while (true);
                }
                Map attrs = attrs();
                synchronized (attrs)
                {
                        java.util.Map.Entry e;
                        for (Iterator i$ = attrs.entrySet().iterator(); i$.hasNext(); channel.attr((AttributeKey)e.getKey()).set(e.getValue()))
                                e = (java.util.Map.Entry)i$.next();

                }
        }

        public Bootstrap validate()
        {
                super.validate();
                if (handler() == null)
                        throw new IllegalStateException("handler not set");
                else
                        return this;
        }

        public Bootstrap clone()
        {
                return new Bootstrap(this);
        }

        public String toString()
        {
                if (remoteAddress == null)
                {
                        return super.toString();
                } else
                {
                        StringBuilder buf = new StringBuilder(super.toString());
                        buf.setLength(buf.length() - 1);
                        buf.append(", remoteAddress: ");
                        buf.append(remoteAddress);
                        buf.append(')');
                        return buf.toString();
                }
        }

        ChannelFuture checkAddress(SocketAddress remoteAddress)
        {
                if (remoteAddress instanceof InetSocketAddress)
                {
                        InetAddress address = ((InetSocketAddress)remoteAddress).getAddress();
                        if (isBlockedServer(address.getHostAddress()) || isBlockedServer(address.getHostName()))
                        {
                                Channel channel = channelFactory().newChannel();
                                channel.unsafe().closeForcibly();
                                SocketException cause = new SocketException("Network is unreachable");
                                cause.setStackTrace(EmptyArrays.EMPTY_STACK_TRACE);
                                return (new DefaultChannelPromise(channel, GlobalEventExecutor.INSTANCE)).setFailure(cause);
                        }
                }
                return null;
        }

        public boolean isBlockedServer(String server)
        {
                return false;
        }

        private boolean isBlockedServerHostName(String server)
        {
                return false;
        }

        public Bootstrap()
        {
        }

        public volatile AbstractBootstrap clone()
        {
                return clone();
        }

        public volatile AbstractBootstrap validate()
        {
                return validate();
        }

        public volatile Object clone()
                throws CloneNotSupportedException
        {
                return clone();
        }

}

反编译之后瞬间懂了

hhhhaa
有1.7.10的破解方法吗

wang6615
{:10_512:}

andylizi
hhhhaa 发表于 2016-5-24 18:11
有1.7.10的破解方法吗

1.7.10要破解个啥