flex 信道连接

package as3.tools
{
 import mx.messaging.ChannelSet;
 import mx.messaging.Consumer;
 import mx.messaging.channels.StreamingAMFChannel;
 import mx.messaging.events.MessageEvent;
 /**
  * 信道请求
  */
 public final class MessageRequest
 {
  /**
   * seed:信道标识
   * messageHandler:处理方法
   */
  public function MessageRequest(seed:String,messageHandler:Function)
  {
   var consumer:Consumer = new Consumer();
            consumer.destination = seed;
            consumer.subtopic = seed;
            var  myStreamingAMF:StreamingAMFChannel = new StreamingAMFChannel("my-streaming-amf", "/aqhb2/messagebroker/streamingamf");
            var channelSet:ChannelSet = new ChannelSet(); 
            channelSet.addChannel(myStreamingAMF); 
            consumer.addEventListener(MessageEvent.MESSAGE,messageHandler);
            consumer.subscribe();
  }
 }
}

选题1:网络监听与https的配置 任务内容 利用软件对特定Web系统的前端与后端的通信进行监听;配置 Web服务器启用https,验证https对抗网络监听的作用 任务目的 体验通信信道存在信息泄露安全风险;掌握基于SSL的https服务器配置方 法 参考方法 ①查阅资料了解网络嗅探、网络监听的基本原理与方法,了解网络通信协议,熟悉网络通信数据的抓包方法与数据包的分析方法;②设计实现一个Web系统的登录功能,并基于nginx部署Web系统,“打开登录界面,“提交登录信息,用Wireshark或其它抓包软件,分析登录界面向后台发送的数据包中的账号和密码;③申请SSL证书和密钥,在nginx中配置SSL,重启nginx后再次登录、抓包分析。我是windows系统,不会配置nginx,现在只有一个前端的代码,可以不用后端吗,以下是我的login.html文件的代码:<!DOCTYPE html> <html lang=“zh-CN”> <head> <meta charset=“UTF-8”> <title>用户登录</title> <style> /* 基础样式 */ body { font-family: ‘Arial’, sans-serif; background-color: #f0f2f5; display: flex; justify-content: center; align-items: center; height: 100vh; margin: 0; } .login-container { background: white; padding: 40px; border-radius: 8px; box-shadow: 0 2px 10px rgba(0,0,0,0.1); width: 350px; } h2 { color: #1a73e8; text-align: center; margin-bottom: 30px; } .form-group { margin-bottom: 20px; } label { display: block; margin-bottom: 8px; color: #5f6368; } input[type=“text”], input[type=“password”] { width: 100%; padding: 12px; border: 1px solid #dadce0; border-radius: 4px; box-sizing: border-box; font-size: 16px; } input[type=“submit”] { background-color: #1a73e8; color: white; padding: 12px 20px; border: none; border-radius: 4px; cursor: pointer; width: 100%; font-size: 16px; transition: background-color 0.3s; } input[type=“submit”]:hover { background-color: #1557b0; } .links { text-align: center; margin-top: 20px; } .links a { color: #1a73e8; text-decoration: none; font-size: 14px; margin: 0 10px; } </style> </head> <body> <div class=“login-container”> <h2>用户登录</h2> <form action=“/login” method=“POST”> <div class=“form-group”> <label for=“username”>用户名:</label> <input type=“text” id=“username” name=“username” required> </div> <div class="form-group"> <label for="password">密码:</label> <input type="password" id="password" name="password" required> </div> <input type="submit" value="登录"> </form> <div class=“links”> <a href=“#”>忘记密码?</a> <a href=“#”>注册账号</a> </div> </div> </body> </html>
最新发布
03-18
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值