473,500 Members | 1,712 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 1395
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
9191
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...
3
5678
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...
6
5698
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)...
4
4224
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
3854
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...
7
1602
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
2701
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...
2
2478
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...
0
1212
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...
5
2635
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...
0
7182
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,...
0
7397
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5490
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,...
1
4923
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
3110
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3106
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1430
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
672
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
316
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...

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.