#sudo apt-get install sun-java6-jdk sun-java6-fonts sun-java6-plugin #sudo vim /etc/environment JAVA_HOME=/usr/lib/jvm/java-6-openjdk/ PATH=/usr/share/tomcat6/lib/xmlrpc-server-3.1.3.jar:/usr/share/tomcat6/lib/xmlrpc-client-3.1.3.jar:/usr/share/tomcat6/lib/xmlrpc-common-3.1.3.jar:/usr/share/tomcat6/lib/ws-commons-util-1.0.2.jar:/usr/share/tomcat6/lib/commons-logging-1.1.jar:/usr/share/tomcat6/lib/hibernate3.jar:/usr/share/tomcat6/lib/hibernate-testing.jar:/usr/share/tomcat6/lib/postgresql-9.0-801.jdbc4.jar:/usr/share/tomcat6/lib/servlet-api.jar:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/lib/jvm/java-6-openjdk/bin/ #source /etc/environment #sudo apt-get install tomcat6 tomcat6-examples #vim Server.java
package xml; import java.io.IOException; import java.io.OutputStream; import javax.servlet.ServletConfig; import javax.servlet.ServletException; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import org.apache.xmlrpc.XmlRpcException; import org.apache.xmlrpc.server.PropertyHandlerMapping; import org.apache.xmlrpc.server.XmlRpcServerConfigImpl; import org.apache.xmlrpc.webserver.XmlRpcServletServer; public class Server extends HttpServlet { private XmlRpcServletServer server; public void init(ServletConfig pConfig) throws ServletException { super.init(pConfig); try { // create a new XmlRpcServletServer object server = new XmlRpcServletServer(); // set up handler mapping of XmlRpcServletServer object PropertyHandlerMapping phm = new PropertyHandlerMapping(); phm.addHandler("i",data.class); server.setHandlerMapping(phm); // more config of XmlRpcServletServer object XmlRpcServerConfigImpl serverConfig = (XmlRpcServerConfigImpl)server.getConfig(); serverConfig.setEnabledForExtensions(true); serverConfig.setContentLengthOptional(false); } catch (XmlRpcException e) { try { log("Failed to create XmlRpcServer: " + e.getMessage(), e); } catch (Throwable ignore) { } throw new ServletException(e); } } public void doPost(HttpServletRequest pRequest, HttpServletResponse pResponse) throws IOException, ServletException { server.execute(pRequest, pResponse); } } #vim data.java package xml; import java.util.*; import java.io.File; import java.io.FileInputStream; import java.io.FileOutputStream; import java.io.ByteArrayInputStream; import sun.misc.BASE64Decoder; import sun.misc.BASE64Encoder; public class data{ public String echos(String str) { return str; } public String sayHello(String str) { return "你好:"+str; } public Object[] get(Object[] obj) { return obj; } } #javac Server.java data.java #vim Client.java package xml; import java.io.IOException; import java.net.MalformedURLException; import java.util.Vector; import java.net.URL; import javax.servlet.*; import javax.servlet.http.*; import org.apache.xmlrpc.XmlRpcException; import org.apache.xmlrpc.client.XmlRpcClient; import org.apache.xmlrpc.client.XmlRpcClientConfigImpl; public class Client1 extends HttpServlet { public void doGet (HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException { res.setContentType("text/html"); res.setCharacterEncoding("UTF-8"); PrintWriter out = res.getWriter(); String docType ="<!DOCTYPE HTML PUBLIC /"-//W3C//DTD HTML 4.0 " + "Transitional//EN/">/n"; out.println(docType + "<HTML>/n" + "<HEAD><TITLE>Hello</TITLE></HEAD>/n" + "<BODY BGCOLOR=/"#FDF5E6/">/n" ); try { // config client XmlRpcClientConfigImpl config = new XmlRpcClientConfigImpl(); config.setServerURL(new URL("http://localhost:8080/rpc/XmlRpcServer")); // should be modified according to your configuration of jsp container // create a new XmlRpcClient object and bind above config object with it XmlRpcClient client = new XmlRpcClient(); client.setConfig(config); // create parameter list Vector<String> params = new Vector<String>(); //Vector params=new Vector(); params.addElement("hello world ,世界你好"); // execute XML-RPC call String result = (String) client.execute("i.sayHello", params); out.println(result); out.println("</BODY></HTML>"); out.close(); } catch (MalformedURLException e) { System.out.println(e.toString()); } catch (XmlRpcException e) { System.out.println(e.toString()); } catch (IOException e) { e.printStackTrace(); } } } #javac Client.java
#java -classpath . Client
#vim Client.php
include('client/class-IXR.php'); //echo '<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />'; $client = new IXR_Client('http://localhost:8080/rpc/XmlRpcServer'); //$client = new IXR_Client('localhost','/server/server.php',80); function show() { global $client; if($client) {$response = $client->getResponse();} else{echo "<h2>ihefe::Error! ".$client->getErrorCode().":".$client->getErrorMessage().'</h2>';} //header('Content-type: image/png'); //$response=base64_decode($response); var_dump ($response); } //$file="1.png"; //$bin=file_get_contents($file); //$bin=base64_encode($bin); $client->query("i.sayHello","世界"); show(); $client->query("i.echos","hello"); show(); $client->query("i. get",array("a","b")); show();
大晚上不睡覺、枸杞泡起來@我 一個月之前、自從入了樹莓派4b 8g板之後、就無法自拔,上班除了開發業務代碼和搭建內部UI組件庫之外,就是不亦樂乎的學習docker、mysql、mongodb、php、python、frp等,採購了阿里雲E
0x01 命令執行 直接payload: 127.0.0.1 &whoami,發現可以成功執行whoami命令 然後ls ../ ,發現有個key.php文件 嘗試用cat命令查看發現不行被攔截了。(其實題目過濾了常用的查看文件的命
從可視化編排到支持 YAML 編排 雲效流水線 Flow 是開箱即用的企業級持續集成和持續交付工具,支持豐富的代碼源、構建、自動化測試工具、多種部署類型和部署方式,與阿里雲深度集成,還提供多種企業級特性,助力企業高效完成從開發到上線 CIC
原方法 /** * 動態更新form * @param form */ updateForm(form) { this.form.manholeId = form.manholeId; this.form
最近在刷一些問題的時候看到有下面一個問題 上面問的是當輸入的字符串爲什麼的時候返回 True 總結 在做題目的時候,第一次還做錯了。 這是因爲解答這個題目的時間只有 3 分鐘,沒有自己看題目 後來拿着程序跑了下。 p
條件註冊 Spring 4.0 引入條件註冊機制,暴露給用戶的API是@Conditional和Condition接口,把@Conditional聲明在一個 @Component類上,並接受一組條件(Condition實現),容器初始化期間
本文分享自華爲雲社區《Python函數與模塊的精髓與高級特性》,作者:檸檬味擁抱。 Python 是一種功能強大的編程語言,擁有豐富的函數和模塊,使得開發者能夠輕鬆地構建複雜的應用程序。本文將介紹 Python 中函數和模塊的基本使用方法,
一.Vue文件內容 <template> </template> <script> </script> <style> </style>
服務發現 在Spring cloud中,要注意區別服務和服務實例,這是兩個概念,一個微服務單元可以部署多個節點, 每個節點即一個服務實例,Spring cloud默認通過 spring.application.name 配置項來標識一個微服
本文作者: 張顯華、竇智浩、盧進文 與集中式架構相比,分佈式架構的系統複雜性呈指數級增長,混沌工程在信創轉型、分佈式架構轉型、小機下移等過程中有效保障了生產的穩定性。本文分享了 TiDB 分佈式數據庫在銀行核心業務系統落地中進行混沌測試的場
漏洞概述 漏洞服務: uhttpd 漏洞類型: 遠程命令執行 影響範圍: 1.0.4.26之前的NETGEAR R9000設備會受到身份驗證繞過的影響 解決建議: 更新版本 漏洞復現 操作環境: ubuntu:22.04 qemu-ve
1.redis未授權訪問漏洞 通過redis未授權訪問漏洞,會造成敏感信息泄露,甚至被利用直接控制服務器,其危害不言而喻。但是在實際工作中,發現一些開發人員和運維人員並不知道如何妥善配置。因此有了本文,對redis的配置,建議就是2條,一
1.hive 1.1 解壓 tar -zxf apache-hive-1.2.2-bin.tar.gz -C .. mv apache-hive-1.2.2-bin/ hive-1.2.2 1.2 修改配置
4月19日,Meta發佈了最新的大語言模型LLaMA3,具體包括一個 8B 模型和一個 70 B 模型,上下文長度支持8K, 被譽爲史上最強開源大語言模型,開源社區的“重磅炸彈”,效果直指GTP4。在諸多評測任務上,LLaMA3都有非常炸裂
操作系統Debian12 1. portainer 簡介 Portainer 是一個開源的輕量級容器管理工具,主要用於 Docker 和 Swarm 環境的可視化管理和操作。通過 Portainer,用戶可以通過簡潔易用的 Web UI