本人从事网路安全工作12年,曾在2个大厂工作过,安全服务、售后服务、售前、攻防比赛、安全讲师、销售经理等职位都做过,对这个行业了解比较全面。
最近遍览了各种网络安全类的文章,内容参差不齐,其中不伐有大佬倾力教学,也有各种不良机构浑水摸鱼,在收到几条私信,发现大家对一套完整的系统的网络安全从学习路线到学习资料,甚至是工具有着不小的需求。
最后,我将这部分内容融会贯通成了一套282G的网络安全资料包,所有类目条理清晰,知识点层层递进,需要的小伙伴可以点击下方小卡片领取哦!下面就开始进入正题,如何从一个萌新一步一步进入网络安全行业。
学习路线图
其中最为瞩目也是最为基础的就是网络安全学习路线图,这里我给大家分享一份打磨了3个月,已经更新到4.0版本的网络安全学习路线图。
相比起繁琐的文字,还是生动的视频教程更加适合零基础的同学们学习,这里也是整理了一份与上述学习路线一一对应的网络安全视频教程。
网络安全工具箱
当然,当你入门之后,仅仅是视频教程已经不能满足你的需求了,你肯定需要学习各种工具的使用以及大量的实战项目,这里也分享一份我自己整理的网络安全入门工具以及使用教程和实战。
项目实战
最后就是项目实战,这里带来的是SRC资料&HW资料,毕竟实战是检验真理的唯一标准嘛~
面试题
归根结底,我们的最终目的都是为了就业,所以这份结合了多位朋友的亲身经验打磨的面试题合集你绝对不能错过!
网上学习资料一大堆,但如果学到的知识不成体系,遇到问题时只是浅尝辄止,不再深入研究,那么很难做到真正的技术提升。
一个人可以走的很快,但一群人才能走的更远!不论你是正从事IT行业的老鸟或是对IT行业感兴趣的新人,都欢迎加入我们的的圈子(技术交流、学习资源、职场吐槽、大厂内推、面试辅导),让我们一起学习成长!
前言
大家好,这篇文章详细的介绍了isbn接口的使用,可以实现自给自足,不用去网上买接口,博主最近在开发芒果校园参加比赛,二手市场若能直接扫描isbn获取图书详情那真的是很方便,于是在网上看到了很多接口,我们来看一下我的踩坑经历:由于版权原因 现在直接上成品
目前有以下获取到isbn接口的办法:
1、某数据,我这里不放链接了,要花钱,那我肯定不干,众所周知我是个白嫖怪,能动手绝不花钱!!
2、某瓣,免费还有各种参数,没错是我想要的
提示:以下是本篇文章正文内容,介绍如何抓取某瓣的接口,由于版权原因,分析直接跳过
一、开始抓某网站isbn接口(由于版权原因,分析直接跳过)
由于版权原因,分析直接跳过
由于版权原因,分析直接跳过
二、某接口最新可用Tp5代码
1.后端部署代码
//图书接口测试
public function getBookInfo()
{
$isbn = $\_GET['isbn'];
try {
$surl = 'https://book.douban.com/isbn/' . $isbn . '/';
$headers = json\_encode(get\_headers($surl), true);
$headers = json\_encode($headers, true);
$surl = $this->cut($headers, 'Location: ', '"');
$surl = str\_replace('\\', '', $surl);//302地址
$data = $this->getIsbn($surl);
$data\_1 = $this->cut($data, 'application/ld+json">', '</script>');
$data\_1 = json\_decode($data\_1, true);
$res['title'] = $data\_1['name'];//书名
$res['logo'] = $this->cut($data, 'data-pic="', '"');//图标
$author = $data\_1['author'];
if (!isset($author[0]) || $author[0] == '') {
$author[0]['name'] = '未知';
}
$res['author'] = $author;//作者
//相关书籍推荐
$publisher = $this->cut($data, '出版社:</span>', '<br/>');
if ($publisher == '') {
$publisher = '未知';
}
$res['publisher'] = $publisher;//出版社
$author\_desc = $this->cut($data, 'class="indent ">', '</div>');
$res['author\_desc'] = $this->cut($author\_desc, '<p>', '</p>');
if ($res['author\_desc'] == "") {
$res['author\_desc'] = '未知';
}
$res['author\_desc'] = $author\_desc;//作者简介
$published = $this->cut($data, '出版年:</span>', '<br/>');
if ($published == '') {
$published = '未知';
}
$res['published'] = $published;//出版年
$page = $this->cut($data, '页数:</span>', '<br/>');
if ($page == '') {
$page = '未知';
}
$res['page'] = $page;//页数
$price = $this->cut($data, '定价:</span>', '<br/>');
if ($price == '') {
$price = '未知';
}
$res['price'] = $price;//定价
$designed = $this->cut($data, '装帧:</span>', '<br/>');
if ($designed == '') {
$designed = '未知';
}
$res['designed'] = $designed;//装帧
$description = $this->cut($data, 'class="intro">', '</p>');
if ($description == '') {
$description = '未进行描述';
} else {
$description = explode('<p>', $description)[1];
}
$res['description'] = $description;//简介
// return\_msg(200, '请求成功', $res);
return json($res);
} catch (Exception $e) {
return\_msg(500, '服务器内部错误', $e);
}
}
private function cut($content, $start, $end)
{
$r = explode($start, $content);
if (isset($r[1])) {
$r = explode($end, $r[1]);
return $r[0];
}
return '';
}
private function getIsbn($url) //curl get请求
{
$postUrl = $url;
$curlPost = 'GET';
$curl = curl\_init();//初始化curl
curl\_setopt($curl, CURLOPT\_URL, $postUrl);//抓取指定网页
curl\_setopt($curl, CURLOPT\_HEADER, 0);//设置header
curl\_setopt($curl, CURLOPT\_RETURNTRANSFER, 1);//要求结果为字符串且输出到屏幕上
curl\_setopt($curl, CURLOPT\_POST, 1);//post提交方式
curl\_setopt($curl, CURLOPT\_POSTFIELDS, $curlPost);
curl\_setopt($curl, CURLOPT\_SSL\_VERIFYPEER, false); //不验证证书下同
curl\_setopt($curl, CURLOPT\_SSL\_VERIFYHOST, false);
$data = curl\_exec($curl);//运行curl
curl\_close($curl);
return $data;
}
2.使用方法
访问:https://你的域名/Index/Api/getBookInfo?isbn=97****96898
上面的是我的目录结构,具体自己放在哪,改一下即可!!
然后看一下运行结果:
ok,没问题,有一点不足,就是会吃内存资源,如果只是需要对数据库中的isbn做一次采集,可以用python加一个代理池即可(频繁访问会被拉黑!)
三、对接小程序实现扫码获取图书详情!
1.预览
2.代码介绍
通过wxml中点击scanCode的方法
<view class="cu-form-group">
<button type="primary" bindtap="scanCode">一键扫描识别</button>
</view>
来到js方法中:
scanCode: function (event) {
console.log(1)
let that=this;
// 允许从相机和相册扫码
wx.scanCode({
onlyFromCamera:true,
scanType:['barCode'],
success:res=>{
console.log(res.result)
that.get\_isbn(res.result);
},
fail:err=>{
console.log(err);
}
})
},
微信提供 wx.scanCode接口调用即可获取扫码信息,下图是控制台输出的结果
获取到后调用方法get_isbn()
that.get\_isbn(res.result);
最后对刚刚的接口做一次requests访问请求,写入AppData即可
get\_isbn:function(ee){
let that=this;
wx.request({
url: 'https://你的域名/Index/Api/getBookInfo', //仅为示例,并非真实的接口地址
data: {
isbn:ee
},
header: {
'content-type': 'application/json' // 默认值
},
success (res) {
console.log(res.data)
that.setData({
tp_list:res.data
})
}
})
},
2.完整Wxml代码
<cu-custom bgColor="bgmain" isBack="{{true}}">
<view slot="content">发布</view>
</cu-custom>
<view class="weui-cells weui-cells\_after-title page">
<view class="box">
<view class="cu-bar bg-white">
<view class="info">
<text class="cuIcon-titles text-green"></text>
<text class="text-xl text-bold">商品基本信息</text>
</view>
</view>
</view>
<view class="cu-form-group">
<button type="primary" bindtap="scanCode">一键扫描识别</button>
</view>
<view class="cu-form-group">
<view class="title">商品名称</view>
<input bindinput="bookNameInput" placeholder="请输入商品的名称" value="{{tp\_list.title}}"></input>
</view>
<view class="weui-cell weui-cell\_input">
<view class="weui-cell\_\_hd">
<view class="weui-label">添加图片</view>
</view>
</view>
<view class="margin-left" >
<image style="width: 200rpx; height: 200rpx; background-color: #eeeeee;" src="{{tp\_list.logo}}"></image>
</view>
<view class="cu-form-group">
<view class="title">新旧程度</view>
<picker bindchange="bindPickerChange" range="{{array}}" value="{{index}}">
<view class="picker">
{{array[index]}}
</view>
</picker>
</view>
<view class="cu-form-group">
<view class="title">所属分类</view>
<picker bindchange="bindPickerChanges" range="{{cateList}}" rangeKey="{{'name'}}" value="{{cateList[indexs].id}}">
<view class="picker">
{{cateList[indexs].name}}
</view>
</picker>
</view>
<view class="cu-form-group">
<view class="title">原价</view>
<input bindinput="oldpriceInput" name="oldPrice" placeholder="最多保留两位小数" type="digit" value="{{tp\_list.price}}"></input>
</view>
<view class="cu-form-group">
<view class="title">二手价</view>
<input bindinput="newpriceInput" name="newPrice" placeholder="最多保留两位小数" type="digit"></input>
</view>
<view class="cu-form-group">
<view class="title">联系电话</view>
<input bindinput="phone" name="phone" placeholder="请输入电话" type="number"></input>
</view>
<view class="cu-form-group margin-bottom">
<view class="title">具体描述</view>
<textarea autoHeight="true" bindinput="descInput" disabled="{{modalName!=null}}" maxlength="-1" placeholder="请输入描述" value="{{tp\_list.description}}"></textarea>
</view>
<!-- <view class="del\_remark text-sm margin-left margin-bottom">\*长按图片可进行删除</view> -->
<button bindtap="save" class="my\_button" type="primary">发布</button>
</view>
3.完整js代码
scanCode: function (event) {
console.log(1)
let that=this;
// 允许从相机和相册扫码
wx.scanCode({
onlyFromCamera:true,
scanType:['barCode'],
success:res=>{
console.log(res.result)
that.get\_isbn(res.result);
},
fail:err=>{
console.log(err);
}
})
},
get\_isbn:function(ee){
let that=this;
wx.request({
url: 'https://域名/Index/Api/getBookInfo', //仅为示例,并非真实的接口地址
data: {
isbn:ee
},
header: {
'content-type': 'application/json' // 默认值
},
success (res) {
console.log(res.data)
that.setData({
tp_list:res.data
})
}
})
},
4.完整wxss代码
page {
line-height: 1.6;
font-family: -apple-system-font,Helvetica Neue,sans-serif;
}
.cu-bar .action:first-child {
background-color: #ff6444;
color: #fff;
}
.info {
background: #fff;
color: #000;
}
.bgmain {
background-color: #ff6444;
color: #fff;
}
icon {
vertical-align: middle;
}
.weui-cells {
position: relative;
margin-top: 1.17647059em;
background-color: #fff;
line-height: 1.41176471;
font-size: 17px;
}
.weui-cells:before {
border-top: 1rpx solid #d9d9d9;
}
.weui-cells:after,.weui-cells:before {
content: " ";
position: absolute;
left: 0;
right: 0;
height: 1px;
color: #d9d9d9;
}
.weui-cells:after {
border-bottom: 1rpx solid #d9d9d9;
}
.weui-cells__title {
margin-top: .77em;
margin-bottom: .3em;
padding-left: 15px;
padding-right: 15px;
color: #999;
font-size: 14px;
}
.weui-cells_after-title {
margin-top: 0;
}
.weui-cells__tips {
margin-top: .3em;
color: #999;
padding-left: 15px;
padding-right: 15px;
font-size: 14px;
}
.weui-cell {
padding: 10px 15px;
position: relative;
display: flex;
-webkit-box-align: center;
align-items: center;
}
.weui-cell:before {
content: " ";
position: absolute;
left: 0;
top: 0;
right: 0;
height: 1px;
border-top: 1rpx solid #d9d9d9;
color: #d9d9d9;
left: 15px;
}
.weui-cell:first-child:before {
display: none;
}
.weui-cell_active {
background-color: #ececec;
}
.weui-cell_primary {
-webkit-box-align: start;
align-items: flex-start;
}
.weui-cell__bd {
-webkit-box-flex: 1;
flex: 1;
}
.weui-cell__ft {
text-align: right;
color: #999;
}
.weui-cell_access {
color: inherit;
}
.weui-cell__ft_in-access {
padding-right: 13px;
position: relative;
}
.weui-cell__ft_in-access:after {
content: " ";
display: inline-block;
height: 6px;
width: 6px;
border-color: #c8c8cd;
border-style: solid;
border-width: 2px 2px 0 0;
transform: matrix(.71,.71,-.71,.71,0,0);
position: relative;
top: -2px;
position: absolute;
top: 50%;
margin-top: -4px;
right: 2px;
}
.weui-cell_link {
color: #586c94;
font-size: 14px;
}
.weui-cell_link:active {
background-color: #ececec;
}
.weui-cell_link:first-child:before {
display: block;
}
.weui-icon-radio {
margin-left: 3.2px;
margin-right: 3.2px;
}
.weui-icon-checkbox_circle,.weui-icon-checkbox_success {
margin-left: 4.6px;
margin-right: 4.6px;
}
.weui-check__label:active {
background-color: #ececec;
}
.weui-check {
position: absolute;
left: -9999px;
}
.weui-check__hd_in-checkbox {
padding-right: .35em;
}
.weui-cell__ft_in-radio {
padding-left: .35em;
}
.weui-cell_input {
padding-top: 0;
padding-bottom: 0;
}
.weui-label {
width: 105px;
word-wrap: break-word;
word-break: break-all;
}
.weui-input {
height: 2.58823529em;
min-height: 2.58823529em;
line-height: 2.58823529em;
}
.weui-toptips {
position: fixed;
transform: translateZ(0);
top: 0;
left: 0;
right: 0;
padding: 5px;
font-size: 14px;
text-align: center;
color: #fff;
z-index: 5000;
word-wrap: break-word;
word-break: break-all;
}
.weui-toptips_warn {
background-color: #e64340;
}
.weui-textarea {
display: block;
width: 100%;
}
.weui-textarea-counter {
color: #b2b2b2;
text-align: right;
}
.weui-cell_warn,.weui-textarea-counter_warn {
color: #e64340;
}
.weui-form-preview {
position: relative;
background-color: #fff;
}
.weui-form-preview:before {
top: 0;
border-top: 1rpx solid #d9d9d9;
}
.weui-form-preview:after,.weui-form-preview:before {
content: " ";
position: absolute;
left: 0;
right: 0;
height: 1px;
color: #d9d9d9;
}
.weui-form-preview:after {
bottom: 0;
border-bottom: 1rpx solid #d9d9d9;
}
.weui-form-preview__value {
font-size: 14px;
}
.weui-form-preview__value_in-hd {
font-size: 26px;
}
.weui-form-preview__hd {
position: relative;
padding: 10px 15px;
text-align: right;
line-height: 2.5em;
}
.weui-form-preview__hd:after {
content: " ";
position: absolute;
left: 0;
bottom: 0;
right: 0;
height: 1px;
border-bottom: 1rpx solid #d9d9d9;
color: #d9d9d9;
left: 15px;
}
.weui-form-preview__bd {
padding: 10px 15px;
font-size: .9em;
text-align: right;
color: #999;
line-height: 2;
}
.weui-form-preview__ft {
position: relative;
line-height: 50px;
display: flex;
}
.weui-form-preview__ft:after {
content: " ";
position: absolute;
left: 0;
top: 0;
right: 0;
height: 1px;
border-top: 1rpx solid #d5d5d6;
color: #d5d5d6;
}
.weui-form-preview__item {
overflow: hidden;
}
.weui-form-preview__label {
float: left;
margin-right: 1em;
min-width: 4em;
color: #999;
text-align: justify;
text-align-last: justify;
}
.weui-form-preview__value {
display: block;
overflow: hidden;
word-break: normal;
word-wrap: break-word;
}
.weui-form-preview__btn {
position: relative;
display: block;
-webkit-box-flex: 1;
flex: 1;
color: #3cc51f;
text-align: center;
}
.weui-form-preview__btn:after {
content: " ";
position: absolute;
left: 0;
top: 0;
width: 1px;
bottom: 0;
border-left: 1rpx solid #d5d5d6;
color: #d5d5d6;
}
.weui-form-preview__btn:first-child:after {
display: none;
}
.weui-form-preview__btn_active {
background-color: #eee;
}
.weui-form-preview__btn_default {
color: #999;
}
.weui-form-preview__btn_primary {
color: #0bb20c;
}
.weui-cell_select {
padding: 0;
}
.weui-select {
position: relative;
padding-left: 15px;
padding-right: 30px;
height: 2.58823529em;
min-height: 2.58823529em;
line-height: 2.58823529em;
border-right: 1rpx solid #d9d9d9;
}
.weui-select:before {
content: " ";
display: inline-block;
height: 6px;
width: 6px;
border-color: #c8c8cd;
border-style: solid;
border-width: 2px 2px 0 0;
transform: matrix(.71,.71,-.71,.71,0,0);
position: relative;
top: -2px;
position: absolute;
top: 50%;
right: 15px;
margin-top: -4px;
}
.weui-select_in-select-after {
padding-left: 0;
}
.weui-cell__bd_in-select-before,.weui-cell__hd_in-select-after {
padding-left: 15px;
}
.weui-cell_vcode {
padding-right: 0;
}
.weui-vcode-btn,.weui-vcode-img {
margin-left: 5px;
height: 2.58823529em;
vertical-align: middle;
}
.weui-vcode-btn {
display: inline-block;
padding: 0 .6em 0 .7em;
border-left: 1px solid #e5e5e5;
line-height: 2.58823529em;
font-size: 17px;
color: #3cc51f;
white-space: nowrap;
}
.weui-vcode-btn:active {
color: #52a341;
}
.weui-cell_switch {
padding-top: 6px;
padding-bottom: 6px;
}
.weui-uploader__hd {
display: flex;
padding-bottom: 10px;
-webkit-box-align: center;
align-items: center;
}
.weui-uploader__title {
-webkit-box-flex: 1;
flex: 1;
}
.weui-uploader__info {
color: #b2b2b2;
}
.weui-uploader__bd {
margin-bottom: -4px;
margin-right: -9px;
overflow: hidden;
}
.weui-uploader__file {
float: left;
margin-right: 9px;
margin-bottom: 9px;
}
.weui-uploader__img {
display: block;
width: 79px;
height: 79px;
}
.weui-uploader__file_status {
position: relative;
}
.weui-uploader__file_status:before {
content: " ";
position: absolute;
top: 0;
right: 0;
bottom: 0;
left: 0;
background-color: rgba(0,0,0,.5);
}
.weui-uploader__file-content {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%,-50%);
color: #fff;
}
.weui-uploader__input-box {
float: left;
position: relative;
margin-right: 9px;
margin-bottom: 9px;
width: 77px;
height: 77px;
border: 1px solid #d9d9d9;
}
.weui-uploader__input-box:after,.weui-uploader__input-box:before {
content: " ";
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%,-50%);
background-color: #d9d9d9;
}
.weui-uploader__input-box:before {
width: 2px;
height: 39.5px;
}
.weui-uploader__input-box:after {
width: 39.5px;
height: 2px;
}
.weui-uploader__input-box:active {
border-color: #999;
}
.weui-uploader__input-box:active:after,.weui-uploader__input-box:active:before {
background-color: #999;
}
.weui-uploader__input {
position: absolute;
z-index: 1;
top: 0;
left: 0;
width: 100%;
height: 100%;
opacity: 0;
}
.weui-article {
padding: 20px 15px;
font-size: 15px;
}
.weui-article__section {
margin-bottom: 1.5em;
}
.weui-article__h1 {
font-size: 18px;
font-weight: 400;
margin-bottom: .9em;
}
.weui-article__h2 {
font-size: 16px;
font-weight: 400;
margin-bottom: .34em;
}
.weui-article__h3 {
font-weight: 400;
font-size: 15px;
margin-bottom: .34em;
}
.weui-article__p {
margin: 0 0 .8em;
}
.weui-msg {
padding-top: 36px;
text-align: center;
}
.weui-msg__link {
display: inline;
color: #586c94;
}
.weui-msg__icon-area {
margin-bottom: 30px;
}
.weui-msg__text-area {
margin-bottom: 25px;
padding: 0 20px;
}
.weui-msg__title {
margin-bottom: 5px;
font-weight: 400;
font-size: 20px;
}
.weui-msg__desc {
font-size: 14px;
color: #999;
}
.weui-msg__opr-area {
margin-bottom: 25px;
}
.weui-msg__extra-area {
margin-bottom: 15px;
font-size: 14px;
color: #999;
}
@media screen and (min-height:438px) {
.weui-msg__extra-area {
position: fixed;
left: 0;
bottom: 0;
width: 100%;
text-align: center;
}
}
.weui-flex {
display: flex;
}
.weui-flex__item {
-webkit-box-flex: 1;
flex: 1;
}
.weui-btn {
margin-top: 15px;
}
.weui-btn:first-child {
margin-top: 0;
}
.weui-btn-area {
margin: 1.17647059em 15px .3em;
}
.weui-agree {
display: block;
padding: .5em 15px;
### 给大家的福利
**零基础入门**
对于从来没有接触过网络安全的同学,我们帮你准备了详细的学习成长路线图。可以说是最科学最系统的学习路线,大家跟着这个大的方向学习准没问题。
![](https://img-blog.csdnimg.cn/img_convert/95608e9062782d28f4f04f821405d99a.png)
同时每个成长路线对应的板块都有配套的视频提供:
![在这里插入图片描述](https://img-blog.csdnimg.cn/direct/a91b9e8100834e9291cfcf1695d8cd42.png#pic_center)
因篇幅有限,仅展示部分资料
**网上学习资料一大堆,但如果学到的知识不成体系,遇到问题时只是浅尝辄止,不再深入研究,那么很难做到真正的技术提升。**
**[需要这份系统化资料的朋友,可以点击这里获取](https://bbs.csdn.net/topics/618540462)**
**一个人可以走的很快,但一群人才能走的更远!不论你是正从事IT行业的老鸟或是对IT行业感兴趣的新人,都欢迎加入我们的的圈子(技术交流、学习资源、职场吐槽、大厂内推、面试辅导),让我们一起学习成长!**