💠چگونه در زبان بش از یک تابع، یک مقدار را برگردانیم؟
مثال در python:
خروجی کد بالا عدد ۷ خواهد بود.
بش: (روش اول)
روش دوم: (کوتاهتر)
توضیحات:
در روش اول که کمی طولانیتره، ما میام خروجی تابع رو با استفاده از متغیر داخلی بش ?$ نمایش میدیم. این متغیر درواقع exit code دستور قبلی رو ذخیره میکنه.
توابع در بش مقداری رو مثل پایتون برنمیگردونن و صرفا exit code که عددی بین ۰ تا ۲۵۵ است رو برمیگردونن.
در تابع add، عبارت return درواقع باعث میشه که جمع آرگومانهای تابع بهعنوان exit status گزارش بشه.
متغیر داخلی ?$ این exit status رو ذخیره میکنه، که میشه جمع ۳ و ۴ و عدد ۷ رو نمایش میده.
در مثال دوم که سادهتره و راحتتر هم هست ما پارامترهای 1$ و 2$ رو به تابع میدیم و از اونجایی که اکو در تابع تعریف شده، مقدار برگردانده میشه و در ترمینال چاپ میشه.
@Engineer_Computer
#آموزش #لینوکس #بش
مثال در python:
def add(x, y):
return x + y
result = add(3, 4)
print(result)
خروجی کد بالا عدد ۷ خواهد بود.
بش: (روش اول)
#!/bin/bash
add() {
return $(($1 + $2))
}
add 3 4
result=$?
echo $result
روش دوم: (کوتاهتر)
#!/bin/bash
add() {
echo $(($1 + $2))
}
add 3 4
توضیحات:
در روش اول که کمی طولانیتره، ما میام خروجی تابع رو با استفاده از متغیر داخلی بش ?$ نمایش میدیم. این متغیر درواقع exit code دستور قبلی رو ذخیره میکنه.
توابع در بش مقداری رو مثل پایتون برنمیگردونن و صرفا exit code که عددی بین ۰ تا ۲۵۵ است رو برمیگردونن.
در تابع add، عبارت return درواقع باعث میشه که جمع آرگومانهای تابع بهعنوان exit status گزارش بشه.
متغیر داخلی ?$ این exit status رو ذخیره میکنه، که میشه جمع ۳ و ۴ و عدد ۷ رو نمایش میده.
در مثال دوم که سادهتره و راحتتر هم هست ما پارامترهای 1$ و 2$ رو به تابع میدیم و از اونجایی که اکو در تابع تعریف شده، مقدار برگردانده میشه و در ترمینال چاپ میشه.
@Engineer_Computer
#آموزش #لینوکس #بش
👍1
WebApp_Sec.pdf
14.2 MB
Techbook
WebApp Security
Web Application Security:
Exploitation and Countermeasures for Modern Web Applications 2024.
——————————————————
#CyberSecurity #webapp #OWASP #secure
@Engineer_Computer
WebApp Security
Web Application Security:
Exploitation and Countermeasures for Modern Web Applications 2024.
——————————————————
#CyberSecurity #webapp #OWASP #secure
@Engineer_Computer
❤1
Hardware Security
PKfail Research Report 2024.
https://www.binarly.io/blog/pkfail-u
@Engineer_Computer
——————————————————
#CyberSecurity #Hardware #CVE
#SecureBusinessContinuity
PKfail Research Report 2024.
https://www.binarly.io/blog/pkfail-u
@Engineer_Computer
——————————————————
#CyberSecurity #Hardware #CVE
#SecureBusinessContinuity
info
OSINT
End-of-life (EOL) and support information
for various products
https://endoflife.date
@Engineer_Computer
OSINT
End-of-life (EOL) and support information
for various products
https://endoflife.date
@Engineer_Computer
endoflife.date
Home
Check end-of-life, support schedule, and release timelines for more than 380+ products at one place.
Cisco_ThousandEyes_Digital_Experience_Monitoring_and_Troubleshooting.pdf
23.9 MB
Year : 2025
Pages : 683 Edition : null
#security #cybersecurity #network #Monitoring #cisco #book
@Engineer_Computer
Pages : 683 Edition : null
#security #cybersecurity #network #Monitoring #cisco #book
@Engineer_Computer
AMH.pdf
49.8 MB
Tech book
Mobile Security
Malware analysis
The Android Malware Handbook:
Detection and Analysis by Human and Machine 2024.
@Engineer_Computer
Mobile Security
Malware analysis
The Android Malware Handbook:
Detection and Analysis by Human and Machine 2024.
@Engineer_Computer
⭕Offensive security
Attacking an EDR
Part 1: https://her0ness.github.io/2023-08-03-c2-Attacking-an-EDR-Part-1
Part 2: https://her0ness.github.io/2023-09-14-Attacking-an-EDR-Part-2
Part 3: https://her0ness.github.io/2023-11-07-Attacking-an-EDR-Part-3
@Engineer_Computer
Attacking an EDR
Part 1: https://her0ness.github.io/2023-08-03-c2-Attacking-an-EDR-Part-1
Part 2: https://her0ness.github.io/2023-09-14-Attacking-an-EDR-Part-2
Part 3: https://her0ness.github.io/2023-11-07-Attacking-an-EDR-Part-3
@Engineer_Computer
Blog
Attacking an EDR - Part 1
For some fun and a fair bit of profit
مملکت «حسین قلی خانی» چیست؟
*حسین قلیخان مخبرالدوله، وزیر پست و تلگراف مظفرالدین شاه بود که برای جلوگیری از ارتباط مشروطه خواهان و مردم باهم، تمام سیمهای تلگراف تهران را قطع کرد!*
*و این اولین سابقه فیلترینگ در ایران بوده که بنا بر همین اتفاق این بساطی که او چیده بود مشهور شد به ضرب المثل معروف مملکت «حسین قلی خانی».
#پوفیوز_تاریخ
#history
@Engineer_Computer
*حسین قلیخان مخبرالدوله، وزیر پست و تلگراف مظفرالدین شاه بود که برای جلوگیری از ارتباط مشروطه خواهان و مردم باهم، تمام سیمهای تلگراف تهران را قطع کرد!*
*و این اولین سابقه فیلترینگ در ایران بوده که بنا بر همین اتفاق این بساطی که او چیده بود مشهور شد به ضرب المثل معروف مملکت «حسین قلی خانی».
#پوفیوز_تاریخ
#history
@Engineer_Computer
❤3😁1
استاندارد موسسه ملی آمریکا برای رمزنگاری پسا کوانتومی
https://www.nist.gov/news-events/news/2024/08/nist-releases-first-3-finalized-post-quantum-encryption-standards
@Engineer_Computer
https://www.nist.gov/news-events/news/2024/08/nist-releases-first-3-finalized-post-quantum-encryption-standards
@Engineer_Computer
NIST
NIST Releases First 3 Finalized Post-Quantum Encryption Standards
NIST is encouraging computer system administrators to begin transitioning to the new standards as soon as possible
Journeyman Cybersecurity Analyst
CA-Oxnard, We are seeking a Building Automations Analyst (Journeyman) Clearance: Secret Location: Pt. Hueneme, Ventura County Schedule: Onsite in Pt. Hueneme, with flexibility based on mission support requirements LCAT Level: Journeyman IT Analyst Position Denoscription The Defensive Cyber team is responsible for the analysis of all technology devices which may include Operational Technology (OT) and Industria
http://jobview.monster.com/Journeyman-Cybersecurity-Analyst-Job-Oxnard-CA-US-277513156.aspx
@Engineer_Computer
#US #Journeyman Cybersecurity Analyst
CA-Oxnard, We are seeking a Building Automations Analyst (Journeyman) Clearance: Secret Location: Pt. Hueneme, Ventura County Schedule: Onsite in Pt. Hueneme, with flexibility based on mission support requirements LCAT Level: Journeyman IT Analyst Position Denoscription The Defensive Cyber team is responsible for the analysis of all technology devices which may include Operational Technology (OT) and Industria
http://jobview.monster.com/Journeyman-Cybersecurity-Analyst-Job-Oxnard-CA-US-277513156.aspx
@Engineer_Computer
#US #Journeyman Cybersecurity Analyst
🔒 Discover how browser security platforms help CISOs cut costs, boost efficiency, and enhance cybersecurity.
Read real-life success stories:
https://thehackernews.com/2024/06/how-to-cut-costs-with-browser-security.html
@Engineer_Computer
Read real-life success stories:
https://thehackernews.com/2024/06/how-to-cut-costs-with-browser-security.html
@Engineer_Computer
سلام دوستان
از ربات های ناشناس استفاده نکنین
چون همه شون باقی میمونه
و اینم نتیجش
@Engineer_Computer
https://www.youtube.com/watch?v=1sZprSWgEsw
از ربات های ناشناس استفاده نکنین
چون همه شون باقی میمونه
و اینم نتیجش
@Engineer_Computer
https://www.youtube.com/watch?v=1sZprSWgEsw
YouTube
خوندن چتهای ناشناس تلگرام
۱۰ روز پیش امیر به ۳ تا از باتهای ناشناس نفوذ کرد و صحنههایی دیدیم که شکه شدیم، از ۱۴ میلیون یوزر، ۴۵۰ میلیمون چت، ۱۱ میلیون عکس و ۳ میلیون ویدیو ذخیره شده بود! اصلا باورمون نمیشد، بات یه فیچر داشت که یه یوزر رو فلگ میکرد، یعنی هر موقع پیغامی به شخص ارسال…
👍4🔥1
یک منبع خوب برای علاقمندان فارنزیک حافظه
حافظه جولانگاه بدافزارها و نفوذگران است. هم محلی برای مچ گیری ایشان هست در هنگام نفوذ هم محلی مناسب است برای رد گیری پس از نفوذ.
https://github.com/digitalisx/awesome-memory-forensics
@Engineer_Computer
حافظه جولانگاه بدافزارها و نفوذگران است. هم محلی برای مچ گیری ایشان هست در هنگام نفوذ هم محلی مناسب است برای رد گیری پس از نفوذ.
https://github.com/digitalisx/awesome-memory-forensics
@Engineer_Computer
GitHub
GitHub - digitalisx/awesome-memory-forensics: A curated list of awesome Memory Forensics for DFIR
A curated list of awesome Memory Forensics for DFIR - digitalisx/awesome-memory-forensics
👍2
🔥 CyberOps Associate
Prove your expertise in essential cybersecurity skills, concepts, and technologies, including security monitoring, analysis, and response. Launch your career in cyber operations with the Cisco Certified CyberOps Associate certification.
🚩Security concepts
🚩Security monitoring
🚩Host-based analysis
🚩Network intrusion analysis
Size :- 13.32 GB
Download link : https://mega.nz/folder/BuVETIbQ#iKm2iCpCq4JUFyVfe3oeag
@Engineer_Computer
Prove your expertise in essential cybersecurity skills, concepts, and technologies, including security monitoring, analysis, and response. Launch your career in cyber operations with the Cisco Certified CyberOps Associate certification.
🚩Security concepts
🚩Security monitoring
🚩Host-based analysis
🚩Network intrusion analysis
Size :- 13.32 GB
Download link : https://mega.nz/folder/BuVETIbQ#iKm2iCpCq4JUFyVfe3oeag
@Engineer_Computer
🤩1
🔥 USB Forensics and Pentesting
This course will cover USB in detail with an emphasis on understanding USB Mass Storage devices (also known as flash drives or thumb drives).By the end of this course students will know how to sniff USB traffic using open source tools, be able to write-block USB mass storage devices using software and microcontroller-based hardware, be able to impersonate other USB devices, and understand how to make forensic duplicates of USB mass storage devices. Along the way students will also learn how to use microcontrollers and Udev rules.
⛓L!NK: https://mega.nz/folder/ZuMElYwB#MUqOT97hwSAyz52jYHeGzg
Note :- Open ZIP files on RDP or Virtual machine
@Engineer_Computer
This course will cover USB in detail with an emphasis on understanding USB Mass Storage devices (also known as flash drives or thumb drives).By the end of this course students will know how to sniff USB traffic using open source tools, be able to write-block USB mass storage devices using software and microcontroller-based hardware, be able to impersonate other USB devices, and understand how to make forensic duplicates of USB mass storage devices. Along the way students will also learn how to use microcontrollers and Udev rules.
⛓L!NK: https://mega.nz/folder/ZuMElYwB#MUqOT97hwSAyz52jYHeGzg
Note :- Open ZIP files on RDP or Virtual machine
@Engineer_Computer
👍1🔥1