{"id":56246,"date":"2020-04-05T17:21:30","date_gmt":"2020-04-05T09:21:30","guid":{"rendered":"http:\/\/4563.org\/?p=56246"},"modified":"2020-04-05T17:21:30","modified_gmt":"2020-04-05T09:21:30","slug":"%e5%85%b3%e4%ba%8eocserv-%e8%ae%a4%e8%af%81%e8%a1%a8%e5%8d%95%e9%97%ae%e9%a2%98%ef%bc%8c%e4%bb%98%e8%b4%b9%e6%b1%82%e5%b8%ae%e5%8a%a9","status":"publish","type":"post","link":"http:\/\/4563.org\/?p=56246","title":{"rendered":"\u5173\u4e8eocserv \u8ba4\u8bc1\u8868\u5355\u95ee\u9898\uff0c\u4ed8\u8d39\u6c42\u5e2e\u52a9"},"content":{"rendered":"\n<p>  \t\t\t\t\t<strong>\u5c71\u91ce\u5339\u592b<\/strong>  \t\t\t\t\u5927\u4f6c\u6709\u8bdd\u8bf4 : 2020-3-29 20:10:39\t<\/p>\n<h3>\u5173\u4e8eocserv \u8ba4\u8bc1\u8868\u5355\u95ee\u9898\uff0c\u4ed8\u8d39\u6c42\u5e2e\u52a9<\/h3>\n<p>  \t\t \u672c\u5e16\u6700\u540e\u7531 \u5c71\u91ce\u5339\u592b \u4e8e 2020-3-29 20:15 \u7f16\u8f91 <\/p>\n<p> \u4e4b\u524d\u53d1\u8fc7\u5e16\u5b50\u6ca1\u6709\u627e\u5230\u7b54\u6848<\/p>\n<p>  \u5076\u7136\u770b\u5230\u4e00\u4e2a\u5927\u4f6c5\u5e74\u524d\u4e5f\u7814\u7a76\u8fc7<\/p>\n<p>  \u6b63\u5e38\u914d\u7f6e\u7684ocserv \u5728anyconnect\u5ba2\u6237\u7aef\u4e2d\u662f\u8fd9\u6837\u76842\u4e2a\u9875\u9762<\/p>\n<p>  https:\/\/s1.ax1x.com\/2020\/03\/29\/GZeEVK.png<\/p>\n<p>  \u9700\u8981\u5b9e\u73b0\u7684\u6548\u679c\u662f\u4e0b\u9762\u8fd9\u6837\u8d26\u53f7\u5bc6\u7801\u57281\u4e2a\u9875\u9762<br \/>  https:\/\/s1.ax1x.com\/2020\/03\/29\/GZZLD0.png<\/p>\n<p>  \u4ee5\u4e0b\u662f\u5927\u4f6c\u641e\u7684hack\u8ba4\u8bc1\u8868\u5355\uff0c\u8ba9\u7528\u6237\u540d\u5bc6\u7801\u5728\u4e00\u6b21\u63d0\u793a\u4e2d\u8f93\u5165\uff0c\u5e76\u80fd\u6b63\u5e38\u8ba4\u8bc1\u4f7f\u7528<\/p>\n<p>  \u80fd\u770b\u660e\u767d\u7684\u5927\u4f6cPM\u4e0b\u8054\u7cfb\u65b9\u5f0f\uff0c\u6211TG\uff1a@gs166 \u4ed8\u8d39\u6c42\u5e2e\u52a9<\/p>\n<p>  \/\/ ocservFront project main.go<br \/>  package main<\/p>\n<p>  import (<br \/>  &nbsp; &nbsp; &nbsp; &nbsp; &quot;bufio&quot;<br \/>  &nbsp; &nbsp; &nbsp; &nbsp; &quot;bytes&quot;<br \/>  &nbsp; &nbsp; &nbsp; &nbsp; &quot;crypto\/tls&quot;<br \/>  &nbsp; &nbsp; &nbsp; &nbsp; &quot;fmt&quot;<br \/>  &nbsp; &nbsp; &nbsp; &nbsp; &quot;io&quot;<br \/>  &nbsp; &nbsp; &nbsp; &nbsp; &quot;io\/ioutil&quot;<br \/>  &nbsp; &nbsp; &nbsp; &nbsp; &quot;log&quot;<br \/>  &nbsp; &nbsp; &nbsp; &nbsp; &quot;net&quot;<br \/>  &nbsp; &nbsp; &nbsp; &nbsp; &quot;net\/http&quot;<br \/>  &nbsp; &nbsp; &nbsp; &nbsp; &quot;os&quot;<br \/>  &nbsp; &nbsp; &nbsp; &nbsp; &quot;regexp&quot;<br \/>  &nbsp; &nbsp; &nbsp; &nbsp; &quot;strings&quot;<br \/>  )<\/p>\n<p>  const authFormOld = `&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;<br \/>  &lt;config-auth client=&quot;\u6276\u5899&quot; type=&quot;auth-request&quot;&gt;<br \/>  &lt;version who=&quot;sg&quot;&gt;0.1(1)&lt;\/version&gt;<br \/>  &lt;auth id=&quot;main&quot;&gt;<br \/>  &lt;message&gt;Please enter your username&lt;\/message&gt;<br \/>  &lt;form method=&quot;post&quot; action=&quot;\/auth&quot;&gt;<br \/>  &lt;input type=&quot;text&quot; name=&quot;username&quot; label=&quot;Username:&quot; \/&gt;<br \/>  &lt;\/form&gt;&lt;\/auth&gt;<br \/>  &lt;\/config-auth&gt;`<\/p>\n<p>  const authFormNew = `&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;<br \/>  &lt;config-auth client=&quot;\u6276\u5899&quot; type=&quot;auth-request&quot;&gt;<br \/>  &lt;version who=&quot;sg&quot;&gt;0.1(1)&lt;\/version&gt;<br \/>  &lt;auth id=&quot;main&quot;&gt;<br \/>  &lt;message&gt;Please enter your username&lt;\/message&gt;<br \/>  &lt;form method=&quot;post&quot; action=&quot;\/auth&quot;&gt;<br \/>  &lt;input type=&quot;text&quot; name=&quot;username&quot; label=&quot;Username:&quot; \/&gt;<br \/>  &lt;input type=&quot;password&quot; name=&quot;password&quot; label=&quot;Password:&quot; \/&gt;<br \/>  &lt;\/form&gt;&lt;\/auth&gt;<br \/>  &lt;\/config-auth&gt;`<\/p>\n<p>  var authUserPassRE = regexp.MustCompile(&quot;&lt;auth&gt;&lt;username&gt;(.*?)&lt;\/username&gt;&lt;password&gt;(.*?)&lt;\/password&gt;&lt;\/auth&gt;&quot;)<br \/>  var \u6276\u5899CookieRE = regexp.MustCompile(&quot;web\u6276\u5899context=(.*?);&quot;)<\/p>\n<p>  func main() {<br \/>  &nbsp; &nbsp; &nbsp; &nbsp; \/\/@todo load config from file<br \/>  &nbsp; &nbsp; &nbsp; &nbsp; cert, _ := tls.LoadX509KeyPair(&quot;\/Users\/horsley\/Backup\/ssl\/ihorsley.com.crt&quot;, &quot;\/Users\/horsley\/Backup\/ssl\/ihorsley.com.key&quot;)<br \/>  &nbsp; &nbsp; &nbsp; &nbsp; var cfg tls.Config<\/p>\n<p>  &nbsp; &nbsp; &nbsp; &nbsp; cfg.Certificates = []tls.Certificate{cert}<br \/>  &nbsp; &nbsp; &nbsp; &nbsp; l, err := tls.Listen(&quot;tcp&quot;, &quot;:15443&quot;, &amp;cfg) \/\/@todo load config from file<br \/>  &nbsp; &nbsp; &nbsp; &nbsp; if err != nil {<br \/>  &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; log.Println(&quot;listen error:&quot;, err)<br \/>  &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; os.Exit(1)<br \/>  &nbsp; &nbsp; &nbsp; &nbsp; }<\/p>\n<p>  &nbsp; &nbsp; &nbsp; &nbsp; defer l.Close()<br \/>  &nbsp; &nbsp; &nbsp; &nbsp; for {<br \/>  &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; conn, err := l.Accept()<br \/>  &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if err != nil {<br \/>  &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; log.Println(&quot;accept error:&quot;, err)<br \/>  &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; continue<br \/>  &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<\/p>\n<p>  &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; go func(clientConn net.Conn) {<br \/>  &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; log.Println(&quot;conn process start&quot;)<br \/>  &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; defer clientConn.Close()<\/p>\n<p>  &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; \/\/@todo load config from file<br \/>  &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; remoteConn, err := tls.Dial(&quot;tcp&quot;, &quot;vps9.ihorsley.com:443&quot;, nil) \/\/remote can be unix cleartext socket of ocserv<br \/>  &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if err != nil {<br \/>  &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; log.Println(&quot;connect upstream error:&quot;, err)<br \/>  &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; return<br \/>  &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<\/p>\n<p>  &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; defer remoteConn.Close()<\/p>\n<p>  &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; \u6276\u5899Cookie := make(chan string, 1)<\/p>\n<p>  &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; go func() { \/\/remote =&gt; client<br \/>  &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; hackRemoteResponse(clientConn, remoteConn, \u6276\u5899Cookie)<\/p>\n<p>  &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; io.Copy(clientConn, remoteConn)<br \/>  &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }()<\/p>\n<p>  &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; \/\/client =&gt; remote<br \/>  &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; hackClientRequest(clientConn, remoteConn, \u6276\u5899Cookie)<br \/>  &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; io.Copy(remoteConn, clientConn)<\/p>\n<p>  &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; log.Println(&quot;conn process done&quot;)<br \/>  &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }(conn)<br \/>  &nbsp; &nbsp; &nbsp; &nbsp; }<\/p>\n<p>  }<\/p>\n<p>  \/\/hackClientRequest<br \/>  \/\/hack auth by resend both user and pass form and cookie<br \/>  func hackClientRequest(clientConn, remoteConn net.Conn, \u6276\u5899Cookie chan string) {<br \/>  &nbsp; &nbsp; &nbsp; &nbsp; reader := bufio.NewReader(clientConn)<\/p>\n<p>  &nbsp; &nbsp; &nbsp; &nbsp; for { \/\/client req hacking<br \/>  &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; req, err := http.ReadRequest(reader)<\/p>\n<p>  &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if err != nil {<br \/>  &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; log.Println(&quot;ReadRequest from client conn err:&quot;, err)<br \/>  &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; return<br \/>  &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<\/p>\n<p>  &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if req.URL.Path == &quot;\/auth&quot; {<br \/>  &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; var buf bytes.Buffer<br \/>  &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; _, err = buf.ReadFrom(req.Body)<br \/>  &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; req.Body.Close()<\/p>\n<p>  &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if err != nil {<br \/>  &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; log.Println(&quot;read request body from client conn err:&quot;, err)<br \/>  &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; return<br \/>  &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<\/p>\n<p>  &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; req.Body = ioutil.NopCloser(bytes.NewReader(buf.Bytes()))<\/p>\n<p>  &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; log.Println(&quot;3. second req, auth req, do first sending&quot;)<br \/>  &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; req.Write(remoteConn)<\/p>\n<p>  &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; \/\/waiting for cookie<br \/>  &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ck := &lt;-\u6276\u5899Cookie<\/p>\n<p>  &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; log.Println(&quot;5. got cookie, resend auth req with cookie&quot;)<\/p>\n<p>  &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; req.Header.Set(&quot;Cookie&quot;, fmt.Sprintf(&quot;web\u6276\u5899context=%s;&quot;, ck))<br \/>  &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; req.Body = ioutil.NopCloser(bytes.NewReader(buf.Bytes()))<br \/>  &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; req.Write(remoteConn)<\/p>\n<p>  &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; log.Println(&quot;6. resend done, hack finish, going to do regular io.Copy&quot;)<br \/>  &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; break<br \/>  &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; } else {<br \/>  &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; log.Println(&quot;1. first req, pass&quot;)<br \/>  &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; req.Write(remoteConn)<br \/>  &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<br \/>  &nbsp; &nbsp; &nbsp; &nbsp; }<br \/>  }<\/p>\n<p>  \/\/hackRemoteResponse<br \/>  \/\/hack auth by change auth form and drop the first cookie resp<br \/>  func hackRemoteResponse(clientConn, remoteConn net.Conn, \u6276\u5899Cookie chan string) {<br \/>  &nbsp; &nbsp; &nbsp; &nbsp; reader := bufio.NewReader(remoteConn)<\/p>\n<p>  &nbsp; &nbsp; &nbsp; &nbsp; for { \/\/remote resp hacking<br \/>  &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; resp, err := http.ReadResponse(reader, nil)<br \/>  &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if err != nil {<br \/>  &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; log.Println(&quot;ReadResponse from remote conn err:&quot;, err)<br \/>  &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; return<br \/>  &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<\/p>\n<p>  &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if resp.ContentLength == len(authFormOld) { \/\/hack auth form<br \/>  &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; log.Println(&quot;2. first resp, hack resp auth form&quot;)<br \/>  &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; resp.Body.Close()<br \/>  &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; resp.ContentLength = int64(len(authFormNew))<br \/>  &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; resp.Body = ioutil.NopCloser(strings.NewReader(authFormNew))<br \/>  &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; } else if ck := resp.Header.Get(&quot;Set-Cookie&quot;); ck != &quot;&quot; &amp;&amp; \u6276\u5899CookieRE.MatchString(ck) { \/\/get context cookie<br \/>  &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; log.Println(&quot;4. second resp, grep cookie, resp hacking finish&quot;)<\/p>\n<p>  &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if m := \u6276\u5899CookieRE.FindStringSubmatch(ck); m != nil &amp;&amp; m != &quot;&quot; {<br \/>  &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; \u6276\u5899Cookie &lt;- m<br \/>  &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; \/\/log.Println(&quot;get \u6276\u5899 cookie:&quot;, m)<br \/>  &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; break<br \/>  &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<br \/>  &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<\/p>\n<p>  &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; err = resp.Write(clientConn)<br \/>  &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if err != nil {<br \/>  &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; log.Println(&quot;write to client conn err:&quot;, err)<br \/>  &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; return<br \/>  &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<br \/>  &nbsp; &nbsp; &nbsp; &nbsp; }<br \/>  }  \t\t\t\t<\/p>\n<p>  \t\t\t\t\t<strong>\u5c71\u91ce\u5339\u592b<\/strong>  \t\t\t\t\u5927\u4f6c\u6709\u8bdd\u8bf4 : \t<\/p>\n<h3><\/h3>\n<p>  \t\t\u6765\u4e2a\u8001\u53f8\u673a\t\t\t\t<\/p>\n<p>  \t\t\t\t\t<strong>gamerenzz<\/strong>  \t\t\t\t\u5927\u4f6c\u6709\u8bdd\u8bf4 : \t<\/p>\n<h3><\/h3>\n<p>  \t\t\u540c\u5173\u6ce8\u8fd9\u4e2a\uff0c\u6211\u5e0c\u671bocserv\u7684\u5ba2\u6237\u7aef\uff0c\u4e0d\u7528\u7b2c\u4e09\u65b9\uff0c\u4fdd\u5b58\u7528\u6237\u540d\u548c\u5bc6\u7801\uff0c\u4e0d\u7528\u6bcf\u6b21\u90fd\u8f93\u5165\uff0c\u7f51\u4e0a\u627e\u5230\u4e00\u4e2a\uff0c\u4f46\u662f\u4e0d\u77e5\u9053\u600e\u4e48\u7528\uff0c\u697c\u4e3b\u53ef\u4ee5\u770b\u770b \uff0c\u6743\u9650\u539f\u56e0\uff0c\u5730\u5740\u53d1\u4e0d\u4e86\uff0c\u5728v2ex\u4e0a<br \/>  \u540c\u6c42\u9ad8\u4eba\uff0cocserv \u5ba2\u6237\u7aef\uff0c\u81ea\u52a8\u4fdd\u5b58\u7528\u6237\u540d\u548c\u5bc6\u7801 \uff08\u4e0d\u7528\u7b2c\u4e09\u65b9\u5ba2\u6237\u7aef\u5b9e\u73b0\uff09\t\t\t\t<\/p>\n<p>  \t\t\t\t\t<strong>\u5c71\u91ce\u5339\u592b<\/strong>  \t\t\t\t\u5927\u4f6c\u6709\u8bdd\u8bf4 : \t<\/p>\n<h3><\/h3>\n<p>  \t\tgamerenzz \u5927\u4f6c\u6709\u8bdd\u8bf4 : 2020-4-3 11:02<br \/>  \u540c\u5173\u6ce8\u8fd9\u4e2a\uff0c\u6211\u5e0c\u671bocserv\u7684\u5ba2\u6237\u7aef\uff0c\u4e0d\u7528\u7b2c\u4e09\u65b9\uff0c\u4fdd\u5b58\u7528\u6237\u540d\u548c\u5bc6\u7801\uff0c\u4e0d\u7528\u6bcf\u6b21\u90fd\u8f93\u5165\uff0c\u7f51\u4e0a\u627e\u5230\u4e00\u4e2a\uff0c\u4f46\u662f\u4e0d &#8230;<\/p>\n<p> https:\/\/www.v2ex.com\/t\/195064<br \/>  \u4f60\u8bf4\u7684\u662f\u8fd9\u4e2a\u5927\u4f6c\u5427\uff0c\u4e0a\u9762\u7684\u8868\u5355\u5c31\u662f\u4ed6\u7684<\/p>\n<p>  \u5982\u679c\u4e0d\u662f\u8bf7\u56de\u590d\u94fe\u63a5\u540e\u7f00\u6211\u7785\u7785\t\t\t\t<\/p>\n<p>  \t\t\t\t\t<strong>gamerenzz<\/strong>  \t\t\t\t\u5927\u4f6c\u6709\u8bdd\u8bf4 : \t<\/p>\n<h3><\/h3>\n<p>  \t\t\u5c71\u91ce\u5339\u592b \u5927\u4f6c\u6709\u8bdd\u8bf4 : 2020-4-3 11:39<br \/>  \u4f60\u8bf4\u7684\u662f\u8fd9\u4e2a\u5927\u4f6c\u5427\uff0c\u4e0a\u9762\u7684\u8868\u5355\u5c31\u662f\u4ed6\u7684<\/p>\n<p>  \u5982\u679c\u4e0d\u662f\u8bf7\u56de\u590d\u94fe\u63a5\u540e\u7f00\u6211\u7785\u7785 &#8230;<\/p>\n<p> \u5bf9\uff0c\u5c31\u662f\u4ed6\u7684\uff0c\u4e0d\u8fc7\u4e0d\u61c2\u8fd9\u4e2a\t\t\t  <\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u5c71\u91ce\u5339\u592b \u5927\u4f6c\u6709\u8bdd\u8bf4 : 2020&hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[],"tags":[],"_links":{"self":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts\/56246"}],"collection":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=56246"}],"version-history":[{"count":0,"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts\/56246\/revisions"}],"wp:attachment":[{"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=56246"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=56246"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=56246"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}