
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
auto-script-ocs
Advanced tools
auto-script-projects for OnlineCourseScript
// install this project 安装此项目
npm i auto-script-ocs
新建index.js文件复制以下内容然后 node index.js
或者在你的 node 程序中调用
const ASOcs = require('auto-script-ocs')
let options = {
//启动类型,目前有 : cx
type:'cx',
//开启验证码破解,如果你不想用验证码破解功能,想手动输入验证码,使用 use_breakCode: false
use_breakCode: false,
//破解验证码的配置,请到 http://www.ttshitu.com/ 打码平台配置你的 account账号和 password密码
breakCode: {
username: '...',
password: '...',
},
//学校名称
school: "北京大学",
//账号名称
account: '123456789',
//密码
password: '123456789'
}
/**
* 使用默认方式打开本机上存在的chrome浏览器,此时打开的浏览器是纯净的浏览器什么都没有
*/
const ocs = new ASOcs(options) //传入options配置
ocs.launch().then(async browser=>{
//启动浏览器并登录
await ocs.login.start()
//获取课程信息
const course_info =await ocs.course.getCourseInfo()
console.log(course_info);
//进入学习界面
await ocs.course.gotoStudy( course_info[0].url)
//进入考试界面
await ocs.course.gotoExam(course_info[0].url)
//进入作业界面
await ocs.course.gotoWork( course_info[0].url)
//关闭浏览器
browser.close()
}).catch(e=>{
console.error(e);
})
type <string> cx | ... 超星 ,目前只支持 cx
use_breakCode <boolean> 是否开启验证码破解 ,
breakCode <Object> 此属性必须先开启 use_breakCode : true ,请到 http://www.ttshitu.com/docs/ 打码平台配置你的 account账号和 password密码
school <string> 网课平台学校名
account <string> 网课平台账号
password <string> 网课平台密码
browser_utils <BrowserUtils> 浏览器工具类
login : <ASOcsLogin> 登录类 , 使用 login.start() 登录
course: <ASOcsCourse> 课程类
launch() return <Browser> 默认启动方式,初始化
launchByDebug(options) return <Browser> 调试模式启动,具体见 see https://chromedevtools.github.io/devtools-protocol/
登录类,start() 作为主函数使用,其他方法不建议调用
start() return <Promise> 开始登录函数
具体实现类 : CXLogin
FAQs
auto-script-projects for OnlineCourceScript
We found that auto-script-ocs demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.