Jump to content

I am taking a Unix class and am completely lost. I have no clue how to even go about starting this.

 

My professor wants us to create a web form using HTML and Shell script. The form has to display a random image (either saved on the server or from a url using the curl command and shuffle).The user is asked to type the word that is displayed on the image and submit the form. If the user input matches the word, than it displays a message stating that their input was correct, otherwise it displays an error message.

 

How do I go about getting this started? Thanks

Windows 10 Edu | Asus ROG Strix X570-F Gaming | Ryzen 9 3950x | 4x 16GB G.Skill Trident Z RGB| ROG Strix GeForce® RTX 2080 SUPER™ Advanced edition | Samsung 980 PRO 500GB + Samsung 970 Evo Plus 2TB + 8TB Seagate Barracuda | EVGA Supernova 650 G2 | Alienware AW3418DW + LG 34uc87c + Dell u3419w | Asus Zephyrus G14

Link to comment
https://linustechtips.com/topic/580444-form-help-html-and-shell-script/
Share on other sites

Link to post
Share on other sites

So your professor wants you to build a captcha challenge? That's what I understand from it...

Using Shell Script to serve a random image sounds weird to me. I would rather do it with a server side scripting language like PHP.

CPU: i7-12700KF Grill Plate Edition // MOBO: Asus Z690-PLUS WIFI D4 // RAM: 16GB G.Skill Trident Z 3200MHz CL14 

GPU: MSI GTX 1080 FE // PSU: Corsair RM750i // CASE: Thermaltake Core X71 // BOOT: Samsung Evo 960 500GB

STORAGE: WD PC SN530 512GB + Samsung Evo 860 500GB // COOLING: Full custom loop // DISPLAY: LG 34UC89G-B

Link to post
Share on other sites

33 minutes ago, Limecat86 said:

So your professor wants you to build a captcha challenge? That's what I understand from it...

Using Shell Script to serve a random image sounds weird to me. I would rather do it with a server side scripting language like PHP.

That is correct. He wants everything done in HTML and Shell script. Would it have been anything other than the shell script, it wouldn't be an issue. I just don't know how to grab info from the html form and process and output it using the shell script.

Windows 10 Edu | Asus ROG Strix X570-F Gaming | Ryzen 9 3950x | 4x 16GB G.Skill Trident Z RGB| ROG Strix GeForce® RTX 2080 SUPER™ Advanced edition | Samsung 980 PRO 500GB + Samsung 970 Evo Plus 2TB + 8TB Seagate Barracuda | EVGA Supernova 650 G2 | Alienware AW3418DW + LG 34uc87c + Dell u3419w | Asus Zephyrus G14

Link to post
Share on other sites

2 minutes ago, prolemur said:

Some quick googling came up with this guide: http://www.unix.com/302404675-post7.html

 

Seems like an unorthodox way about completing such a task though :) Good luck!

This is a good start. Thanks!

Windows 10 Edu | Asus ROG Strix X570-F Gaming | Ryzen 9 3950x | 4x 16GB G.Skill Trident Z RGB| ROG Strix GeForce® RTX 2080 SUPER™ Advanced edition | Samsung 980 PRO 500GB + Samsung 970 Evo Plus 2TB + 8TB Seagate Barracuda | EVGA Supernova 650 G2 | Alienware AW3418DW + LG 34uc87c + Dell u3419w | Asus Zephyrus G14

Link to post
Share on other sites

49 minutes ago, Limecat86 said:

So your professor wants you to build a captcha challenge? That's what I understand from it...

Using Shell Script to serve a random image sounds weird to me. I would rather do it with a server side scripting language like PHP.

15 minutes ago, Scruffy90 said:

That is correct. He wants everything done in HTML and Shell script. Would it have been anything other than the shell script, it wouldn't be an issue. I just don't know how to grab info from the html form and process and output it using the shell script.

Unless you can build one that is more secure than the already existing Google ReCaptchV2 script, I don't see any real-world point to writing your own.

However, I can certainly understand your professors' points in having you write your own implementation of a Captcha for learning purposes.

 

I think what he's asking you to do is write a PHP script (using PHP to curl a url and HTML to make it pretty) to display an image to the user.

Without a database (or an array, at least) storing the correct values for each Captcha image, I don't see how you'd verify correct submissions from the user.

Is your professor providing these images?

Is he also giving you a list of correct values?

Or are you expected to come up with those values on your own? Manually? Or algorithmically?

 

Desktop: KiRaShi-Intel-2022 (i5-12600K, 5060 Ti) Mobile: Moto Razr 50 Ultra (Razr+ 2024) | 30GB CAN+US+MEX $30/month
Laptop: Lenovo Yoga 7i (16") 82UF0015US (i7-12700H, 16GB/2TB RAM/SSD, A370M GPU) Tablet: Lenovo Tab Plus (256GB)
Camera: Canon M6 Mark II | Canon Rebel T1i (500D) | Canon SX280 Music: Spotify Premium (CIRCA '08)

Link to post
Share on other sites

17 minutes ago, kirashi said:

Unless you can build one that is more secure than the already existing Google ReCaptchV2 script, I don't see any real-world point to writing your own.

However, I can certainly understand your professors' points in having you write your own implementation of a Captcha for learning purposes.

 

I think what he's asking you to do is write a PHP script (using PHP to curl a url and HTML to make it pretty) to display an image to the user.

Without a database (or an array, at least) storing the correct values for each Captcha image, I don't see how you'd verify correct submissions from the user.

Is your professor providing these images?

Is he also giving you a list of correct values?

Or are you expected to come up with those values on your own? Manually? Or algorithmically?

 

There's no real world point to it. Mostly just for learning. He explicitly wants everything in shell script. I don't know why, he told us to avoid using perl, javascript, etc. He hasn't given us anything to go on other than a basic HTML form template.

Windows 10 Edu | Asus ROG Strix X570-F Gaming | Ryzen 9 3950x | 4x 16GB G.Skill Trident Z RGB| ROG Strix GeForce® RTX 2080 SUPER™ Advanced edition | Samsung 980 PRO 500GB + Samsung 970 Evo Plus 2TB + 8TB Seagate Barracuda | EVGA Supernova 650 G2 | Alienware AW3418DW + LG 34uc87c + Dell u3419w | Asus Zephyrus G14

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×