Shellcoders Programming Uncovered

版权声明:原创作品,允许转载,转载时请务必以超链接形式标明文章原始出版、作者信息和本声明。否则将追究法律责任。 http://blog.csdn.net/topmvp - topmvp
How hackers, viruses, and worms attack computers from the Internet and exploit security holes in software is explained in this outline of antivirus software, patches, and firewalls that try in vain to withstand the storm of attacks. Some software's effectiveness exists only in the imaginations of its developers because they prove unable to prevent the propagation of worms, but this guide examines where security holes come from, how to discover them, how to protect systems (both Windows and Unix), and how to do away with security holes altogether. Unpublished advanced exploits and techniques in both C and Assembly languages are included.
http://rapidshare.com/files/52220331/193176946X.zip
http://rapidshare.com/files/52619474/193176946X.zip
这段代码实际上是一个循环,其中包含三个嵌套的 for 循环。先来看第一个循环: ```python for s in range(n_informants + 1): for t in range(n_targets): self.p_plus[(n_informants,n_informants-1,t)] = 0.0 p_plus_t = 0.0 for informant_type in range(n_types): if informant_covered_payoff[informant_type][t] > informant_uncovered_payoff[informant_type][t]: p_plus_t += type_dist[informant_type] self.p_plus[(s, n_informants, t)] = comb(n_informants, s) * ( ((p_plus_t * p_w) ** s) * ((1-p_plus_t*p_w) ** (n_informants-s)) ) if s <= n_informants - 1: self.p_plus[(s, n_informants-1, t)] = comb(n_informants-1, s) * (((p_plus_t * p_w) ** s) * ((1-p_plus_t*p_w) ** (n_informants-1-s))) ``` 第一个循环中,s 和 t 分别被初始化为 0 和 0,然后依次循环执行下面的代码块: - 将 p_plus 字典中的一个特定位置设为 0.0。 - 初始化 p_plus_t 为 0.0。 - 对于所有的 informant_type,在 informant_covered_payoff 和 informant_uncovered_payoff 中比较对应位置的值,如果前者大于后者,则将 p_plus_t 加上 type_dist[informant_type]。 - 根据公式计算 p_plus 的值,并将其存储到 p_plus 字典的一个特定位置。 - 如果 s 小于等于 n_informants - 1,则根据公式计算 p_plus 的值,并将其存储到 p_plus 字典的另一个特定位置。 第二个循环中,则是将 self.s_infty, self.all_messages 和 self.truth_message_per_type 进行初始化。 在循环体内,使用 `set` 函数初始化了 self.all_messages,其中包括了一些字符串,这些字符串都是 'target_i_+' 或 'target_i_-' 的形式,其中 i 为目标的编号。这些字符串表示了不同的信息类型。 接下来,使用一个双重循环遍历所有目标和所有 informant_type,将真实信息存储到 self.truth_message_per_type 中。如果 informant_covered_payoff 大于 informant_uncovered_payoff,则认为 informant_type 可以提供正确的信息,因此将 'type_i_+' 加入到对应的 self.truth_message_per_type[target] 中。否则,将 'type_i_-' 加入到对应的 self.truth_message_per_type[target] 中。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值