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

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
15dd committed Jan 5, 2023
1 parent be6db26 commit b014b23
Show file tree
Hide file tree
Showing 26 changed files with 16,206 additions and 0 deletions.
28 changes: 28 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# File Header Forger/文件伪造器
- 使用Python编写的程序,GUI使用PyQt5
- 该程序可用于绕过部分网盘的分享限制(如阿里云盘)

## 原理
经本人测试(2023.1),阿里云盘对文件不光有后缀识别还有文件头识别(不确定,但修改它有效),所以光修改后缀没用,什么是文件头可以自行搜索。如下图,这是一张zip格式的文件的十六进制数据,选中的**504B0304**是zip格式的文件头,它可以说明这是一个zip格式的文件,所以我们想绕过检测的话,也要把它改了。
![1](/img/1.png)
我的做法是将首尾的4个字节对调,实现修改
```
with open(filePath,"rb+") as rawFile:
rawFile.seek(0,0) #移动到文件的0(头)处偏移为0的位置
BOC = rawFile.read(4) #读取节
rawFile.seek(-4,2) #移动到文件的2(尾)处偏移为-4(向前4个字节)的位置
EOC = rawFile.read(4
rawFile.seek(-4,2)
rawFile.write(BOC) #向文件末尾的4个写成文件开头的4个字节
rawFile.seek(0,0)
rawFile.write(EOC) #向文件开头的4个写成文件末尾的4个
rawFile.close() #关闭文件
```
## 使用教程
1. 将需要伪造的文件的路径填入框内(不要加双引号),支持选择文件或拖入文件 <br>
仅支持伪造zip文件,如果你想伪造的文件不是zip格式,用压缩软件(如winrar)压缩成zip格式即可
![2](img/2.png)

2. 点击伪造或还原按钮,提示伪造成功,文件后缀自动改成.pdf,这时你的文件就可以骗过一些程序的文件类型识别
3. 如需还原文件(即解压文件),将伪造的文件(pdf格式)拖入程序,点击伪造或还原按钮,提示还原成功

154 changes: 154 additions & 0 deletions about.ui
Original file line number Diff line number Diff line change
@@ -0,0 +1,154 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>about</class>
<widget class="QWidget" name="about">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>536</width>
<height>300</height>
</rect>
</property>
<property name="windowTitle">
<string>关于</string>
</property>
<property name="windowIcon">
<iconset resource="res.qrc">
<normaloff>:/ico/img/Logo.ico</normaloff>:/ico/img/Logo.ico</iconset>
</property>
<widget class="QLabel" name="label">
<property name="geometry">
<rect>
<x>0</x>
<y>20</y>
<width>251</width>
<height>261</height>
</rect>
</property>
<property name="text">
<string/>
</property>
<property name="pixmap">
<pixmap resource="res.qrc">:/ico/img/Logo.png</pixmap>
</property>
<property name="scaledContents">
<bool>true</bool>
</property>
</widget>
<widget class="QWidget" name="layoutWidget">
<property name="geometry">
<rect>
<x>260</x>
<y>30</y>
<width>246</width>
<height>242</height>
</rect>
</property>
<layout class="QVBoxLayout" name="verticalLayout_3">
<item>
<layout class="QVBoxLayout" name="verticalLayout_2">
<item>
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<widget class="QLabel" name="label_2">
<property name="font">
<font>
<family>Microsoft YaHei</family>
<pointsize>16</pointsize>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="text">
<string>文件伪造器</string>
</property>
<property name="scaledContents">
<bool>false</bool>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="label_3">
<property name="font">
<font>
<family>Microsoft YaHei</family>
<pointsize>10</pointsize>
</font>
</property>
<property name="text">
<string>本软件使用python和pyqt5编写</string>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="label_4">
<property name="font">
<font>
<family>Microsoft YaHei</family>
<pointsize>10</pointsize>
</font>
</property>
<property name="text">
<string>MIT License</string>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="label_5">
<property name="font">
<font>
<family>Microsoft YaHei</family>
<pointsize>10</pointsize>
</font>
</property>
<property name="text">
<string>Version 1.4</string>
</property>
</widget>
</item>
</layout>
</item>
</layout>
</item>
<item>
<spacer name="verticalSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::Fixed</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>60</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QPushButton" name="pushButton">
<property name="font">
<font>
<family>Microsoft YaHei</family>
<pointsize>12</pointsize>
</font>
</property>
<property name="text">
<string>Github项目</string>
</property>
<property name="icon">
<iconset resource="res.qrc">
<normaloff>:/ico/img/github Logo.png</normaloff>:/ico/img/github Logo.png</iconset>
</property>
</widget>
</item>
</layout>
</widget>
</widget>
<resources>
<include location="res.qrc"/>
</resources>
<connections/>
</ui>
102 changes: 102 additions & 0 deletions forge.ui
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>Form</class>
<widget class="QWidget" name="Form">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>445</width>
<height>261</height>
</rect>
</property>
<property name="windowTitle">
<string>伪造成功</string>
</property>
<property name="windowIcon">
<iconset resource="res.qrc">
<normaloff>:/ico/img/Logo.ico</normaloff>:/ico/img/Logo.ico</iconset>
</property>
<widget class="QLabel" name="label">
<property name="geometry">
<rect>
<x>20</x>
<y>20</y>
<width>150</width>
<height>150</height>
</rect>
</property>
<property name="text">
<string/>
</property>
<property name="pixmap">
<pixmap resource="res.qrc">:/ico/img/forge.png</pixmap>
</property>
<property name="scaledContents">
<bool>true</bool>
</property>
</widget>
<widget class="QLabel" name="label_2">
<property name="geometry">
<rect>
<x>210</x>
<y>60</y>
<width>201</width>
<height>61</height>
</rect>
</property>
<property name="font">
<font>
<family>Microsoft YaHei</family>
<pointsize>30</pointsize>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="text">
<string>伪造成功</string>
</property>
</widget>
<widget class="QPushButton" name="pushButton">
<property name="geometry">
<rect>
<x>30</x>
<y>190</y>
<width>381</width>
<height>41</height>
</rect>
</property>
<property name="font">
<font>
<pointsize>10</pointsize>
<weight>50</weight>
<bold>false</bold>
</font>
</property>
<property name="text">
<string>关闭</string>
</property>
</widget>
</widget>
<resources>
<include location="res.qrc"/>
</resources>
<connections>
<connection>
<sender>pushButton</sender>
<signal>clicked()</signal>
<receiver>Form</receiver>
<slot>close()</slot>
<hints>
<hint type="sourcelabel">
<x>59</x>
<y>24</y>
</hint>
<hint type="destinationlabel">
<x>222</x>
<y>130</y>
</hint>
</hints>
</connection>
</connections>
</ui>
Binary file added img/1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added img/2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added img/Logo.ico
Binary file not shown.
Binary file added img/Logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added img/aboutFHF.ico
Binary file not shown.
Binary file added img/autoAdd.ico
Binary file not shown.
Binary file added img/execute.ico
Binary file not shown.
Binary file added img/forge.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added img/forge.psd
Binary file not shown.
Binary file added img/github Logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added img/qt-logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added img/restore.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added img/restore.psd
Binary file not shown.
Loading

0 comments on commit b014b23

Please sign in to comment.