flux

浅谈僵尸网络利器:Fast-flux技术

China☆狼群 提交于 2019-12-05 03:07:14
浅谈僵尸网络利器:Fast-flux技术 一、背景 在早期的僵尸网络中,控制者通常会把C&C服务器的域名或者IP地址硬编码到恶意程序中,僵尸主机通过这些信息定时访问C&C主机获取命令。但同时安全人员也能够通过逆向恶意程序,得到C&C服务器的域名或者IP,利用这些信息定位C&C主机,安全人员就可以隔断C&C主机从而破坏僵尸网络。不少控制者为了保护C&C主机,使用Fast-flux技术来提高C&C服务器的健壮性。 二、基本概念 在正常的DNS服务器中,用户对同一个域名做DNS查询,在较长的一段时间内,无论查询多少次返回的结果基本上是不会改变的。Fast-flux技术是指不断改变域名和IP地址映射关系的一种技术,也就是说在短时间内查询使用Fast-flux技术部署的域名,会得到不同的结果。图2-1为Fast-flux技术工作方式。 图2-1 客户端访问Fast-flux网络流程 客户端两次访问 www.example.com 的过程如下: 1) 为了得到网站 www.example.com 的IP地址,客户端发起DNS查询。 2) 随后DNS服务器返回了一个IP地址1.2.3.4,同时TTL为一个很小的数值。 3) 客户端访问IP为1.2.3.4的服务器获取内容。 4) IP为1.2.3.4的服务器响应请求,返回相应内容。 5) 客户端再次访问 www.example.com

Flux architecture with polymer elements

微笑、不失礼 提交于 2019-12-05 02:48:32
问题 A flux architecture is trending in web applications and so is polymer elements. Is there any example how to make a polymer application, which use flux architecture? 回答1: I've been thinking about using the Flux pattern with (Polymer) Web Components. Up to date I have come up with three possible solutions, all different from your way, so here they are: DISCLAIMER I use Reflux library and not the Facebook's one. Actions and Stores as elements My first attempt was to make Flux pattern into

Update redux state with an input

走远了吗. 提交于 2019-12-05 02:24:27
How can I update redux's state from a text input? I'm trying to do a very simple "Hello World" with a text input. When someone types into the text input, it should update my store's "searchTerm" value. I can't figure out these things: 1. How can I get and pass the input's value into it's "onChange" handler? 2. The "search" action seems to be called correctly, but my reducer function is never used (no console.log). SearchForm.js (component) import React, {Component, PropTypes} from 'react'; import {bindActionCreators} from 'redux'; import {connect} from 'react-redux'; import {search} from

How can I return a Flux<Order> when my response is wrapped in a json pagination object with Spring 5?

早过忘川 提交于 2019-12-04 18:44:54
I've got a web service that I'm trying to consume with the new Spring 5 WebClient. Working example # GET /orders/ [ { orderId: 1, ... }, { orderId: 1, ... } ] And the java code for the call // Java Flux<Order> ordersStream = webClient.get() .uri("/orders/") .exchange() .flatMap(response -> response.bodyToFlux(Order.class)); Problem The response from the web service is paginated and therefore doesn't contain the list of items directly as in the example above. It looks like this # GET /orders/ { "error": null, "metadata": { "total": 998, "limit": 1000, "offset": 0 }, "data": [ { orderId: 1, ...

Flux with Alt - Simultaneous dispatches means wrong design pattern?

时光总嘲笑我的痴心妄想 提交于 2019-12-04 18:41:45
I build an app with pure React. Its primary page shows multiple movies (user added). Users can vote and comment on every movie listed. I have a MovieCard component, which is responsible for a single movie. Then in Home I render an array of MovieCard components. Next I decided to implement a call to foreign movie database API, to get relevant movie information. It worked fine. Then I decided to refactor it in Flux pattern, using Alt and following the guidelines of this tutorial. Everything worked well, until I got the the MovieCard . In there, inside componentDidMount I call the action, which

Javascript Redux - how to get an element from store by id

不羁岁月 提交于 2019-12-04 17:47:04
问题 For the past weeks I've been trying to learn React and Redux. Now I have met a problem thay I haven't found a right answer to. Suppose I have a page in React that gets props from the link. const id = this.props.params.id; Now on this page, I'd like to display an object from STORE with this ID. const initialState = [ { title: 'Goal', author: 'admin', id: 0 }, { title: 'Goal vol2', author: 'admin', id: 1 } ] My question is: should the function to query the the object from the STORE be in the


k8s与CICD--利用flux部署应用到kubernetes

风流意气都作罢 提交于 2019-12-04 16:37:44
前言 一直在思考部署应用到k8s的姿势,之前介绍过helm,个人感觉helm把记 录数据放到k8s中不是特别好。最近发现了weave的 flux 项目(A tool for deploying container images to Kubernetes services)。 flux简介和注意事项 flux简介 先上图,大致看一下flux的理念。 1:flux可以和任意你喜欢的CI工具搭配比如:Drone,CircleCI,gitlabCI等。实际上flux做了CD的环节。 2:flux可以帮助你安全地更新应用。一般会遇到更新过程出错的问题,在flux实现中, 每个部署的应用的yaml文件存储在git仓库里 ,所以每次更改都可以追踪,所以也能精确回滚到任何一个历史版本。这点我是觉得非常好的。当应用需要更新镜像的时候,有以下几个步骤: Clone the repository Find the deployment files that use the image in question (there may be more than one, since we have e.g., sidecar containers that use the same image) Update a few fields in each file, in slightly different

Redux: Reducer needs state of other Reducer?

允我心安 提交于 2019-12-04 14:10:42
问题 Say I have two reducers. Reducer No.1 : Currently-Selected-Item-Reducer state = {currentlySelectedItemId: 123} Reducer No.2 : All-Items-Reducer state = [{ id: 123, name: "John"}, {id: 231, name: "Jill"}, {id: 411, name: "Alf"}] I have a simple React app and a React component simply displays the currently selected item. I.e., based on the id in the currently-selected-item-reducer , it find the correct item to display in the all-items reducer . Problem: Say the currently selected item is 123

Dispatching cascading/dependent async requests in Flux/React

佐手、 提交于 2019-12-04 12:50:04
I know this question has been asked more times in different flavours, but I didn’t find the "right" answer yet (maybe there just isn't one), so I’m looking for the "most Flux" one. Simple example: two components - LoginForm and Information user has to provide his/hers login information, submit the form and only after that he/she has right to "ask" for the information (this should be done automatically after login) Project structure along these lines: + actions |-- LoginAction |-- InfoAction + api |-- API + components |-- LoginForm |-- Information + stores |-- LoginStore |-- InfoStore Options:

Is it OK to call setState from within shouldComponentUpdate?

帅比萌擦擦* 提交于 2019-12-04 10:42:15
问题 In response to a state change, I want to trigger another state change. Is that inherently a bad idea? The specific sort of scenario is that the component is modeled as a state machine that renders different information according to the value of this.state.current_state . But external events can prompt it to experience a state transition, via changes to it's state through a flux store. Here's a contrived scenario to get the idea across: I think the correct lifecycle method to do this would be