473,626 Members | 3,234 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

scan complete machine

nabanita
9 New Member
is there a way in C/C++ to sacn the whole computer for executable files?
the process would scan all the folders and sub folders recursively.
Apr 16 '10 #1
4 1409
Banfa
9,065 Recognized Expert Moderator Expert
Scan the whole computer for what?
Apr 16 '10 #2
newb16
687 Contributor
@Banfa - For viruses? @OP -"Computer" is not defined in C standard, so it depends on os and compiler.
Apr 16 '10 #3
weaknessforcats
9,208 Recognized Expert Moderator Expert
You can only scan the addresses inside the address space of your process.

Only the OS itself can scan the entire machine.
Apr 16 '10 #4
jkmyoung
2,057 Recognized Expert Top Contributor
?
Assuming permissions:
Expand|Select|Wrap|Line Numbers
  1. Get root directory
  2. RecursiveScan(root);
  3.  
  4. RecursiveScan(File file){
  5.   if file is dir
  6.     foreach File f in dir
  7.       RecursiveScan (f)
  8.   else
  9.       Scan(f)
  10. }
where Scan() is a function that does the work of scanning the file.
Apr 16 '10 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

2
9204
by: Dan Williams | last post by:
Does anyone know of any Windows software to scan the same paper document and enter the results to an SQL Server database? We have a Photocopier machine that can automatically scan several documents at a time and email them to an email address. We'd like to scan in an assessment form that rates a person from 1-10 on punctuality, appearance, efficiency, willingness and professionalism, and then submit the values to an SQL 2000 database. ...
3
5686
by: Carlos Moreno | last post by:
I can't find a reasonable explanation for this. I have a table game, with primary key gameid (an int). If I use a where involving gameid and <, or >, or <=, or >=, then I get a sequential scan. If I use =, then of course I get an Index scan. More surprising to me is the fact that using BETWEEN, I get an Index scan!!
6
5715
by: robert | last post by:
just got out of a "class" on EXPLAIN, from a 390/v6 maven. was told that ACCESSTYPE = 'R' in the plan_table meant a TableSpace scan. hmmmm. next step up (or down, depending on your outlook) wasn't a Table Scan. thought this might be a MainFrame thing; but a look at DB2Info on my UDB 7.2 server showed the same thing. this is truly puzzling. is there an explanation of EXPLAIN which describes how to get a Table Scan???? or are we...
4
4244
by: smshahriar | last post by:
Hi, I want to scan from the following string all the hex numbers and populate an array of integers: 0x27 0x00 0x30 0x00 0x33 0x00 0x36 0x00
1
3868
by: srinu | last post by:
Hello, We had one webserver based on a linux machine. The website is fully function and designed by a different person. Now we moved the machine from one IP to another one. I changed the machine ip address and the website is working partially. That site is working in between pages verywell. But once I give some input and requrest for data it is failing with the following message:
7
1615
by: Raj | last post by:
Hi, I have a pretty simple query like select t1.c1,t1.c2,t1.c2, t2.c1,t2.c2 from t1, t2 where t1.c1 = ' xxx '
1
2721
by: shilpasharma | last post by:
Hi, Can anybody let me know how I can optimise following Query. Select * from reports where ( exists ( SELECT 1 FROM results_required rr, item_claims_trials ict, results res WHERE ict.t_t_id IN ( 3725 ) and res.rr_rr_id = rr.rr_id AND rr.rt_rt_id = -1 and rr.ict_ict_id = ict.ict_id
2
2492
by: BD | last post by:
Hi, all. My background is more Oracle than db2. My skills at SQL tuning are quite limited. I'm running 8.2 on Windows. I'm tasked with some SQL optimization, and am doing some explain plans on various queries.
0
1220
maxamis4
by: maxamis4 | last post by:
Hellow folks, I have the following question. I know that WMI lets your retrieve your mapped network drive information if its the local machine. But what I don't understand is how to pull a remote computers mapped network drives. I have seen serveral articles that indicate that you would need to enumerate a remote session as the user, but I have no idea what this means or how to do it. Does anyone know how to use WMI on a remote machine to...
5
2646
by: =?Utf-8?B?TWlrZSBE?= | last post by:
This is a difficult question: I need to be able to input data via hand-scanner into a web page textbox, but it needs to be done more than once. The user will scan one card after another and in the end will get results from the database. I have everything figured out except how to enter the cards. I can do it for one card but when the page reloads I lose the object (StringBuilder) and it starts all over. I thought of writing to a text...
0
8269
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8203
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8711
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8642
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8368
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
7203
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
4206
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1815
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1515
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.