<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Eworitse Egbejule</title>
    <description>The latest articles on DEV Community by Eworitse Egbejule (@ebiscott).</description>
    <link>https://dev.to/ebiscott</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F1033874%2F955591b1-433d-49f3-a9c8-5cc86f1ead91.jpg</url>
      <title>DEV Community: Eworitse Egbejule</title>
      <link>https://dev.to/ebiscott</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/ebiscott"/>
    <language>en</language>
    <item>
      <title>Built an IP Sweeper in Bash to Check Live Hosts on a /24 Network</title>
      <dc:creator>Eworitse Egbejule</dc:creator>
      <pubDate>Wed, 06 Aug 2025 15:27:23 +0000</pubDate>
      <link>https://dev.to/ebiscott/built-an-ip-sweeper-in-python-to-check-live-hosts-on-a-24-network-38mf</link>
      <guid>https://dev.to/ebiscott/built-an-ip-sweeper-in-python-to-check-live-hosts-on-a-24-network-38mf</guid>
      <description>&lt;p&gt;So just yesterday, I worked on a simple but really useful bash script — an IP sweeper that pings all hosts from 1 to 254 in a &lt;code&gt;/24&lt;/code&gt; network and returns the live ones. Thought I’d share it here in case anyone finds it helpful or wants to build on it.&lt;/p&gt;

&lt;h2&gt;
  
  
  What is an IP Sweeper?
&lt;/h2&gt;

&lt;p&gt;An IP sweeper is basically a script or tool that checks which devices are currently active on a network. It's like scanning your local network to find all connected devices. It's super useful if you're working with networks, doing some light recon, or just curious about what devices are alive in a network.&lt;/p&gt;

