#!/usr/bin/perl print"Sapient2003`s Buffer Overflow Code Checker\n\n\n"; print"Enter source code filename.\n"; $file=<>; chomp $file; print "Checking source code file for buffer overflow source...\n\n"; open(SOURCE, $file)|| die "Source code file could not be opened. Exiti +ng.\n\n"; while(<SOURCE>){ if(/xeb|xec|x69|xff/){ print "Source code file contains buffer overflow code.\nSource code fi +le will be deleted.\n"; system("rm $file"); exit; } } close FILE; print "Source code file is free of buffer overflow code.\n\n"; print"Enter output file.\n"; $output=<>; chomp $output; print "Compiling..." system("/usr/bin/gcc-3.2 -o $output $file"); print "Done.\n" exit; #
In reply to compiler replacement by Sapient2003
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |