Skip to content
This repository was archived by the owner on Nov 23, 2023. It is now read-only.

Commit b014b23

Browse files
authored
update
1 parent be6db26 commit b014b23

26 files changed

+16206
-0
lines changed

README.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# File Header Forger/文件伪造器
2+
- 使用Python编写的程序,GUI使用PyQt5
3+
- 该程序可用于绕过部分网盘的分享限制(如阿里云盘)
4+
5+
## 原理
6+
经本人测试(2023.1),阿里云盘对文件不光有后缀识别还有文件头识别(不确定,但修改它有效),所以光修改后缀没用,什么是文件头可以自行搜索。如下图,这是一张zip格式的文件的十六进制数据,选中的**504B0304**是zip格式的文件头,它可以说明这是一个zip格式的文件,所以我们想绕过检测的话,也要把它改了。
7+
![1](/img/1.png)
8+
我的做法是将首尾的4个字节对调,实现修改
9+
```
10+
with open(filePath,"rb+") as rawFile:
11+
rawFile.seek(0,0) #移动到文件的0(头)处偏移为0的位置
12+
BOC = rawFile.read(4) #读取节
13+
rawFile.seek(-4,2) #移动到文件的2(尾)处偏移为-4(向前4个字节)的位置
14+
EOC = rawFile.read(4
15+
rawFile.seek(-4,2)
16+
rawFile.write(BOC) #向文件末尾的4个写成文件开头的4个字节
17+
rawFile.seek(0,0)
18+
rawFile.write(EOC) #向文件开头的4个写成文件末尾的4个
19+
rawFile.close() #关闭文件
20+
```
21+
## 使用教程
22+
1. 将需要伪造的文件的路径填入框内(不要加双引号),支持选择文件或拖入文件 <br>
23+
仅支持伪造zip文件,如果你想伪造的文件不是zip格式,用压缩软件(如winrar)压缩成zip格式即可
24+
![2](img/2.png)
25+
26+
2. 点击伪造或还原按钮,提示伪造成功,文件后缀自动改成.pdf,这时你的文件就可以骗过一些程序的文件类型识别
27+
3. 如需还原文件(即解压文件),将伪造的文件(pdf格式)拖入程序,点击伪造或还原按钮,提示还原成功
28+

about.ui

Lines changed: 154 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,154 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<ui version="4.0">
3+
<class>about</class>
4+
<widget class="QWidget" name="about">
5+
<property name="geometry">
6+
<rect>
7+
<x>0</x>
8+
<y>0</y>
9+
<width>536</width>
10+
<height>300</height>
11+
</rect>
12+
</property>
13+
<property name="windowTitle">
14+
<string>关于</string>
15+
</property>
16+
<property name="windowIcon">
17+
<iconset resource="res.qrc">
18+
<normaloff>:/ico/img/Logo.ico</normaloff>:/ico/img/Logo.ico</iconset>
19+
</property>
20+
<widget class="QLabel" name="label">
21+
<property name="geometry">
22+
<rect>
23+
<x>0</x>
24+
<y>20</y>
25+
<width>251</width>
26+
<height>261</height>
27+
</rect>
28+
</property>
29+
<property name="text">
30+
<string/>
31+
</property>
32+
<property name="pixmap">
33+
<pixmap resource="res.qrc">:/ico/img/Logo.png</pixmap>
34+
</property>
35+
<property name="scaledContents">
36+
<bool>true</bool>
37+
</property>
38+
</widget>
39+
<widget class="QWidget" name="layoutWidget">
40+
<property name="geometry">
41+
<rect>
42+
<x>260</x>
43+
<y>30</y>
44+
<width>246</width>
45+
<height>242</height>
46+
</rect>
47+
</property>
48+
<layout class="QVBoxLayout" name="verticalLayout_3">
49+
<item>
50+
<layout class="QVBoxLayout" name="verticalLayout_2">
51+
<item>
52+
<layout class="QVBoxLayout" name="verticalLayout">
53+
<item>
54+
<widget class="QLabel" name="label_2">
55+
<property name="font">
56+
<font>
57+
<family>Microsoft YaHei</family>
58+
<pointsize>16</pointsize>
59+
<weight>75</weight>
60+
<bold>true</bold>
61+
</font>
62+
</property>
63+
<property name="text">
64+
<string>文件伪造器</string>
65+
</property>
66+
<property name="scaledContents">
67+
<bool>false</bool>
68+
</property>
69+
</widget>
70+
</item>
71+
<item>
72+
<widget class="QLabel" name="label_3">
73+
<property name="font">
74+
<font>
75+
<family>Microsoft YaHei</family>
76+
<pointsize>10</pointsize>
77+
</font>
78+
</property>
79+
<property name="text">
80+
<string>本软件使用python和pyqt5编写</string>
81+
</property>
82+
</widget>
83+
</item>
84+
<item>
85+
<widget class="QLabel" name="label_4">
86+
<property name="font">
87+
<font>
88+
<family>Microsoft YaHei</family>
89+
<pointsize>10</pointsize>
90+
</font>
91+
</property>
92+
<property name="text">
93+
<string>MIT License</string>
94+
</property>
95+
</widget>
96+
</item>
97+
<item>
98+
<widget class="QLabel" name="label_5">
99+
<property name="font">
100+
<font>
101+
<family>Microsoft YaHei</family>
102+
<pointsize>10</pointsize>
103+
</font>
104+
</property>
105+
<property name="text">
106+
<string>Version 1.4</string>
107+
</property>
108+
</widget>
109+
</item>
110+
</layout>
111+
</item>
112+
</layout>
113+
</item>
114+
<item>
115+
<spacer name="verticalSpacer">
116+
<property name="orientation">
117+
<enum>Qt::Vertical</enum>
118+
</property>
119+
<property name="sizeType">
120+
<enum>QSizePolicy::Fixed</enum>
121+
</property>
122+
<property name="sizeHint" stdset="0">
123+
<size>
124+
<width>20</width>
125+
<height>60</height>
126+
</size>
127+
</property>
128+
</spacer>
129+
</item>
130+
<item>
131+
<widget class="QPushButton" name="pushButton">
132+
<property name="font">
133+
<font>
134+
<family>Microsoft YaHei</family>
135+
<pointsize>12</pointsize>
136+
</font>
137+
</property>
138+
<property name="text">
139+
<string>Github项目</string>
140+
</property>
141+
<property name="icon">
142+
<iconset resource="res.qrc">
143+
<normaloff>:/ico/img/github Logo.png</normaloff>:/ico/img/github Logo.png</iconset>
144+
</property>
145+
</widget>
146+
</item>
147+
</layout>
148+
</widget>
149+
</widget>
150+
<resources>
151+
<include location="res.qrc"/>
152+
</resources>
153+
<connections/>
154+
</ui>