&lt;h2&gt;
  
  
  Tools I Used
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;Bash (obviously lol)&lt;/li&gt;
&lt;li&gt;Mousepad (text editor for writing the shell script)&lt;/li&gt;
&lt;li&gt;Ping (this one's built into most systems by default)&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Step-by-step procedures
&lt;/h2&gt;

&lt;p&gt;I'll be adding screenshots here and code blocks to make it easier to follow along if you'd like to try it out.&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 1 - Create your script
&lt;/h3&gt;

&lt;p&gt;The first step is creating your script. This is an obvious one because you'll need this to write your bash code.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;mousepad ipsweep.sh
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;It is important to use a .sh extension for this file so that you can run it as a shell script i.e. as an executable later &lt;/p&gt;

&lt;p&gt;Here's how it should look:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fb0jzr3hsxeys9r4x3t22.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fb0jzr3hsxeys9r4x3t22.png" alt=" " width="800" height="402"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 2: Shebang
&lt;/h3&gt;

&lt;p&gt;The next step is adding the shebang operator and the file location to bash so Kali knows that the file is going to be a bash file, and its contents would be bash syntax. &lt;/p&gt;

&lt;p&gt;It looks like:&lt;br&gt;
&lt;code&gt;#!/bin/bash&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;So, copy and paste that into your file.&lt;/p&gt;
&lt;h3&gt;
  
  
  Step 3:
&lt;/h3&gt;

&lt;p&gt;Writing your ping command. Now ping is a simple tool in Linux that sends out ICMP packets to hosts on a network and checks to see if they are received or not. Here's what a simple ping request looks like:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F2obpcx6hw2l5fxuw9kx2.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F2obpcx6hw2l5fxuw9kx2.png" alt=" " width="577" height="261"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;u&gt;NOTE&lt;/u&gt;: You can also ping an IP address. The example uses a domain name, but the tool also works with IP addresses.&lt;/p&gt;

&lt;p&gt;Here's our final ping command:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;for ip in `seq 1 254`; do
ping $1.$ip -c 1 | grep "64 bytes" | cut -d " " -f 4 | tr -d ":" &amp;amp;
done
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now calm down, I know this looks very complex, but I'll break it down in a bit. Just go ahead and paste it into your script.&lt;/p&gt;

&lt;p&gt;-&lt;br&gt;
&lt;br&gt;
 &lt;code&gt;for ip in `seq 1 254`; do&lt;/code&gt;&lt;br&gt;
&lt;br&gt;
 -- This is a 'for' loop and what it does is that it tells your computer to iterate through the sequence 1 - 254 and for each run it should do this second part:&lt;br&gt;
&lt;/p&gt;

&lt;p&gt;&lt;code&gt;ping $1.$ip -c 1| grep "64 bytes" | cut -d " " -f 4 | tr -d ":" &amp;amp;&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Now you know what &lt;code&gt;ping&lt;/code&gt; does, don't you?&lt;br&gt;
&lt;code&gt;$1&lt;/code&gt; - tells our script to take the first input that comes to the command (this is basically the IP address you write after the command name when executing the script)&lt;br&gt;
and &lt;code&gt;$ip&lt;/code&gt; takes in the number of the current iteration from 1 to 254&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;grep&lt;/code&gt; is a tool in Linux to search through a file or directory for a word or group of words and return every instance to the terminal. So &lt;code&gt;grep "64 bytes"&lt;/code&gt; has our computer return every line containing the word "64 bytes". Remember we set our count to 1 with ping? So that we know we're only looking at one file and grep helps us to limit the amount of content we are looking at by starting the line from "64 bytes" and cutting off this initial line:&lt;br&gt;
&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;code&gt;PING dev.to (151.101.2.217) 56(84) bytes of data.&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;cut&lt;/code&gt; and &lt;code&gt;tr&lt;/code&gt; are tools to help with _cut_ing off the unnecessary parts of the rest of the grep result (to not make this longer than necessary I didn't explain their commands)&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;done&lt;/code&gt; ends the if statement.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This is our code now:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;for ip in `seq 1 254`; do
ping $1.$ip -c 1 | grep "64 bytes" | cut -d " " -f 4 | tr -d ":" &amp;amp;
done
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Try this and it should work perfectly fine.&lt;/p&gt;

&lt;p&gt;Now you may see errors like these, but not to worry they are just issues because virtualization platforms sometimes have difficulty synchronizing the guest OS's clock with the host OS's clock, leading to erratic time jumps.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F6vljxrvtcyuxs4yyd1qg.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F6vljxrvtcyuxs4yyd1qg.png" alt=" " width="800" height="426"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Extra bit
&lt;/h3&gt;

&lt;p&gt;I added an extra bit of code to the tool to make it handle data better.&lt;/p&gt;

&lt;p&gt;An if statement to ensure the user types the three octets of their IP range and some prompts to serve as instruction to use the tool.&lt;/p&gt;

&lt;h4&gt;
  
  
  Final Code:
&lt;/h4&gt;

&lt;p&gt;This is what your final code should look like:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;#!/bin/bash

if [ "$1" == "" ]
then
echo "Please add an IP address to the command" 
echo "The syntax is : ./ipsweep.sh X.X.X"

else
for ip in `seq 1 254`; do
ping $1.$ip -c 1 | grep "64 bytes" | cut -d " " -f 4 | tr -d ":" &amp;amp;
done
fi

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Thanks for reading! Please leave a comment or suggestions on how you would make this better.&lt;/p&gt;

</description>
      <category>bash</category>
      <category>linux</category>
      <category>cybersecurity</category>
      <category>automation</category>
    </item>
    <item>
      <title>Creating a Flask App: My issues as a beginner and how I fixed them.</title>
      <dc:creator>Eworitse Egbejule</dc:creator>
      <pubDate>Tue, 02 Jul 2024 20:11:22 +0000</pubDate>
      <link>https://dev.to/ebiscott/creating-a-flask-app-my-issues-as-a-beginner-and-how-i-learnt-to-fix-them-254j</link>
      <guid>https://dev.to/ebiscott/creating-a-flask-app-my-issues-as-a-beginner-and-how-i-learnt-to-fix-them-254j</guid>
      <description>&lt;p&gt;Hi everyone, &lt;strong&gt;Eworitse Egbejule&lt;/strong&gt; here. This is my first blog post and I want to share my experience with creating a flask app; the issues I had while making it and how I fixed them.&lt;/p&gt;

&lt;p&gt;Flask is a lightweight and flexible microframework used for building web apps in Python with minimal setup. Here's a sample code of a simple flask web app:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fx9n2347pkkn3zauusuvo.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fx9n2347pkkn3zauusuvo.png" alt="Sample Flask web app" width="416" height="389"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;My app is called Microblog and it's a simple blog flask app with it's frontend self written in HTML and CSS. &lt;/p&gt;

&lt;p&gt;I followed these steps to build my app:&lt;/p&gt;

&lt;h4&gt;
  
  
  Step 1: Design the Frontend
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;I started by creating the HTML and CSS code for a simple blog interface.&lt;/li&gt;
&lt;li&gt;The blog lets users record notes in the form of a diary.&lt;/li&gt;
&lt;li&gt;The entries are then presented back to the user in a clean, user-friendly format.&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  Step 2: Develop the Backend
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;I followed a tutorial to build the Flask backend. Flask is perfect for this due to its simplicity and flexibility.
*This stage involved setting up routes, handling user inputs, and managing the data.&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  Step 3: Handle Backend Hosting Issues
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;The main challenge came with hosting the site. Initially, I attempted to host it on &lt;a href="https://render.com" rel="noopener noreferrer"&gt;Render&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;I connected it to my GitHub repo &lt;a href="https://github.com/EbiScott/practice-blog" rel="noopener noreferrer"&gt;here&lt;/a&gt;, but encountered multiple errors.&lt;/li&gt;
&lt;li&gt;The errors were frustrating, and a friend suggested switching to &lt;a href="https://vercel.com" rel="noopener noreferrer"&gt;Vercel&lt;/a&gt;. Even on Vercel, I faced troubleshooting issues.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Steps I took to fix my deployment issues:
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Check app.py File:
I had to check if my Flask app was correctly instantiated as app.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;    &lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="n"&gt;flask&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;Flask&lt;/span&gt;

    &lt;span class="n"&gt;app&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;Flask&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;__name__&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;__name__&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;__main__&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="n"&gt;app&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;run&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;Updated the gunicorn Command:
I modified the start command in my deployment settings to:
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;    gunicorn app:app
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;Had to ensure correct Directory Structure:
I checked to make sure that &lt;code&gt;app.py&lt;/code&gt; is in the root directory of your project.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I created a &lt;code&gt;vercel.json&lt;/code&gt; Configuration File:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="nl"&gt;"version"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="nl"&gt;"builds"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="w"&gt;
        &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
          &lt;/span&gt;&lt;span class="nl"&gt;"src"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"app.py"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
          &lt;/span&gt;&lt;span class="nl"&gt;"use"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"@vercel/python"&lt;/span&gt;&lt;span class="w"&gt;
        &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="nl"&gt;"routes"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="w"&gt;
        &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
          &lt;/span&gt;&lt;span class="nl"&gt;"src"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"/(.*)"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
          &lt;/span&gt;&lt;span class="nl"&gt;"dest"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"app.py"&lt;/span&gt;&lt;span class="w"&gt;
        &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;Push to GitHub and Link to Vercel:
After fixing the issues I pushed my code to GitHub. Then I linked my GitHub repository to Vercel for automatic deployment.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Deployment: Making It Live
&lt;/h3&gt;

&lt;p&gt;I deployed the application on Vercel and pushing my code to GitHub, followed by linking the repository to Vercel for automatic deployment. You can check out my web app here at &lt;a href="https://the-microblog.vercel.app/" rel="noopener noreferrer"&gt;The Microblog&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fkji35339m3rxfa8jmm1n.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fkji35339m3rxfa8jmm1n.png" alt="Vercel" width="618" height="430"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  HNG 11 Backend Internship
&lt;/h2&gt;

&lt;p&gt;The process of building this microblog application strengthened my interest and love for backend development. It taught me valuable lessons in routing, CRUD operations, and deployment. Now, I'm excited to bring this passion and these skills to the HNG Internship.&lt;/p&gt;

&lt;p&gt;The HNG Internship provides a great opportunity to learn from experienced professionals, work on practical projects, and connect with other programmers. I'm very much interested in the intensive learning and opportunities that are provided by the internship. In case you're interested and want to find out more information about the program, please checkout &lt;a href="https://hng.tech/internship" rel="noopener noreferrer"&gt;HNG Internship&lt;/a&gt; and &lt;a href="https://hng.tech/hire" rel="noopener noreferrer"&gt;HNG Hire&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;This project was a significant milestone in my backend development journey. I'm really looking forward to the challenges and learning opportunities that the HNG Internship will bring. If you're also an aspiring developer like me, I highly recommend checking out the HNG Internship to take your skills to the next level.&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>beginners</category>
      <category>python</category>
      <category>learning</category>
    </item>
  </channel>
</rss>
