![Kauj ruam-rau-kauj ruam txhais tes rau kev teeb tsa thiab siv Nodejsscan rau sab ntau 4370_1](/userfiles/21/4370_1.webp)
Kab lus no nthuav qhia cov lus qhia ib qib zuj zus los teeb tsa thiab siv Nodejsscan rau sab ntau heev. Cov nyeem yuav muaj peev xwm ua tau lawv tus kheej nrog cov qauv piv txwv ntawm cov kev teeb tsa kev teeb tsa.
Nidejsscan yog ib qho code zoo li qub scanner uas tau siv los tshawb kev ruaj ntseg hauv node.js cov ntawv thov. Nws yuav tsum to taub yog li cas NodejsScan rau sats yuav siv tau yog tias muaj kev xav tau.
Kev teeb tsa, teeb tsa thiab siv Nodejsscan scanner- Tus neeg siv khoom nruab posgres thiab configures nws (sqlalchemy_datase_url) hauv cov tub ntxhais / teev.py
- Tom ntej no, nws rub tawm cov nodejsscan pob los ntawm github repository los ntawm kev tig ntawm qhov txuas no.
![Kauj ruam-rau-kauj ruam txhais tes rau kev teeb tsa thiab siv Nodejsscan rau sab ntau 4370_2](/userfiles/21/4370_2.webp)
Tom qab tias koj yuav tsum tau mus rau ntawm NodeScan cov npe thiab nruab txhua qhov tsim nyog siv uas siv cov lus txib:
Pip3 nruab -R yuav tsum tau.QUPT
![Kauj ruam-rau-kauj ruam txhais tes rau kev teeb tsa thiab siv Nodejsscan rau sab ntau 4370_3](/userfiles/21/4370_3.webp)
- Koj yuav tsum ua tiav cov lus txib no (nabth3 migrate.py) ib zaug los tsim cov kev nkag tsim nyog hauv cov ntaub ntawv.
- Lub "sej3 app.py" cov lus txib yog ua nyob rau hauv kev sim ntsuas qhov nruab nrab.
- Nruab rab phom yuav tsum muaj rau cov haujlwm kom raug ntawm NodeScan, koj tuaj yeem siv "rab phom -b 0.0.0.0: 19090 AP: App" hais kom ua. Nws yog xav tau rau cov chaw tsim khoom.
![Kauj ruam-rau-kauj ruam txhais tes rau kev teeb tsa thiab siv Nodejsscan rau sab ntau 4370_4](/userfiles/21/4370_4.webp)
Cov cuab yeej no yuav khiav nodejsscan ntawm: http: //0.0.0: 9090. Yog tias koj xav tau kho, nruab debug rau "muaj tseeb" hauv cov tub ntxhais / nqis tes.py. Nrog rau lub sijhawm hloov tshiab ntawm cov cuab yeej no, cov nidejsscan muaj tsawg kawg ntawm cov tsis tseeb.
![Kauj ruam-rau-kauj ruam txhais tes rau kev teeb tsa thiab siv Nodejsscan rau sab ntau 4370_5](/userfiles/21/4370_5.webp)
Cov kab hais kom ua interface lossis "cli" tso cai rau cov cuab yeej no los ua ke nrog DevSecops CI / CD Conveyors. Cov txiaj ntsig yuav nthuav tawm rau tus neeg siv hauv Json hom ntawv.
![Kauj ruam-rau-kauj ruam txhais tes rau kev teeb tsa thiab siv Nodejsscan rau sab ntau 4370_6](/userfiles/21/4370_6.webp)
Docker cov duab tuaj yeem teeb tsa rau NodeScan siv cov kauj ruam hauv qab no:
- Ua ntej, koj yuav tsum tau ua kom ntseeg tau tias docker nws tus kheej tau raug ntsia hauv lub kaw lus.
- Tus neeg siv xa cov kev pabcuam docker uas siv cov lus txib:
Kev pabcuam Docker pib.
- Tom ntej no, nws ua cov lus txib hauv qab no:
Docker tsim -t Nidejsscan
- Tom qab ntawd, thaum kawg, nws nkag mus rau cov lus txib no kom khiav daim ntawv thov:
Docker Khiav -P 9090: 9090 Nidejsscan
Ua qauv qhia ntawm tag nrho cov txheej txheem ntawm cov qauv ua piv txwv- Tus neeg siv tau sim cov cuab yeej no ntawm lub chaw sau khoom muaj cov cai tsis tiav thiab cuam tshuam.
- Cov ntawv thov nodeJSS yog sib xws nrog cov ntaub ntawv hom uas tau ua tiav rau nws. Yog li, koj yuav tsum tau compress koj .js code rau .zip archive, thiab tom qab ntawd qhib browser thiab rub tawm cov ntaub ntawv compressions.
- Tom qab rub tawm cov zip file, qhov cuab yeej yuav qhia cov neeg siv cov npe ntawm txhua qhov kev tiv thaiv txhua qhov tsis zoo.
![Kauj ruam-rau-kauj ruam txhais tes rau kev teeb tsa thiab siv Nodejsscan rau sab ntau 4370_7](/userfiles/21/4370_7.webp)
![Kauj ruam-rau-kauj ruam txhais tes rau kev teeb tsa thiab siv Nodejsscan rau sab ntau 4370_8](/userfiles/21/4370_8.webp)
Tus sau ntawm cov lus txhais lus: Sudhansu Shekhar.
Cov ntaub ntawv nthuav ntau ntawm Cisoclub.ru. Sau npe yuav rau peb: Facebook | Vk | Ntsev | Instagram | Telegram | Zen | Neeg xa xov liaison | ICQ tshiab | Youtube | Mem tes.