forge.ui

Lines changed: 102 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,102 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<ui version="4.0">
3+
<class>Form</class>
4+
<widget class="QWidget" name="Form">
5+
<property name="geometry">
6+
<rect>
7+
<x>0</x>
8+
<y>0</y>
9+
<width>445</width>
10+
<height>261</height>
11+
</rect>
12+
</property>
13+
<property name="windowTitle">
14+
<string>伪造成功</string>
15+
</property>
16+
<property name="windowIcon">
17+
<iconset resource="res.qrc">
18+
<normaloff>:/ico/img/Logo.ico</normaloff>:/ico/img/Logo.ico</iconset>
19+
</property>
20+
<widget class="QLabel" name="label">
21+
<property name="geometry">
22+
<rect>
23+
<x>20</x>
24+
<y>20</y>
25+
<width>150</width>
26+
<height>150</height>
27+
</rect>
28+
</property>
29+
<property name="text">
30+
<string/>
31+
</property>
32+
<property name="pixmap">
33+
<pixmap resource="res.qrc">:/ico/img/forge.png</pixmap>
34+
</property>
35+
<property name="scaledContents">
36+
<bool>true</bool>
37+
</property>
38+
</widget>
39+
<widget class="QLabel" name="label_2">
40+
<property name="geometry">
41+
<rect>
42+
<x>210</x>
43+
<y>60</y>
44+
<width>201</width>
45+
<height>61</height>
46+
</rect>
47+
</property>
48+
<property name="font">
49+
<font>
50+
<family>Microsoft YaHei</family>
51+
<pointsize>30</pointsize>
52+
<weight>75</weight>
53+
<bold>true</bold>
54+
</font>
55+
</property>
56+
<property name="text">
57+
<string>伪造成功</string>
58+
</property>
59+
</widget>
60+
<widget class="QPushButton" name="pushButton">
61+
<property name="geometry">
62+
<rect>
63+
<x>30</x>
64+
<y>190</y>
65+
<width>381</width>
66+
<height>41</height>
67+
</rect>
68+
</property>
69+
<property name="font">
70+
<font>
71+
<pointsize>10</pointsize>
72+
<weight>50</weight>
73+
<bold>false</bold>
74+
</font>
75+
</property>
76+
<property name="text">
77+
<string>关闭</string>
78+
</property>
79+
</widget>
80+
</widget>
81+
<resources>
82+
<include location="res.qrc"/>
83+
</resources>
84+
<connections>
85+
<connection>
86+
<sender>pushButton</sender>
87+
<signal>clicked()</signal>
88+
<receiver>Form</receiver>
89+
<slot>close()</slot>
90+
<hints>
91+
<hint type="sourcelabel">
92+
<x>59</x>
93+
<y>24</y>
94+
</hint>
95+
<hint type="destinationlabel">
96+
<x>222</x>
97+
<y>130</y>
98+
</hint>
99+
</hints>
100+
</connection>
101+
</connections>
102+
</ui>

img/1.png

37.4 KB
Loading

img/2.png

12.2 KB
Loading

img/Logo.ico

66.1 KB
Binary file not shown.

img/Logo.png

73.4 KB
Loading

img/aboutFHF.ico

52.4 KB
Binary file not shown.

img/autoAdd.ico

47.1 KB
Binary file not shown.

img/execute.ico

45.8 KB
Binary file not shown.

0 commit comments

Comments
 (0)