de.tsl2.nano.core.util.NetUtil.class Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of tsl2.nano.terminal Show documentation
Show all versions of tsl2.nano.terminal Show documentation
TSL2 Framework Terminal (Console Application Framework named SIShell, providing Actions, Options, Commands, Inputs, lots of Selectors, PlatformManagement)
???? 4?
t
t
!
"
#$
%
&
'
(
)*+
,
-.
/01 t2345
t6
N7
89
?:4;<
=>4?@A4B
tC
=D
EF
tGH
1I
JKLM
NO
tP
I
Q
RS
?T ?UV
tW
?X
?Y
NZ[
\]
\^
t_
t`
?ab
?cde
?fg
?hij
NI
?k
?lm
?n
?opq
Wr
tst
Nu
8v
ZI
Zw
txy
z{
Z|
Z}
Z~?
N/
8?
?
Z????
??
??
kI
R???
8????
yI
y????
??
8?
????
?? t?
z? t?
t? t??
??
??
??
??
??
?? z?
E? ??
t??
??
??
t?????
t???????
???
?I
??????????
??
?????
???
??
????
t??
??
??? ??? ?? ??
?c
???????
z??
?
?? ??
t?
????
?c?
?
??
t?
t?
??
N?
??
??
?^
??
???
t??
??
N?????
???
??
??
?
?
?
?^
t
t??
w
?
8
?
?
???
{
!"
z#$???????% URL_STANDARDFILENAME Ljava/lang/String;
ConstantValue LOG Lorg/apache/commons/logging/Log; isonline Z deltaOnlineCheck J lastOnlineCheck ()V Code LineNumberTable LocalVariableTable this Lde/tsl2/nano/core/util/NetUtil; getInetAddress ()Ljava/net/InetAddress; e Ljava/net/UnknownHostException;
StackMapTable getLocalhost ()Ljava/lang/String; getMyIP getMyAddress inetAddress Ljava/net/InetAddress; ni Ljava/net/NetworkInterface; inetAdresses Ljava/util/Enumeration; networkInterfaces Ljava/lang/Exception; LocalVariableTypeTable /Ljava/util/Enumeration; 4Ljava/util/Enumeration;&$*
getNetInfo str Ljava/lang/StringBuilder; Ljava/net/SocketException;+1 get &(Ljava/lang/String;)Ljava/lang/String; response info strUrl? browse *(Ljava/lang/String;Ljava/io/PrintStream;)V out Ljava/io/PrintStream; getRestfulJSON A(Ljava/lang/String;[Ljava/lang/Object;)Ljavax/json/JsonStructure; url args [Ljava/lang/Object; jsonStr getRest 5(Ljava/lang/String;Ljava/util/Map;)Ljava/lang/String; Ljava/util/Map; 9(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String; getRest_ ;(Ljava/lang/String;[C[Ljava/lang/Object;)Ljava/lang/String; i I buf c C [C
separators^Q getURLStream )(Ljava/lang/String;)Ljava/io/InputStream; K(Ljava/lang/String;Ljava/net/Proxy;Ljava/lang/String;)Ljava/io/InputStream; con Ljava/net/URLConnection; proxy Ljava/net/Proxy; accept "(Ljava/lang/String;)Ljava/net/URL; surl isURI (Ljava/lang/String;)Z isURL (Ljava/lang/String;Z)Z uri Ljava/net/URI;? 4(Ljava/lang/String;Ljava/lang/String;)Ljava/net/URL; Ljava/net/MalformedURLException; parentp download 4(Ljava/lang/String;Ljava/lang/String;)Ljava/io/File; destDir 6(Ljava/lang/String;Ljava/lang/String;ZZ)Ljava/io/File; flat overwrite 2(Ljava/net/URL;Ljava/lang/String;ZZ)Ljava/io/File; fileName file Ljava/io/File; Ljava/net/URL;it check $(Ljava/lang/String;Ljava/io/File;J)V
estimatedSize getFileName "(Ljava/net/URL;)Ljava/lang/String; f wcopy K(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V dir include exclude upload 8(Ljava/net/Socket;Ljava/lang/String;Ljava/lang/String;)V Ljava/io/IOException; socket Ljava/net/Socket; name stream Ljava/io/InputStream;?'?( isOnline ()Z getFreePort ()I s Ljava/net/ServerSocket; port getNextFreePort (I)I startingPort Ljava/lang/Integer;) $(Ljava/lang/String;)Ljava/net/Proxy; testURI 6(Ljava/lang/String;Ljava/lang/String;)Ljava/net/Proxy; newProxy Z(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)Ljava/net/Proxy; [Ljava/lang/String; user passwd host [(Ljava/lang/String;Ljava/lang/String;ILjava/lang/String;Ljava/lang/String;)Ljava/net/Proxy; addr Ljava/net/InetSocketAddress; Ljava/net/SocketAddress; type* Type InnerClasses Ljava/net/Proxy$Type; protProxies Ljava/util/List; currentProxy Ljava/net/URISyntaxException; newProxyHost protocol "Ljava/util/List;+?,?-*? getSystem k setSystem @(Ljava/lang/String;Ljava/lang/String;Ljava/lang/StringBuilder;)V v log getNetworkHosts ()Ljava/util/List; list Ljava/util/LinkedList; .Ljava/util/LinkedList;? Signature *()Ljava/util/List; isOpen (Ljava/net/InetAddress;I)Z ip (I)Z connect &(Ljava/lang/String;I)Ljava/net/Socket; send K(Ljava/lang/String;ILjava/lang/Class;[Ljava/lang/Object;)Ljava/lang/Object;
resultType Ljava/lang/Class; Ljava/lang/Class;.% W(Ljava/lang/String;ILjava/lang/Class;[Ljava/lang/Object;)TT; I(Ljava/net/Socket;Ljava/lang/Class;[Ljava/lang/Object;)Ljava/lang/Object; U(Ljava/net/Socket;Ljava/lang/Class;[Ljava/lang/Object;)TT; httpResponse \(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String; wsUrl method contenttype data http _(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)Ljava/io/InputStream; os Ljava/io/OutputStream; conn Ljava/net/HttpURLConnection;? scan )(Ljava/net/InetAddress;II)Ljava/util/Map; minPort maxPort Z(Ljava/net/InetAddress;II)Ljava/util/Map; scans &(II[Ljava/lang/String;)Ljava/util/Map; ips nips [Ljava/net/InetAddress; W(II[Ljava/lang/String;)Ljava/util/Map; *(II[Ljava/net/InetAddress;)Ljava/util/Map; p a props Ljava/util/Properties; timeout worker Lde/tsl2/nano/core/util/Worker; result ns Ljava/util/Set; PLde/tsl2/nano/core/util/Worker; @Ljava/util/Map; -Ljava/util/Set;/012 [(II[Ljava/net/InetAddress;)Ljava/util/Map;
SourceFile NetUtil.java3% java/net/UnknownHostException456$%7+-%89&:?;< java/net/NetworkInterface=?>???@9 java/net/InetAddressA?B?C?D?E% java/lang/Exception java/lang/StringBuilderF+GH
I+ java/net/SocketException starting request: JFKOjLMNOPQRS?
response: TIUVK #javax/net/ssl/SSLHandshakeException?
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
Java failed to decrypt 256 bits of encryption. Solutions:
Java 6: Add below jars into {JAVA_HOME}/jre/lib/ext. 1. bcprov-ext-jdk15on-154.jar 2. bcprov-jdk15on-154.jar
Add property into {JAVA_HOME}/jre/lib/security/java.security security.provider.1=org.bouncycastle.jce.provider.BouncyCastleProvider
Java 7:download jar from below link and add to {JAVA_HOME}/jre/lib/security http://www.oracle.com/technetwork/java/javase/downloads/jce-7-download-432124.html
Java 8:download jar from below link and add to {JAVA_HOME}/jre/lib/security http://www.oracle.com/technetwork/java/javase/downloads/jce8-download-2133166.html
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
WKCDXDYZ[SV java/io/StringReader[\]^_`abcdSXGefghijkh bdlmnopq AcceptrstuMOslov? /wx /null .yz //{m java/net/URL http:|+}+ http://~m? java/net/MalformedURLException java/lang/RuntimeException?w} java/io/File?+?D?+?? user.dir??D?????? downloading from: ?????? java/lang/IllegalStateException download of < failed! not all bytes were downloaded. expected length of 'G? ': G? bytes but was: vx de/tsl2/nano/core/util/NetUtil
index.html?D ==> starting downloading site: to directory: de/tsl2/nano/core/util/WCopyC? <== finished downloading site:
uploading to socket ????'? java/io/IOException tsl2nano.offline?m??,+ www.google.com?? java/net/ServerSocket???)Q???KL?[g? \:??Q?g? \:\/\/ ?to see the organisations automatic proxy definitions, open the 'Proxy-Auto-Config-(PAC)-Standard' file, mostly http://wpad/wpad.dat or http://wpad.com/wpad.dat (-->'Web Proxy Autodiscovery Protocol') in your browser! current system properties: { proxyHost?D proxyPort proxyUser
proxyPassword } detecting current proxies on :??? java/net/URI??+??,???< java/net/Proxy - PROXY type: ???? java/net/InetSocketAddress (No Proxy)
hostName: ?+
http.proxyPort = ??G?
setting new system properties: java.net.useSystemProxies true?? proxySetQ???? sock????? java/net/URISyntaxException
=
key= , value=?? java/util/LinkedList?x?????1C? java/net/Socket????????????????? java/lang/String?? UTF-8?p? java/net/HttpURLConnection POST PUT DELETE?? Content-Type?t????[??????.???i? /networkports.properties?? portscan java/lang/Thread java/lang/Boolean???0?? java/lang/Runnable de/tsl2/nano/core/util/PortScan??????? 8========== network-port-check finished ================
open ports:
??2 : /??? netutil.delta.onlinecheck 5000?? java/lang/Long java/lang/Object java/util/Enumeration java/io/InputStream java/lang/Throwable java/lang/Integer java/net/Proxy$Type java/util/List java/util/Iterator java/net/SocketAddress java/lang/Class java/util/Properties de/tsl2/nano/core/util/Worker
java/util/Map
java/util/Set getLocalHost "de/tsl2/nano/core/ManagedException forward ,(Ljava/lang/Throwable;)Ljava/lang/Throwable; getHostAddress getNetworkInterfaces ()Ljava/util/Enumeration; hasMoreElements nextElement ()Ljava/lang/Object; isUp isVirtual
isLoopback getInetAddresses isAnyLocalAddress isLinkLocalAddress isMulticastAddress isReachable getLoopbackAddress getDisplayName append -(Ljava/lang/String;)Ljava/lang/StringBuilder; toString org/apache/commons/logging/Log (Ljava/lang/Object;)V
openStream ()Ljava/io/InputStream; de/tsl2/nano/core/util/FileUtil getFileData +(Ljava/io/InputStream;Ljava/lang/String;)[C valueOf ([C)Ljava/lang/String; isDebugEnabled !de/tsl2/nano/core/util/StringUtil '(Ljava/lang/Object;I)Ljava/lang/String; debug error
removeXMLTags java/io/PrintStream println (Ljava/lang/String;)V javax/json/Json createReader )(Ljava/io/Reader;)Ljavax/json/JsonReader; javax/json/JsonReader read ()Ljavax/json/JsonStructure; de/tsl2/nano/core/util/MapUtil asArray $(Ljava/util/Map;)[Ljava/lang/Object; (C)Ljava/lang/StringBuilder; de/tsl2/nano/core/util/Util asString &(Ljava/lang/Object;)Ljava/lang/String; replace (CC)Ljava/lang/String; NO_PROXY create "(Ljava/lang/String;)Ljava/net/URI; toURL ()Ljava/net/URL; openConnection *(Ljava/net/Proxy;)Ljava/net/URLConnection; java/net/URLConnection addRequestProperty '(Ljava/lang/String;Ljava/lang/String;)V getInputStream isEmpty equals (Ljava/lang/Object;)Z contains (Ljava/lang/CharSequence;)Z
startsWith getScheme getHost endsWith substring (I)Ljava/lang/String; (Ljava/lang/Throwable;)V getFile getValidFileName getName java/lang/System getProperty exists
getParentFile ()Ljava/io/File; mkdirs write *(Ljava/io/InputStream;Ljava/lang/String;)J toRuntimeEx 5(Ljava/lang/Throwable;ZZ)Ljava/lang/RuntimeException; length ()J -(Ljava/lang/Object;)Ljava/lang/StringBuilder; (J)Ljava/lang/StringBuilder; getValidPathName L(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Z)V getOutputStream ()Ljava/io/OutputStream; A(Ljava/io/InputStream;Ljava/io/OutputStream;Ljava/lang/String;Z)J close
getBoolean currentTimeMillis getByName *(Ljava/lang/String;)Ljava/net/InetAddress; (I)V getLocalPort (I)Ljava/lang/Integer; intValue print split '(Ljava/lang/String;)[Ljava/lang/String; '(Ljava/lang/String;)Ljava/lang/Integer; java/net/ProxySelector
getDefault ()Ljava/net/ProxySelector; select (Ljava/net/URI;)Ljava/util/List; iterator ()Ljava/util/Iterator; hasNext next ()Ljava/net/Proxy$Type; address ()Ljava/net/SocketAddress; getHostName getPort (I)Ljava/lang/StringBuilder; (Ljava/lang/String;I)V HTTP SOCKS DIRECT 0(Ljava/net/Proxy$Type;Ljava/net/SocketAddress;)V setProperty 8(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String; add TRUE Ljava/lang/Boolean; (Ljava/net/InetAddress;I)V &(Ljava/lang/Object;)Ljava/lang/Object; (Ljava/net/SocketAddress;I)V asMap $([Ljava/lang/Object;)Ljava/util/Map; !de/tsl2/nano/core/util/ObjectUtil serialize (Ljava/lang/Object;)[B java/io/OutputStream ([B)V de/tsl2/nano/core/util/ByteUtil toByteArray (Ljava/io/InputStream;)[B ([BLjava/lang/String;)V ()Ljava/net/URLConnection; setDoOutput (Z)V setRequestProperty getBytes ()[B flush setRequestMethod toArray (([Ljava/lang/Object;)[Ljava/lang/Object;
getPackage ()Ljava/lang/Package; java/lang/Package D(Ljava/lang/CharSequence;Ljava/lang/CharSequence;)Ljava/lang/String; loadProperties A(Ljava/lang/String;Ljava/lang/ClassLoader;)Ljava/util/Properties; %de/tsl2/nano/core/util/ConcurrentUtil createParallelWorker V(Ljava/lang/String;ILjava/lang/Class;Ljava/lang/Class;)Lde/tsl2/nano/core/util/Worker; getResult ()Ljava/util/Map; /(Ljava/net/InetSocketAddress;ILjava/util/Map;)V run ([Ljava/lang/Runnable;)V waitForJobs (J)Ljava/util/Map; size keySet ()Ljava/util/Set; de/tsl2/nano/core/log/LogFactory getLog 3(Ljava/lang/Class;)Lorg/apache/commons/logging/Log; ! t u
0 / *? ? =! "# $% V ? ?K*? W? O P Q
R! &' ( D) *+ ? ? ? ] ,+ ? ? ? a -% x }? K*? ? g*?
? L+? ???+?
???+? ? ???+? M,? ? 4,?
? N-? ???-? ???-? ? ???-ж ? -???ɧ??? ?K*? W? j u k t u R k l
m n , o / q 4 r = s G t O u V w \ x _ { i | k ~ n q ? u ? v ? { ?! 4 G $./ W01 4 :23 q43 v &5 6 4 :27 q48 ( + ? 9? *:? 9? *;? ? ? <