Paul C's Blog

To be funny,to grow up!

0%

走吧,走吧

天上的星星都亮啦

走吧,走吧

地上的路灯不说话

走吧,走吧

走吧,走吧

就当我是个幸福的哑巴

说唱:我们骑上车子 踏上步子 场子在哪 也没有路子

放下担子 拿起拍子 挥洒汗水你我都是汉子

走吧,走吧

走吧,走吧

那是不是一场梦啊

走吧,走吧

是时候要回家啦

走吧,走吧

听一听妈妈的话

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
#通过模拟键盘的方式获取报告
#参考https://blog.csdn.net/yan_star/article/details/113667094

import os
import pyautogui as pag
import pyperclip
import win32clipboard as w
import win32con#下载pywin32包
import time


address_bar=(1322,107) #地址栏坐标
test_result=(142,365) #预测结果所在坐标


api_addr="https://www.virustotal.com/gui/file/"

samples_addr="E:\Linux_sh\malware\Linux-Malware-Samples"#样本需要提前计算sha256值
report_addr="E:/Linux_sh/report_"+samples_addr+".txt"
test_str="00ae07c9fe63b080181b8a6d59c6b3b6f9913938858829e5a42ab90fb72edf7a"
url=api_addr+test_str
flag=1#flag==1为恶意


def get_text():
w.OpenClipboard()
d = w.GetClipboardData(win32con.CF_TEXT)
w.CloseClipboard()
return d.decode('utf-8')

def examine(file):
#输入网址
url=api_addr+file
pag.click(address_bar[0],address_bar[1],1)
pag.hotkey('alt','d')
pyperclip.copy(url)
#pyperclip.paste()
pag.hotkey('ctrl','v')
pag.keyDown('enter')
pag.keyUp('enter')
time.sleep(2)
#获取检测结果(142,365)
pag.click(test_result[0],test_result[1],2)
pag.hotkey('ctrl','c')
result=get_text()
if result=='0':
flag=0
else:
flag=1
print('%s:%d\n'%(test_str,flag))



if __name__ == "__main__":
path=samples_addr
samples=os.listdir(samples_addr)
for file in samples:
examine(file)

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
-- coding: cp936 --

coging:UTF-8

二进制转16进制

ch=['0','1','2','3','4','5','6','7','8',
'9','A','B','C','D','E','F']
x=int(input("请输入一个二进制数="))
y=0
k=0
while True:
k+=1
i=x % 10
if i1:
y=y+2**(k-1)
x=x//10
if x0:
break
z=''
while True:
k=y % 16
z=ch[k]+z
y=y // 16
if y==0:
break
print(z)

1
2
3
4
5
6
7
8
9
10
11
#!/usr/bin/env python
#读取二进制文件,转为16进制输出
#encoding: utf-8
import binascii
#fh = open(r'E:\test.png', 'rb')
#a = fh.read()
#print 'raw: ',`a`,type(a)
a='011001100110110001100001011001110111101101100011011001010011001101100101001101010011000000110010011000110010110100110100001110000110001100111001001011010011010001100100001101010011000000101101001110010011100100111001001100000010110100110101011000100011100000110001011001000110001000110110011001100110001101100010011001100011000001111101'
hexstr = binascii.b2a_hex(a)
print a
print hexstr #示意结果为4d5a900003000000....

1
2
3
4
5
6
from bubblepy import BubbleBabble

str='xinik-samak-luvag-hutaf-fysil-notok-mepek-vanyh-zipef-hilok-detok-damif-cusol-fezyx'
bb=BubbleBabble()
print(bb.decode(str))

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
from zlib import crc32
import random

char='0123456789'

def crc32_f(data):
return hex(crc32(data)&0xffffffff)[2:10]

length=input('length:')
crc32_=raw_input('crc32:').lower()

while True:
text=''
for i in range(length):
text+=char[random.randint(0,len(char)-1)]
if crc32_f(text)==crc32_:
raw_input('find it:'+text)
exit

1
2
ssh -t root@149.28.228.xxx
// 安裝執行檔和 .dat 資料檔

https://www.bokezhu.com/2019/12/28/521.html

1
2
3
4
curl blueinyou.com/photos/server_config.txt
cp -rf server_config.txt /usr/local/etc/v2ray/config.json
vim /usr/local/etc/v2ray/config.json

输入以下信息:

1
2
3
service v2ray status
systemctl enable v2ray
systemctl start v2ray

更新dat和geoip

1
2
// 只更新 .dat 資料檔
# bash <(curl -L https://raw.githubusercontent.com/v2fly/fhs-install-v2ray/master/install-dat-release.sh)

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
import base64
f=open('input.txt','r')
out=open('base64_decode.txt','w')
f1=f.read()
def b64dec(astr,m):
f2=astr
for i in range(m):
f2=base64.b64decode(f2)
print f2
astr=f2
out.write(astr)


b64dec(f1,2)
f.close()
out.close()

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#-*-coding:utf-8-*-


'''
fileName : VigenereDecrypto.py
'''

def VigenereDecrypto (output , key) :
ptLen = len (output)
keyLen = len (key)
quotien = ptLen // keyLen
remainder = ptLen % keyLen

inp = ""

for i in range (0 , quotient) :
for j in range (0 , keyLen) :
c = int((ord(output[i*keyLen+j]) - ord('a') + 26 - (ord(key[j]) - ord('a')) % 26 + ord('a')))
#global input
inp += chr (c)

for i in range (0 , remainder) :
c = int((ord(output[quotient*keyLen + i]) - ord('a') + 26 - (ord(key[i]) - ord('a')) % 26 + ord('a')))
#global input
inp += chr (c)

return inp