Sponsored Content
Full Discussion: Obfuscated C
Top Forums Programming Obfuscated C Post 18472 by PxT on Thursday 28th of March 2002 04:53:10 PM
Old 03-28-2002
MySQL Obfuscated C

Well this year i decided to enter the International Obfuscated C Code Contest. This was my first attempt at writing obfuscated C (at least purposely), so I am sure that this is kids-stuff for the real obfuscation gurus. Anyway, the results are out, and I am not a finalist (I wasn't expecting to be), so I figured I would share my code with you all, just for fun. If anyone else made an entry this year, please share them!


Here are the remarks included with my entry:

This program grew out of a non-obfuscated utility that I threw
together a while ago. I use it as a reference from time to
time since different architectures produce different results (at
least, the output is different on my HP-UX box than it is on my
Intel box). It simply outputs a nicely formatted ascii character
table. It is run with no arguments and produces its report on
the standard out. I achieved obfuscation by using a couple of
levels of recursion, plus some confusingly named variables and
functions. I also included some additional code which does
absolutley nothing just to confuse things a little more.

I strived for "-Wall" cleanness. As a result I had to give up
a couple minor obfuscations, but I think it is still sufficiently
convoluted. This is my first attempt at obfuscated C -- it was
written over the course of several weeks as a diversion. By
the end it became very difficult to improve as I could no longer
understand how it worked without a serious amount of thought!

The code is neatly arranged in the form of my initials. Smilie



Code:
#  include  <stdio.h>
#          define d (
#          define I1 1<<
#          define b )
#          define Il(l) \
           return(l)
#          define lI \
I*((I1 3)-1)+(I*(I1\
1))-(I-\
(I1 4))
#define \
_l(l)  \
ll_l(l)
#define \
ll(l) l
#define \
l1 main(

long i,l,ll(I)=d(I1 5)-(I1 1)b;int _l(l)
{putchar d ll(l)b;Il(l);}int II(l,L){_l(
(l/L)+48);l-=((l/L)*L);d L/=10 b?II(l,L)
          :0;Il(l);}int l1 
          b{*d d l b?&I:&l
          b=I;if d l>(I1 8
          b b Il(I1 0);_l(
          32);_l(I1 5);II(
          l,25<<2);_l(58);
          _l(I1 5);_l(ll(l
          ));l%(I1 2)?0:_l
          ((I1 3)+(ll(I1 1)
          )b;l++;Il(l1 l));
}

 

3 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Removing obfuscated javascript from js files

ello, I am trying to remove obfuscated code in multiple files on a server, the malicious code is surronded by /*km0ae9gr6m*//*qhk6sa6g1c*/ I had success removing from some files using this command sed -i ':strt;s|/\*km0ae9gr6m\*/*/\*qhk6sa6g1c\*/||g;/\/\*km0ae9gr6m\*\//{N;b strt}'... (5 Replies)
Discussion started by: cuantica
5 Replies

2. Web Development

Random - Any help decoding obfuscated code?

I have this following file and I would quite like to get it decoded - any help / advice is appreciated. I would like to know how to decrypt it, however if someone is able to do it for me I would be equally grateful. <?php //Obfuscation provided by FOPO - Free Online PHP Obfuscator v1.2:... (6 Replies)
Discussion started by: mcclunyboy
6 Replies

3. Programming

Obfuscated "Hello World!" in Python 2.7.x...

Obfuscated Hello World! in Python 2.7.x This is seriously impressive:- Obfuscating "Hello world!" - Ben Kurtovic (2 Replies)
Discussion started by: wisecracker
2 Replies
xfs_metadump(8) 					      System Manager's Manual						   xfs_metadump(8)

NAME
xfs_metadump - copy XFS filesystem metadata to a file SYNOPSIS
xfs_metadump [ -efgow ] [ -l logdev ] source target DESCRIPTION
xfs_metadump is a debugging tool that copies the metadata from an XFS filesystem to a file. The source argument must be the pathname of the device or file containing the XFS filesystem and the target argument specifies the destination file name. If target is -, then the output is sent to stdout. This allows the output to be redirected to another program such as a compression application. xfs_metadump should only be used to copy unmounted filesystems, read-only mounted filesystems, or frozen filesystems (see xfs_freeze(8)). Otherwise, the generated dump could be inconsistent or corrupt. xfs_metadump does not alter the source filesystem in any way. The target image is a contiguous (non-sparse) file containing all the filesystem's metadata and indexes to where the blocks were copied from. By default, xfs_metadump obfuscates most file (regular file, directory and symbolic link) names and extended attribute names to allow the dumps to be sent without revealing confidential information. Extended attribute values are zeroed and no data is copied. The only excep- tions are file or attribute names that are 4 or less characters in length. Also file names that span extents (this can only occur with the mkfs.xfs(8) options where -n size > -b size) are not obfuscated. Names between 5 and 8 characters in length inclusively are partially obfuscated. xfs_metadump should not be used for any purposes other than for debugging and reporting filesystem problems. The most common usage scenario for this tool is when xfs_repair(8) fails to repair a filesystem and a metadump image can be sent for analysis. The file generated by xfs_metadump can be restored to filesystem image (minus the data) using the xfs_mdrestore(8) tool. OPTIONS
-e Stops the dump on a read error. Normally, it will ignore read errors and copy all the metadata that is accessible. -f Specifies that the filesystem image to be processed is stored in a regular file (see the mkfs.xfs -d file option). This can also happen if an image copy of a filesystem has been made into an ordinary file with xfs_copy(8). -g Shows dump progress. This is sent to stdout if the target is a file or to stderr if the target is stdout. -l logdev For filesystems which use an external log, this specifies the device where the external log resides. The external log is not copied, only internal logs are copied. -o Disables obfuscation of file names and extended attributes. -w Prints warnings of inconsistent metadata encountered to stderr. Bad metadata is still copied. DIAGNOSTICS
xfs_metadump returns an exit code of 0 if all readable metadata is successfully copied or 1 if a write error occurs or a read error occurs and the -e option used. NOTES
As xfs_metadump copies metadata only, it does not matter if the source filesystem has a realtime section or not. If the filesystem has an external log, it is not copied. Internal logs are copied and any outstanding log transactions are not obfuscated if they contain names. xfs_metadump is a shell wrapper around the xfs_db(8) metadump command. SEE ALSO
xfs_repair(8), xfs_mdrestore(8), xfs_freeze(8), xfs_db(8), xfs_copy(8), xfs(5) BUGS
Email bug reports to xfs@oss.sgi.com. xfs_metadump(8)
All times are GMT -4. The time now is 04:58 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy