HttpClient Features

Apache HttpClient 是一个基于 Java 实现的 HTTP 客户端库,支持 HTTP 1.0 和 1.1 版本标准,提供全面的方法实现(GET、POST 等),并支持 HTTPS 加密、代理连接、持久连接等功能。此外,它还具备自动 Cookie 处理、连接超时设置等特性。

http://hc.apache.org/httpclient-3.x/

  • Standards based, pure Java, implementation of HTTP versions 1.0 and 1.1
  • Full implementation of all HTTP methods (GET, POST, PUT, DELETE, HEAD, OPTIONS, and TRACE) in an extensible OO framework.
  • Supports encryption with HTTPS (HTTP over SSL) protocol.
  • Granular non-standards configuration and tracking.
  • Transparent connections through HTTP proxies.
  • Tunneled HTTPS connections through HTTP proxies, via the CONNECT method.
  • Transparent connections through SOCKS proxies (version 4 & 5) using native Java socket support.
  • Authentication using Basic, Digest and the encrypting NTLM (NT Lan Manager) methods.
  • Plug-in mechanism for custom authentication methods.
  • Multi-Part form POST for uploading large files.
  • Pluggable secure sockets implementations, making it easier to use third party solutions
  • Connection management support for use in multi-threaded applications. Supports setting the maximum total connections as well as the maximum connections per host. Detects and closes stale connections.
  • Automatic Cookie handling for reading Set-Cookie: headers from the server and sending them back out in a Cookie: header when appropriate.
  • Plug-in mechanism for custom cookie policies.
  • Request output streams to avoid buffering any content body by streaming directly to the socket to the server.
  • Response input streams to efficiently read the response body by streaming directly from the socket to the server.
  • Persistent connections using KeepAlive in HTTP/1.0 and persistance in HTTP/1.1
  • Direct access to the response code and headers sent by the server.
  • The ability to set connection timeouts.
  • HttpMethods implement the Command Pattern to allow for parallel requests and efficient re-use of connections.
  • Source code is freely available under the Apache Software License.
package com.fh.proxy.xjhis; import com.fh.util.hc.SysPartyRules; import java.net.MalformedURLException; import java.net.URL; import javax.xml.namespace.QName; import javax.xml.ws.WebEndpoint; import javax.xml.ws.WebServiceClient; import javax.xml.ws.WebServiceFeature; import javax.xml.ws.Service; /** * This class was generated by Apache CXF 3.1.14 * 2022-05-30T16:37:01.390+08:00 * Generated source version: 3.1.14 * */ @WebServiceClient(name = "LABService", // wsdlLocation = "http://172.16.97.6/ZYZLService/LabInterface/LABService.svc?wsdl", targetNamespace = "http://tempuri.org/") public class LABService extends Service { public final static URL WSDL_LOCATION; public final static QName SERVICE = new QName("http://tempuri.org/", "LABService"); public final static QName BasicHttpBindingILABService = new QName("http://tempuri.org/", "BasicHttpBinding_ILABService"); static { URL url = null; String str = SysPartyRules.XJHIS_URL; try { url = new URL(str); } catch (MalformedURLException e) { java.util.logging.Logger.getLogger(LABService.class.getName()) .log(java.util.logging.Level.INFO, "Can not initialize the default wsdl from {0}", str); } WSDL_LOCATION = url; } public LABService(URL wsdlLocation) { super(wsdlLocation, SERVICE); } public LABService(URL wsdlLocation, QName serviceName) { super(wsdlLocation, serviceName); } public LABService() { super(WSDL_LOCATION, SERVICE); } public LABService(WebServiceFeature ... features) { super(WSDL_LOCATION, SERVICE, features); } public LABService(URL wsdlLocation, WebServiceFeature ... features) { super(wsdlLocation, SERVICE, features); } public LABService(URL wsdlLocation, QName serviceName, WebServiceFeature ... features) { super(wsdlLocation, serviceName, features); } /** * * @return * returns ILABService */ @WebEndpoint(name = "BasicHttpBinding_ILABService") public ILABService getBasicHttpBindingILABService() { return super.getPort(BasicHttpBindingILABService, ILABService.class); } /** * * @param features * A list of {@link javax.xml.ws.WebServiceFeature} to configure on the proxy. Supported features not in the <code>features</code> parameter will have their default values. * @return * returns ILABService */ @WebEndpoint(name = "BasicHttpBinding_ILABService") public ILABService getBasicHttpBindingILABService(WebServiceFeature... features) { return super.getPort(BasicHttpBindingILABService, ILABService.class, features); } } 用这个传输JSon格式
06-25
from androguard.misc import AnalyzeAPK from click import pause import os import sys import json # a,d,dx=AnalyzeAPK("C:/Users/Lenovo/Desktop/A/lszz_jx_202412251645_1_0.2.0001_hardening.apk") # permissions=a.get_permissions() # for permission in permissions: # print(permission) # pause() def extract_features(apk_path):# try: out = AnalyzeAPK(apk_path) a, d, dx = out # dx.show_Permissions() # 提取权限 permissions = a.get_permissions() # 提取活动 activities = a.get_activities() # 提取服务 services = a.get_services() # 提取接收器 receivers = a.get_receivers() # 提取提供者 providers = a.get_providers() # 判断 APK 是否有效 valid = a.is_valid_APK() # 获取 APK 文件名,只保留文件名称部分 filename = os.path.basename(a.get_filename()) # 获取 APP 名 appname = a.get_app_name() # 获取 package 名 package = a.get_package() # 获取 android 版本名 version = a.get_androidversion_code() # 获取 APK 文件列表 filelist = a.get_files() # 提取 API 调用信息 api_calls = set() for method in dx.get_methods(): for _, calls, _ in method.get_xref_to(): class_name = calls.class_name[1:] method_name = calls.name descriptor = calls.descriptor api_call = f"{class_name}->{method_name}{descriptor}" api_calls.add(api_call) features = { "File": filename, "Permissions": permissions, "Activities": activities, "Services": services, "Receivers": receivers, "Providers": providers, "Valid": valid, "Filename": filename, "Appname": appname, "Package": package, "Version": version, "Filelist": filelist, "API_calls": list(api_calls) } return features except Exception as e: print(f"Error processing {apk_path}: {e}") return None def main(): apk_folder = "C:\\Users\\Lenovo\\Desktop\\yinsi\\mfm" output_file = "C:\\Users\\Lenovo\\Desktop\\yinsi\\mfm\\yanwu812.txt" all_features = [] for root, dirs, files in os.walk(apk_folder): for file in files: if file.endswith(".apk"): apk_path = os.path.join(root, file) features = extract_features(apk_path) if features: all_features.append(features) with open(output_file, 'w', encoding='utf-8') as f: json.dump(all_features, f, indent=4) print("APK features have been saved to:", output_file) if __name__ == '__main__': main()
08-14
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值